Commit edf93dea authored by Johannes Mey's avatar Johannes Mey
Browse files

fix parser states and catch-all rule

parent 622bb517
<YYINITIAL,DECLARATION> {
<YYINITIAL,COMMENT,DECLARATION> {
"abstract" { yybegin(DECLARATION); return sym(Terminals.ABSTRACT); }
"rel" { yybegin(DECLARATION); return sym(Terminals.RELATION); }
}
<YYINITIAL,DECLARATION> {
<YYINITIAL,COMMENT,DECLARATION> {
{ID} { yybegin(DECLARATION); return sym(Terminals.ID); }
[^] { throw new ScannerError((yyline+1) +"," + (yycolumn+1) + ": Illegal character <"+yytext()+">"); }
}
<YYINITIAL,DECLARATION,COMMENT> {
<YYINITIAL,COMMENT,DECLARATION> {
<<EOF>> { return sym(Terminals.EOF); }
}
[^] { throw new ScannerError((yyline+1) +"," + (yycolumn+1) + ": Illegal character <"+yytext()+">"); }
}
\ No newline at end of file
<YYINITIAL,DECLARATION> {
<YYINITIAL,COMMENT,DECLARATION> {
";" { yybegin(COMMENT); return sym(Terminals.SCOL); }
":" { yybegin(DECLARATION); return sym(Terminals.COL); }
"::=" { yybegin(DECLARATION); return sym(Terminals.ASSIGN); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment