Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JastAdd
relast-preprocessor
Commits
edf93dea
Commit
edf93dea
authored
Jun 01, 2021
by
Johannes Mey
Browse files
fix parser states and catch-all rule
parent
622bb517
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/jastadd/scanner/Keywords.flex
View file @
edf93dea
<YYINITIAL,DECLARATION> {
<YYINITIAL,
COMMENT,
DECLARATION> {
"abstract" { yybegin(DECLARATION); return sym(Terminals.ABSTRACT); }
"rel" { yybegin(DECLARATION); return sym(Terminals.RELATION); }
}
src/main/jastadd/scanner/RulesPostamble.flex
View file @
edf93dea
<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
src/main/jastadd/scanner/Symbols.flex
View file @
edf93dea
<YYINITIAL,DECLARATION> {
<YYINITIAL,
COMMENT,
DECLARATION> {
";" { yybegin(COMMENT); return sym(Terminals.SCOL); }
":" { yybegin(DECLARATION); return sym(Terminals.COL); }
"::=" { yybegin(DECLARATION); return sym(Terminals.ASSIGN); }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment