forked from antlr/antlr4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…arrt version) Deprecate USE_OF_BAD_WORD
- Loading branch information
Showing
42 changed files
with
513 additions
and
556 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...suite/resources/org/antlr/v4/test/runtime/descriptors/LexerExec/ReservedWordsEscaping.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,23 @@ | ||
[notes] | ||
https://github.com/antlr/antlr4/issues/1070 | ||
|
||
[type] | ||
Lexer | ||
|
||
[grammar] | ||
lexer grammar L; | ||
|
||
channels { break } | ||
|
||
A: 'a' -> mode(for); | ||
|
||
mode for; | ||
B: 'b' -> channel(break); | ||
|
||
[input] | ||
ab | ||
|
||
[output] | ||
[@0,0:0='a',<1>,1:0] | ||
[@1,1:1='b',<2>,channel=2,1:1] | ||
[@2,2:1='<EOF>',<-1>,1:2] |
36 changes: 36 additions & 0 deletions
36
...uite/resources/org/antlr/v4/test/runtime/descriptors/ParserExec/ReservedWordsEscaping.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,36 @@ | ||
[notes] | ||
https://github.com/antlr/antlr4/issues/1070 | ||
|
||
[type] | ||
Parser | ||
|
||
[grammar] | ||
grammar if; | ||
|
||
root | ||
: {0==0}? continue+ {<writeln("$text")>} | ||
; | ||
|
||
continue | ||
: for for? #else | ||
| break=BREAK BREAK+ (for | IF) #class | ||
| if+=IF if+=IF* #int | ||
| continue CONTINUE #static | ||
; | ||
|
||
for: FOR; | ||
FOR: 'for_'; | ||
BREAK: 'break_'; | ||
IF: 'if_'; | ||
CONTINUE: 'continue_'; | ||
|
||
[start] | ||
root | ||
|
||
[input] | ||
for_for_break_break_for_if_if_for_continue_ | ||
|
||
[output] | ||
"""for_for_break_break_for_if_if_for_continue_ | ||
""" | ||
|
204 changes: 61 additions & 143 deletions
204
tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp.stg
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.