forked from antlr/antlr4
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for antlr#2016 and fix java.
Signed-off-by: Terence Parr <parrt@antlr.org>
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...ources/org/antlr/v4/test/runtime/descriptors/ParserExec/ListLabelsOnRuleRefStartOfAlt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[notes] | ||
Checks that this compiles; see https://github.com/antlr/antlr4/issues/2016 | ||
|
||
[type] | ||
Parser | ||
|
||
[grammar] | ||
grammar Test; | ||
expression: op=NOT args+=expression | ||
| args+=expression (op=AND args+=expression)+ | ||
| args+=expression (op=OR args+=expression)+ | ||
| IDENTIFIER | ||
; | ||
AND : 'and' ; | ||
OR : 'or' ; | ||
NOT : 'not' ; | ||
IDENTIFIER : [a-zA-Z_][a-zA-Z0-9_]* ; | ||
WS : [ \t\r\n]+ -> skip ; | ||
|
||
[start] | ||
expression | ||
|
||
[input] | ||
a and b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters