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

fix handling of multiline comments

parent 5bdee4fd
......@@ -36,7 +36,7 @@ import org.jastadd.relast.parser.RelAstParser.Terminals;
%}
WhiteSpace = [ ] | \t | \f | \n | \r | \r\n
TraditionalComment = "/*" [^*] ~"*/" | "/*" "*"+ "/"
TraditionalComment = [/][*][^*]*[*]+([^*/][^*]*[*]+)*[/]
EndOfLineComment = "//" [^\n|\r|\r\n]*
Comment = {TraditionalComment} | {EndOfLineComment}
......
// do line comments work?
Root ::= A* B*;
A ::= <Name> /SomeNTA:A/;
B ::= <Name>;
......@@ -6,6 +8,23 @@ rel A.Di1 -> B;
rel A.Di2? -> B;
rel A.Di3* -> B;
/*
do multiline comments work
*/
/**/
/*
* work?
*/
/**
* The root of a Java AST.
*
* <p>A Java program consists of multiple compilation units that represent the
* source files of the program.
*/
rel A.Bi1 <-> B.Bi1;
rel A.Bi2 <-> B.Bi2?;
rel A.Bi3 <-> B.Bi3*;
......
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