Skip to content

Commit 4d71758

Browse files
committed
For now keep the antlr/example grammars as is
They serve special purposes and are not normal grammars.
1 parent cf8d6aa commit 4d71758

File tree

16 files changed

+4154
-4272
lines changed

16 files changed

+4154
-4272
lines changed

antlr/antlr4/examples/CPP14.g4

Lines changed: 1591 additions & 1170 deletions
Large diffs are not rendered by default.

antlr/antlr4/examples/Hello.g4

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
// define a grammar called Hello
2-
3-
// $antlr-format alignTrailingComments true, columnLimit 150, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false, useTab false
4-
// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true, alignSemicolons hanging, alignColons hanging
5-
62
grammar Hello;
3+
r : 'hello' ID;
4+
ID : [a-z]+ ;
5+
WS : [ \t\r\n]+ -> skip ;
76

8-
r
9-
: 'hello' ID
10-
;
11-
12-
ID
13-
: [a-z]+
14-
;
15-
16-
WS
17-
: [ \t\r\n]+ -> skip
18-
;

antlr/antlr4/examples/Issue1567.g4

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
// $antlr-format alignTrailingComments true, columnLimit 150, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments false, useTab false
2-
// $antlr-format allowShortRulesOnASingleLine false, allowShortBlocksOnASingleLine true, alignSemicolons hanging, alignColons hanging
3-
41
grammar Sample;
52

63
options {
7-
foo = {};
4+
foo = {};
85
}
96

107
@members {
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
// Testing that lexer rules must not contain element labels.
2-
3-
// $antlr-format alignTrailingComments true, columnLimit 150, maxEmptyLinesToKeep 1, reflowComments false, useTab false
4-
// $antlr-format allowShortRulesOnASingleLine true, allowShortBlocksOnASingleLine true, minEmptyLines 0, alignSemicolons ownLine
5-
// $antlr-format alignColons trailing, singleLineOverrulesHangingColon true, alignLexerCommands true, alignLabels true, alignTrailers true
6-
72
lexer grammar LexerElementLabel;
83

9-
Token: var = 'token';
4+
Token : var='token' ;

0 commit comments

Comments
 (0)