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
35b7bbff
Commit
35b7bbff
authored
Jun 01, 2021
by
Johannes Mey
Browse files
no whitespace/comment required between rules
parent
edf93dea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/jastadd/parser/RelAst.parser
View file @
35b7bbff
GrammarFile goal
= comment_list.c grammar_file.f {: f.getDeclarationList().insertChild(new EmptyDeclaration(c), 0); return f; :}
| grammar_file
;
GrammarFile grammar_file
...
...
@@ -16,8 +15,8 @@ Declaration declaration
// this method would be create by the JAstAddParser from a usage of
// 'comment+' in a rule, but only for the standard list class 'List'.
JastAddList comment_list
= comment.
n {: return new JastAddList().add(n)
; :}
|
comment_list.l comment.n {: return l.add(n
); :}
= comment.
c comment_list.l {: l.insertChild(c, 0); return l
; :}
|
/* epsilon */ {: return new JastAddList(
); :}
;
Comment comment
...
...
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