Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
JastAdd
relational-rags
Commits
b183e521
Commit
b183e521
authored
Jun 25, 2019
by
Johannes Mey
Browse files
fix handling of multiline comments
parent
5bdee4fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/jastadd/RelAst.flex
View file @
b183e521
...
...
@@ -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
}
...
...
src/test/jastadd/relations/Relations.relast
View file @
b183e521
// 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*;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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