diff --git a/src/main/jastadd/parser/RelAst.parser b/src/main/jastadd/parser/RelAst.parser index c4cfd43d096b226f9ee3c98fe5f75975be4f10e1..628e452c42cd935902cd79ef1293b8c46a1fb0b5 100644 --- a/src/main/jastadd/parser/RelAst.parser +++ b/src/main/jastadd/parser/RelAst.parser @@ -1,6 +1,5 @@ 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