Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relast-preprocessor
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
relast-preprocessor
Commits
35b7bbff
Commit
35b7bbff
authored
4 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
no whitespace/comment required between rules
parent
edf93dea
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/jastadd/parser/RelAst.parser
+2
-3
2 additions, 3 deletions
src/main/jastadd/parser/RelAst.parser
with
2 additions
and
3 deletions
src/main/jastadd/parser/RelAst.parser
+
2
−
3
View file @
35b7bbff
GrammarFile goal
GrammarFile goal
= comment_list.c grammar_file.f {: f.getDeclarationList().insertChild(new EmptyDeclaration(c), 0); return f; :}
= comment_list.c grammar_file.f {: f.getDeclarationList().insertChild(new EmptyDeclaration(c), 0); return f; :}
| grammar_file
;
;
GrammarFile grammar_file
GrammarFile grammar_file
...
@@ -16,8 +15,8 @@ Declaration declaration
...
@@ -16,8 +15,8 @@ Declaration declaration
// this method would be create by the JAstAddParser from a usage of
// this method would be create by the JAstAddParser from a usage of
// 'comment+' in a rule, but only for the standard list class 'List'.
// 'comment+' in a rule, but only for the standard list class 'List'.
JastAddList comment_list
JastAddList comment_list
= comment.
n {: return new JastAddList().add(n)
; :}
= comment.
c comment_list.l {: l.insertChild(c, 0); return l
; :}
|
comment_list.l comment.n {: return l.add(n
); :}
|
/* epsilon */ {: return new JastAddList(
); :}
;
;
Comment comment
Comment comment
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment