antlr3 1.7.5 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. data/java/RubyTarget.java +50 -16
  2. data/java/antlr-full-3.2.1.jar +0 -0
  3. data/lib/antlr3/streams.rb +82 -41
  4. data/lib/antlr3/template/group-file-lexer.rb +59 -59
  5. data/lib/antlr3/template/group-file-parser.rb +6 -6
  6. data/lib/antlr3/test/functional.rb +64 -36
  7. data/lib/antlr3/version.rb +2 -2
  8. data/templates/Ruby.stg +1 -1
  9. data/test/functional/ast-output/auto-ast.rb +86 -86
  10. data/test/functional/ast-output/construction.rb +14 -15
  11. data/test/functional/ast-output/hetero-nodes.rb +63 -66
  12. data/test/functional/ast-output/rewrites.rb +119 -120
  13. data/test/functional/ast-output/tree-rewrite.rb +96 -96
  14. data/test/functional/debugging/debug-mode.rb +379 -379
  15. data/test/functional/debugging/profile-mode.rb +6 -6
  16. data/test/functional/debugging/rule-tracing.rb +4 -5
  17. data/test/functional/delegation/import.rb +32 -32
  18. data/test/functional/lexer/basic.rb +27 -27
  19. data/test/functional/lexer/filter-mode.rb +6 -7
  20. data/test/functional/lexer/nuances.rb +2 -3
  21. data/test/functional/lexer/properties.rb +7 -8
  22. data/test/functional/lexer/syn-pred.rb +1 -2
  23. data/test/functional/lexer/xml.rb +3 -3
  24. data/test/functional/main/main-scripts.rb +37 -37
  25. data/test/functional/parser/actions.rb +8 -8
  26. data/test/functional/parser/backtracking.rb +1 -2
  27. data/test/functional/parser/basic.rb +10 -10
  28. data/test/functional/parser/calc.rb +9 -9
  29. data/test/functional/parser/ll-star.rb +3 -3
  30. data/test/functional/parser/nuances.rb +4 -5
  31. data/test/functional/parser/predicates.rb +3 -4
  32. data/test/functional/parser/properties.rb +14 -14
  33. data/test/functional/parser/rule-methods.rb +8 -7
  34. data/test/functional/parser/scopes.rb +15 -16
  35. data/test/functional/template-output/template-output.rb +1 -1
  36. data/test/functional/token-rewrite/basic.rb +60 -61
  37. data/test/functional/token-rewrite/via-parser.rb +3 -4
  38. data/test/functional/tree-parser/basic.rb +30 -31
  39. data/test/unit/test-streams.rb +10 -10
  40. data/test/unit/test-template.rb +1 -1
  41. metadata +2 -2
@@ -5,7 +5,7 @@ require 'antlr3/test/functional'
5
5
 
6
6
 
7
7
  class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
8
- inline_grammar(<<-'END')
8
+ inline_grammar( <<-'END' )
9
9
  grammar FlatList;
10
10
  options {
11
11
  language=Ruby;
@@ -17,7 +17,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
17
17
  WS : (' '|'\n') {$channel=HIDDEN;} ;
18
18
  END
19
19
 
20
- inline_grammar(<<-'END')
20
+ inline_grammar( <<-'END' )
21
21
  tree grammar FlatListWalker;
22
22
  options {
23
23
  language=Ruby;
@@ -29,7 +29,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
29
29
  a : ID INT -> INT ID;
30
30
  END
31
31
 
32
- inline_grammar(<<-'END')
32
+ inline_grammar( <<-'END' )
33
33
  grammar SimpleTree;
34
34
  options {
35
35
  language=Ruby;
@@ -41,7 +41,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
41
41
  WS : (' '|'\n') {$channel=HIDDEN;} ;
42
42
  END
43
43
 
44
- inline_grammar(<<-'END')
44
+ inline_grammar( <<-'END' )
45
45
  tree grammar SimpleTreeWalker;
46
46
  options {
47
47
  language=Ruby;
@@ -52,7 +52,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
52
52
  a : ^(ID INT) -> ^(INT ID);
53
53
  END
54
54
 
55
- inline_grammar(<<-END)
55
+ inline_grammar( <<-END )
56
56
  grammar CombinedRewriteAndAuto;
57
57
  options {
58
58
  language=Ruby;
@@ -64,7 +64,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
64
64
  WS : (' '|'\\n') {$channel=HIDDEN;} ;
65
65
  END
66
66
 
67
- inline_grammar(<<-END)
67
+ inline_grammar( <<-END )
68
68
  tree grammar CombinedRewriteAndAutoTree;
69
69
  options {
70
70
  language=Ruby;
@@ -75,7 +75,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
75
75
  a : ^(ID INT) -> ^(INT ID) | INT;
76
76
  END
77
77
 
78
- inline_grammar(<<-'END')
78
+ inline_grammar( <<-'END' )
79
79
  grammar AvoidDup;
80
80
  options {
81
81
  language=Ruby;
@@ -87,7 +87,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
87
87
  WS : (' '|'\n') {$channel=HIDDEN;} ;
88
88
  END
89
89
 
90
- inline_grammar(<<-'END')
90
+ inline_grammar( <<-'END' )
91
91
  tree grammar AvoidDupWalker;
92
92
  options {
93
93
  language=Ruby;
@@ -98,7 +98,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
98
98
  a : ID -> ^(ID ID);
99
99
  END
100
100
 
101
- inline_grammar(<<-'END')
101
+ inline_grammar( <<-'END' )
102
102
  grammar Loop;
103
103
  options {
104
104
  language=Ruby;
@@ -110,7 +110,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
110
110
  WS : (' '|'\n') {$channel=HIDDEN;} ;
111
111
  END
112
112
 
113
- inline_grammar(<<-'END')
113
+ inline_grammar( <<-'END' )
114
114
  tree grammar LoopWalker;
115
115
  options {
116
116
  language=Ruby;
@@ -121,7 +121,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
121
121
  a : (^(ID INT))+ -> INT+ ID+;
122
122
  END
123
123
 
124
- inline_grammar(<<-'END')
124
+ inline_grammar( <<-'END' )
125
125
  grammar AutoDup;
126
126
  options {
127
127
  language=Ruby;
@@ -133,7 +133,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
133
133
  WS : (' '|'\n') {$channel=HIDDEN;} ;
134
134
  END
135
135
 
136
- inline_grammar(<<-'END')
136
+ inline_grammar( <<-'END' )
137
137
  tree grammar AutoDupWalker;
138
138
  options {
139
139
  language=Ruby;
@@ -144,7 +144,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
144
144
  a : ID;
145
145
  END
146
146
 
147
- inline_grammar(<<-'END')
147
+ inline_grammar( <<-'END' )
148
148
  grammar AutoDupRule;
149
149
  options {
150
150
  language=Ruby;
@@ -156,7 +156,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
156
156
  WS : (' '|'\n') {$channel=HIDDEN;} ;
157
157
  END
158
158
 
159
- inline_grammar(<<-'END')
159
+ inline_grammar( <<-'END' )
160
160
  tree grammar AutoDupRuleWalker;
161
161
  options {
162
162
  language=Ruby;
@@ -169,7 +169,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
169
169
  c : INT ;
170
170
  END
171
171
 
172
- inline_grammar(<<-'END')
172
+ inline_grammar( <<-'END' )
173
173
  grammar AutoWildcard;
174
174
  options {language=Ruby;output=AST;}
175
175
  a : ID INT ;
@@ -178,14 +178,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
178
178
  WS : (' '|'\n') {$channel=HIDDEN;} ;
179
179
  END
180
180
 
181
- inline_grammar(<<-'END')
181
+ inline_grammar( <<-'END' )
182
182
  tree grammar AutoWildcardWalker;
183
183
  options {language=Ruby;output=AST; ASTLabelType=CommonTree; tokenVocab=AutoWildcard;}
184
184
  a : ID .
185
185
  ;
186
186
  END
187
187
 
188
- inline_grammar(<<-'END')
188
+ inline_grammar( <<-'END' )
189
189
  grammar AutoWildcard2;
190
190
  options {language=Ruby;output=AST;}
191
191
  a : ID INT -> ^(ID INT);
@@ -194,14 +194,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
194
194
  WS : (' '|'\n') {$channel=HIDDEN;} ;
195
195
  END
196
196
 
197
- inline_grammar(<<-'END')
197
+ inline_grammar( <<-'END' )
198
198
  tree grammar AutoWildcard2Walker;
199
199
  options {language=Ruby;output=AST; ASTLabelType=CommonTree; tokenVocab=AutoWildcard2;}
200
200
  a : ^(ID .)
201
201
  ;
202
202
  END
203
203
 
204
- inline_grammar(<<-'END')
204
+ inline_grammar( <<-'END' )
205
205
  grammar AutoWildcardWithLabel;
206
206
  options {language=Ruby;output=AST;}
207
207
  a : ID INT ;
@@ -210,14 +210,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
210
210
  WS : (' '|'\n') {$channel=HIDDEN;} ;
211
211
  END
212
212
 
213
- inline_grammar(<<-'END')
213
+ inline_grammar( <<-'END' )
214
214
  tree grammar AutoWildcardWithLabelWalker;
215
215
  options {language=Ruby;output=AST; ASTLabelType=CommonTree; tokenVocab=AutoWildcardWithLabel;}
216
216
  a : ID c=.
217
217
  ;
218
218
  END
219
219
 
220
- inline_grammar(<<-'END')
220
+ inline_grammar( <<-'END' )
221
221
  grammar AutoWildcardWithListLabel;
222
222
  options {language=Ruby;output=AST;}
223
223
  a : ID INT ;
@@ -226,14 +226,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
226
226
  WS : (' '|'\n') {$channel=HIDDEN;} ;
227
227
  END
228
228
 
229
- inline_grammar(<<-'END')
229
+ inline_grammar( <<-'END' )
230
230
  tree grammar AutoWildcardWithListLabelWalker;
231
231
  options {language=Ruby;output=AST; ASTLabelType=CommonTree; tokenVocab=AutoWildcardWithListLabel;}
232
232
  a : ID c+=.
233
233
  ;
234
234
  END
235
235
 
236
- inline_grammar(<<-'END')
236
+ inline_grammar( <<-'END' )
237
237
  grammar AutoDupMultiple;
238
238
  options {
239
239
  language=Ruby;
@@ -245,7 +245,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
245
245
  WS : (' '|'\n') {$channel=HIDDEN;} ;
246
246
  END
247
247
 
248
- inline_grammar(<<-'END')
248
+ inline_grammar( <<-'END' )
249
249
  tree grammar AutoDupMultipleWalker;
250
250
  options {
251
251
  language=Ruby;
@@ -257,7 +257,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
257
257
  ;
258
258
  END
259
259
 
260
- inline_grammar(<<-'END')
260
+ inline_grammar( <<-'END' )
261
261
  grammar AutoDupTree;
262
262
  options {
263
263
  language=Ruby;
@@ -269,7 +269,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
269
269
  WS : (' '|'\n') {$channel=HIDDEN;} ;
270
270
  END
271
271
 
272
- inline_grammar(<<-'END')
272
+ inline_grammar( <<-'END' )
273
273
  tree grammar AutoDupTreeWalker;
274
274
  options {
275
275
  language=Ruby;
@@ -281,7 +281,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
281
281
  ;
282
282
  END
283
283
 
284
- inline_grammar(<<-'END')
284
+ inline_grammar( <<-'END' )
285
285
  grammar AutoDupTreeWithLabels;
286
286
  options {
287
287
  language=Ruby;
@@ -293,7 +293,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
293
293
  WS : (' '|'\n') {$channel=HIDDEN;} ;
294
294
  END
295
295
 
296
- inline_grammar(<<-'END')
296
+ inline_grammar( <<-'END' )
297
297
  tree grammar AutoDupTreeWithLabelsWalker;
298
298
  options {
299
299
  language=Ruby;
@@ -305,7 +305,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
305
305
  ;
306
306
  END
307
307
 
308
- inline_grammar(<<-'END')
308
+ inline_grammar( <<-'END' )
309
309
  grammar AutoDupTreeWithListLabels;
310
310
  options {
311
311
  language=Ruby;
@@ -317,7 +317,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
317
317
  WS : (' '|'\n') {$channel=HIDDEN;} ;
318
318
  END
319
319
 
320
- inline_grammar(<<-'END')
320
+ inline_grammar( <<-'END' )
321
321
  tree grammar AutoDupTreeWithListLabelsWalker;
322
322
  options {
323
323
  language=Ruby;
@@ -329,7 +329,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
329
329
  ;
330
330
  END
331
331
 
332
- inline_grammar(<<-'END')
332
+ inline_grammar( <<-'END' )
333
333
  grammar AutoDupTreeWithRuleRoot;
334
334
  options {
335
335
  language=Ruby;
@@ -341,7 +341,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
341
341
  WS : (' '|'\n') {$channel=HIDDEN;} ;
342
342
  END
343
343
 
344
- inline_grammar(<<-'END')
344
+ inline_grammar( <<-'END' )
345
345
  tree grammar AutoDupTreeWithRuleRootWalker;
346
346
  options {
347
347
  language=Ruby;
@@ -353,7 +353,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
353
353
  b : ID ;
354
354
  END
355
355
 
356
- inline_grammar(<<-'END')
356
+ inline_grammar( <<-'END' )
357
357
  grammar AutoDupTreeWithRuleRootAndLabels;
358
358
  options {
359
359
  language=Ruby;
@@ -365,7 +365,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
365
365
  WS : (' '|'\n') {$channel=HIDDEN;} ;
366
366
  END
367
367
 
368
- inline_grammar(<<-'END')
368
+ inline_grammar( <<-'END' )
369
369
  tree grammar AutoDupTreeWithRuleRootAndLabelsWalker;
370
370
  options {
371
371
  language=Ruby;
@@ -377,7 +377,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
377
377
  b : ID ;
378
378
  END
379
379
 
380
- inline_grammar(<<-'END')
380
+ inline_grammar( <<-'END' )
381
381
  grammar AutoDupTreeWithRuleRootAndListLabels;
382
382
  options {
383
383
  language=Ruby;
@@ -389,7 +389,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
389
389
  WS : (' '|'\n') {$channel=HIDDEN;} ;
390
390
  END
391
391
 
392
- inline_grammar(<<-'END')
392
+ inline_grammar( <<-'END' )
393
393
  tree grammar AutoDupTreeWithRuleRootAndListLabelsWalker;
394
394
  options {
395
395
  language=Ruby;
@@ -402,7 +402,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
402
402
  c : INT ;
403
403
  END
404
404
 
405
- inline_grammar(<<-'END')
405
+ inline_grammar( <<-'END' )
406
406
  grammar AutoDupNestedTree;
407
407
  options {
408
408
  language=Ruby;
@@ -414,7 +414,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
414
414
  WS : (' '|'\n') {$channel=HIDDEN;} ;
415
415
  END
416
416
 
417
- inline_grammar(<<-'END')
417
+ inline_grammar( <<-'END' )
418
418
  tree grammar AutoDupNestedTreeWalker;
419
419
  options {
420
420
  language=Ruby;
@@ -426,7 +426,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
426
426
  ;
427
427
  END
428
428
 
429
- inline_grammar(<<-'END')
429
+ inline_grammar( <<-'END' )
430
430
  grammar Delete;
431
431
  options {
432
432
  language=Ruby;
@@ -438,7 +438,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
438
438
  WS : (' '|'\n') {$channel=HIDDEN;} ;
439
439
  END
440
440
 
441
- inline_grammar(<<-'END')
441
+ inline_grammar( <<-'END' )
442
442
  tree grammar DeleteWalker;
443
443
  options {
444
444
  language=Ruby;
@@ -450,7 +450,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
450
450
  ;
451
451
  END
452
452
 
453
- inline_grammar(<<-'END')
453
+ inline_grammar( <<-'END' )
454
454
  grammar SetMatchNoRewrite;
455
455
  options {
456
456
  language=Ruby;
@@ -462,7 +462,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
462
462
  WS : (' '|'\n') {$channel=HIDDEN;} ;
463
463
  END
464
464
 
465
- inline_grammar(<<-'END')
465
+ inline_grammar( <<-'END' )
466
466
  tree grammar SetMatchNoRewriteWalker;
467
467
  options {
468
468
  language=Ruby;
@@ -474,7 +474,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
474
474
  b : ID | INT;
475
475
  END
476
476
 
477
- inline_grammar(<<-'END')
477
+ inline_grammar( <<-'END' )
478
478
  grammar SetOptionalMatchNoRewrite;
479
479
  options {
480
480
  language=Ruby;
@@ -486,7 +486,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
486
486
  WS : (' '|'\n') {$channel=HIDDEN;} ;
487
487
  END
488
488
 
489
- inline_grammar(<<-'END')
489
+ inline_grammar( <<-'END' )
490
490
  tree grammar SetOptionalMatchNoRewriteWalker;
491
491
  options {
492
492
  language=Ruby;
@@ -497,7 +497,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
497
497
  a : (ID|INT)? INT ;
498
498
  END
499
499
 
500
- inline_grammar(<<-'END')
500
+ inline_grammar( <<-'END' )
501
501
  grammar SetMatchNoRewriteLevel2;
502
502
  options {
503
503
  language=Ruby;
@@ -509,7 +509,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
509
509
  WS : (' '|'\n') {$channel=HIDDEN;} ;
510
510
  END
511
511
 
512
- inline_grammar(<<-'END')
512
+ inline_grammar( <<-'END' )
513
513
  tree grammar SetMatchNoRewriteLevel2Walker;
514
514
  options {
515
515
  language=Ruby;
@@ -520,7 +520,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
520
520
  a : ^(ID (ID | INT) ) ;
521
521
  END
522
522
 
523
- inline_grammar(<<-'END')
523
+ inline_grammar( <<-'END' )
524
524
  grammar SetMatchNoRewriteLevel2Root;
525
525
  options {
526
526
  language=Ruby;
@@ -532,7 +532,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
532
532
  WS : (' '|'\n') {$channel=HIDDEN;} ;
533
533
  END
534
534
 
535
- inline_grammar(<<-'END')
535
+ inline_grammar( <<-'END' )
536
536
  tree grammar SetMatchNoRewriteLevel2RootWalker;
537
537
  options {
538
538
  language=Ruby;
@@ -543,7 +543,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
543
543
  a : ^((ID | INT) INT) ;
544
544
  END
545
545
 
546
- inline_grammar(<<-END)
546
+ inline_grammar( <<-END )
547
547
  grammar RewriteModeCombinedRewriteAndAuto;
548
548
  options {
549
549
  language=Ruby;
@@ -555,7 +555,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
555
555
  WS : (' '|'\\n') {$channel=HIDDEN;} ;
556
556
  END
557
557
 
558
- inline_grammar(<<-END)
558
+ inline_grammar( <<-END )
559
559
  tree grammar RewriteModeCombinedRewriteAndAutoTree;
560
560
  options {
561
561
  language=Ruby;
@@ -569,7 +569,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
569
569
  ;
570
570
  END
571
571
 
572
- inline_grammar(<<-'END')
572
+ inline_grammar( <<-'END' )
573
573
  grammar RewriteModeFlatTree;
574
574
  options {
575
575
  language=Ruby;
@@ -581,7 +581,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
581
581
  WS : (' '|'\n') {$channel=HIDDEN;} ;
582
582
  END
583
583
 
584
- inline_grammar(<<-'END')
584
+ inline_grammar( <<-'END' )
585
585
  tree grammar RewriteModeFlatTreeWalker;
586
586
  options {
587
587
  language=Ruby;
@@ -595,7 +595,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
595
595
  ;
596
596
  END
597
597
 
598
- inline_grammar(<<-'END')
598
+ inline_grammar( <<-'END' )
599
599
  grammar RewriteModeChainRuleFlatTree;
600
600
  options {language=Ruby; output=AST;}
601
601
  a : ID INT -> ID INT | INT ;
@@ -604,7 +604,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
604
604
  WS : (' '|'\n') {$channel=HIDDEN;} ;
605
605
  END
606
606
 
607
- inline_grammar(<<-'END')
607
+ inline_grammar( <<-'END' )
608
608
  tree grammar RewriteModeChainRuleFlatTreeWalker;
609
609
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleFlatTree; rewrite=true;}
610
610
  s : a ;
@@ -613,7 +613,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
613
613
  ;
614
614
  END
615
615
 
616
- inline_grammar(<<-'END')
616
+ inline_grammar( <<-'END' )
617
617
  grammar RewriteModeChainRuleTree;
618
618
  options {language=Ruby; output=AST;}
619
619
  a : ID INT -> ^(ID INT) ;
@@ -622,7 +622,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
622
622
  WS : (' '|'\n') {$channel=HIDDEN;} ;
623
623
  END
624
624
 
625
- inline_grammar(<<-'END')
625
+ inline_grammar( <<-'END' )
626
626
  tree grammar RewriteModeChainRuleTreeWalker;
627
627
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleTree; rewrite=true;}
628
628
  s : a ;
@@ -631,7 +631,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
631
631
  ;
632
632
  END
633
633
 
634
- inline_grammar(<<-'END')
634
+ inline_grammar( <<-'END' )
635
635
  grammar RewriteModeChainRuleTree2;
636
636
  options {language=Ruby; output=AST;}
637
637
  a : ID INT -> ^(ID INT) ;
@@ -640,7 +640,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
640
640
  WS : (' '|'\n') {$channel=HIDDEN;} ;
641
641
  END
642
642
 
643
- inline_grammar(<<-'END')
643
+ inline_grammar( <<-'END' )
644
644
  tree grammar RewriteModeChainRuleTree2Walker;
645
645
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleTree2; rewrite=true;}
646
646
  tokens { X; }
@@ -650,7 +650,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
650
650
  ;
651
651
  END
652
652
 
653
- inline_grammar(<<-'END')
653
+ inline_grammar( <<-'END' )
654
654
  grammar RewriteModeChainRuleTree3;
655
655
  options {language=Ruby; output=AST;}
656
656
  a : 'boo' ID INT -> 'boo' ^(ID INT) ;
@@ -659,7 +659,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
659
659
  WS : (' '|'\n') {$channel=HIDDEN;} ;
660
660
  END
661
661
 
662
- inline_grammar(<<-'END')
662
+ inline_grammar( <<-'END' )
663
663
  tree grammar RewriteModeChainRuleTree3Walker;
664
664
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleTree3; rewrite=true;}
665
665
  tokens { X; }
@@ -669,7 +669,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
669
669
  ;
670
670
  END
671
671
 
672
- inline_grammar(<<-'END')
672
+ inline_grammar( <<-'END' )
673
673
  grammar RewriteModeChainRuleTree4;
674
674
  options {language=Ruby; output=AST;}
675
675
  a : 'boo' ID INT -> ^('boo' ^(ID INT)) ;
@@ -678,7 +678,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
678
678
  WS : (' '|'\n') {$channel=HIDDEN;} ;
679
679
  END
680
680
 
681
- inline_grammar(<<-'END')
681
+ inline_grammar( <<-'END' )
682
682
  tree grammar RewriteModeChainRuleTree4Walker;
683
683
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleTree4; rewrite=true;}
684
684
  tokens { X; }
@@ -688,7 +688,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
688
688
  ;
689
689
  END
690
690
 
691
- inline_grammar(<<-'END')
691
+ inline_grammar( <<-'END' )
692
692
  grammar RewriteModeChainRuleTree5;
693
693
  options {language=Ruby; output=AST;}
694
694
  a : 'boo' ID INT -> ^('boo' ^(ID INT)) ;
@@ -697,7 +697,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
697
697
  WS : (' '|'\n') {$channel=HIDDEN;} ;
698
698
  END
699
699
 
700
- inline_grammar(<<-'END')
700
+ inline_grammar( <<-'END' )
701
701
  tree grammar RewriteModeChainRuleTree5Walker;
702
702
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteModeChainRuleTree5; rewrite=true;}
703
703
  tokens { X; }
@@ -707,7 +707,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
707
707
  ;
708
708
  END
709
709
 
710
- inline_grammar(<<-'END')
710
+ inline_grammar( <<-'END' )
711
711
  grammar RewriteOfRuleRef;
712
712
  options {language=Ruby; output=AST;}
713
713
  a : ID INT -> ID INT | INT ;
@@ -716,14 +716,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
716
716
  WS : (' '|'\n') {$channel=HIDDEN;} ;
717
717
  END
718
718
 
719
- inline_grammar(<<-'END')
719
+ inline_grammar( <<-'END' )
720
720
  tree grammar RewriteOfRuleRefWalker;
721
721
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRef; rewrite=true;}
722
722
  s : a -> a ;
723
723
  a : ID INT -> ID INT ;
724
724
  END
725
725
 
726
- inline_grammar(<<-'END')
726
+ inline_grammar( <<-'END' )
727
727
  grammar RewriteOfRuleRefRoot;
728
728
  options {language=Ruby; output=AST;}
729
729
  a : ID INT INT -> ^(INT ^(ID INT));
@@ -732,14 +732,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
732
732
  WS : (' '|'\n') {$channel=HIDDEN;} ;
733
733
  END
734
734
 
735
- inline_grammar(<<-'END')
735
+ inline_grammar( <<-'END' )
736
736
  tree grammar RewriteOfRuleRefRootWalker;
737
737
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefRoot; rewrite=true;}
738
738
  s : ^(a ^(ID INT)) -> a ;
739
739
  a : INT ;
740
740
  END
741
741
 
742
- inline_grammar(<<-'END')
742
+ inline_grammar( <<-'END' )
743
743
  grammar RewriteOfRuleRefRootLabeled;
744
744
  options {language=Ruby; output=AST;}
745
745
  a : ID INT INT -> ^(INT ^(ID INT));
@@ -748,14 +748,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
748
748
  WS : (' '|'\n') {$channel=HIDDEN;} ;
749
749
  END
750
750
 
751
- inline_grammar(<<-'END')
751
+ inline_grammar( <<-'END' )
752
752
  tree grammar RewriteOfRuleRefRootLabeledWalker;
753
753
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefRootLabeled; rewrite=true;}
754
754
  s : ^(label=a ^(ID INT)) -> a ;
755
755
  a : INT ;
756
756
  END
757
757
 
758
- inline_grammar(<<-'END')
758
+ inline_grammar( <<-'END' )
759
759
  grammar RewriteOfRuleRefRootListLabeled;
760
760
  options {language=Ruby; output=AST;}
761
761
  a : ID INT INT -> ^(INT ^(ID INT));
@@ -764,14 +764,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
764
764
  WS : (' '|'\n') {$channel=HIDDEN;} ;
765
765
  END
766
766
 
767
- inline_grammar(<<-'END')
767
+ inline_grammar( <<-'END' )
768
768
  tree grammar RewriteOfRuleRefRootListLabeledWalker;
769
769
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefRootListLabeled; rewrite=true;}
770
770
  s : ^(label+=a ^(ID INT)) -> a ;
771
771
  a : INT ;
772
772
  END
773
773
 
774
- inline_grammar(<<-'END')
774
+ inline_grammar( <<-'END' )
775
775
  grammar RewriteOfRuleRefChild;
776
776
  options {language=Ruby; output=AST;}
777
777
  a : ID INT -> ^(ID ^(INT INT));
@@ -780,14 +780,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
780
780
  WS : (' '|'\n') {$channel=HIDDEN;} ;
781
781
  END
782
782
 
783
- inline_grammar(<<-'END')
783
+ inline_grammar( <<-'END' )
784
784
  tree grammar RewriteOfRuleRefChildWalker;
785
785
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefChild; rewrite=true;}
786
786
  s : ^(ID a) -> a ;
787
787
  a : ^(INT INT) ;
788
788
  END
789
789
 
790
- inline_grammar(<<-'END')
790
+ inline_grammar( <<-'END' )
791
791
  grammar RewriteOfRuleRefLabel;
792
792
  options {language=Ruby; output=AST;}
793
793
  a : ID INT -> ^(ID ^(INT INT));
@@ -796,14 +796,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
796
796
  WS : (' '|'\n') {$channel=HIDDEN;} ;
797
797
  END
798
798
 
799
- inline_grammar(<<-'END')
799
+ inline_grammar( <<-'END' )
800
800
  tree grammar RewriteOfRuleRefLabelWalker;
801
801
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefLabel; rewrite=true;}
802
802
  s : ^(ID label=a) -> a ;
803
803
  a : ^(INT INT) ;
804
804
  END
805
805
 
806
- inline_grammar(<<-'END')
806
+ inline_grammar( <<-'END' )
807
807
  grammar RewriteOfRuleRefListLabel;
808
808
  options {language=Ruby; output=AST;}
809
809
  a : ID INT -> ^(ID ^(INT INT));
@@ -812,14 +812,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
812
812
  WS : (' '|'\n') {$channel=HIDDEN;} ;
813
813
  END
814
814
 
815
- inline_grammar(<<-'END')
815
+ inline_grammar( <<-'END' )
816
816
  tree grammar RewriteOfRuleRefListLabelWalker;
817
817
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=RewriteOfRuleRefListLabel; rewrite=true;}
818
818
  s : ^(ID label+=a) -> a ;
819
819
  a : ^(INT INT) ;
820
820
  END
821
821
 
822
- inline_grammar(<<-'END')
822
+ inline_grammar( <<-'END' )
823
823
  grammar RewriteModeWithPredicatedRewrites;
824
824
  options {
825
825
  language=Ruby;
@@ -831,7 +831,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
831
831
  WS : (' '|'\n') {$channel=HIDDEN;} ;
832
832
  END
833
833
 
834
- inline_grammar(<<-'END')
834
+ inline_grammar( <<-'END' )
835
835
  tree grammar RewriteModeWithPredicatedRewritesWalker;
836
836
  options {
837
837
  language=Ruby;
@@ -848,7 +848,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
848
848
  ;
849
849
  END
850
850
 
851
- inline_grammar(<<-'END')
851
+ inline_grammar( <<-'END' )
852
852
  grammar WildcardSingleNode;
853
853
  options {
854
854
  language=Ruby;
@@ -860,7 +860,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
860
860
  WS : (' '|'\n') {$channel=HIDDEN;} ;
861
861
  END
862
862
 
863
- inline_grammar(<<-'END')
863
+ inline_grammar( <<-'END' )
864
864
  tree grammar WildcardSingleNodeWalker;
865
865
  options {
866
866
  language=Ruby;
@@ -872,7 +872,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
872
872
  ;
873
873
  END
874
874
 
875
- inline_grammar(<<-'END')
875
+ inline_grammar( <<-'END' )
876
876
  grammar WildcardUnlabeledSingleNode;
877
877
  options {language=Ruby; output=AST;}
878
878
  a : ID INT -> ^(ID INT);
@@ -881,14 +881,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
881
881
  WS : (' '|'\n') {$channel=HIDDEN;} ;
882
882
  END
883
883
 
884
- inline_grammar(<<-'END')
884
+ inline_grammar( <<-'END' )
885
885
  tree grammar WildcardUnlabeledSingleNodeWalker;
886
886
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=WildcardUnlabeledSingleNode;}
887
887
  s : ^(ID .) -> ID
888
888
  ;
889
889
  END
890
890
 
891
- inline_grammar(<<-'END')
891
+ inline_grammar( <<-'END' )
892
892
  grammar WildcardListLabel;
893
893
  options {language=Ruby; output=AST;}
894
894
  a : INT INT INT ;
@@ -897,14 +897,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
897
897
  WS : (' '|'\n') {$channel=HIDDEN;} ;
898
898
  END
899
899
 
900
- inline_grammar(<<-'END')
900
+ inline_grammar( <<-'END' )
901
901
  tree grammar WildcardListLabelWalker;
902
902
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=WildcardListLabel;}
903
903
  s : (c+=.)+ -> $c+
904
904
  ;
905
905
  END
906
906
 
907
- inline_grammar(<<-'END')
907
+ inline_grammar( <<-'END' )
908
908
  grammar WildcardListLabel2;
909
909
  options {language=Ruby; output=AST; ASTLabelType=CommonTree;}
910
910
  a : x=INT y=INT z=INT -> ^($x ^($y $z) ^($y $z));
@@ -913,14 +913,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
913
913
  WS : (' '|'\n') {$channel=HIDDEN;} ;
914
914
  END
915
915
 
916
- inline_grammar(<<-'END')
916
+ inline_grammar( <<-'END' )
917
917
  tree grammar WildcardListLabel2Walker;
918
918
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=WildcardListLabel2; rewrite=true;}
919
919
  s : ^(INT (c+=.)+) -> $c+
920
920
  ;
921
921
  END
922
922
 
923
- inline_grammar(<<-'END')
923
+ inline_grammar( <<-'END' )
924
924
  grammar WildcardGrabsSubtree;
925
925
  options {language=Ruby; output=AST;}
926
926
  a : ID x=INT y=INT z=INT -> ^(ID[\"root\"] ^($x $y $z));
@@ -929,14 +929,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
929
929
  WS : (' '|'\n') {$channel=HIDDEN;} ;
930
930
  END
931
931
 
932
- inline_grammar(<<-'END')
932
+ inline_grammar( <<-'END' )
933
933
  tree grammar WildcardGrabsSubtreeWalker;
934
934
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=WildcardGrabsSubtree;}
935
935
  s : ^(ID c=.) -> $c
936
936
  ;
937
937
  END
938
938
 
939
- inline_grammar(<<-'END')
939
+ inline_grammar( <<-'END' )
940
940
  grammar WildcardGrabsSubtree2;
941
941
  options {language=Ruby; output=AST;}
942
942
  a : ID x=INT y=INT z=INT -> ID ^($x $y $z);
@@ -945,14 +945,14 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
945
945
  WS : (' '|'\n') {$channel=HIDDEN;} ;
946
946
  END
947
947
 
948
- inline_grammar(<<-'END')
948
+ inline_grammar( <<-'END' )
949
949
  tree grammar WildcardGrabsSubtree2Walker;
950
950
  options {language=Ruby; output=AST; ASTLabelType=CommonTree; tokenVocab=WildcardGrabsSubtree2;}
951
951
  s : ID c=. -> $c
952
952
  ;
953
953
  END
954
954
 
955
- inline_grammar(<<-END)
955
+ inline_grammar( <<-END )
956
956
  grammar CombinedRewriteAndAuto;
957
957
  options {
958
958
  language=Ruby;
@@ -964,7 +964,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
964
964
  WS : (' '|'\\n') {$channel=HIDDEN;} ;
965
965
  END
966
966
 
967
- inline_grammar(<<-END)
967
+ inline_grammar( <<-END )
968
968
  tree grammar CombinedRewriteAndAutoWalker;
969
969
  options {
970
970
  language=Ruby;
@@ -975,7 +975,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
975
975
  a : ^(ID INT) -> ^(INT ID) | INT;
976
976
  END
977
977
 
978
- inline_grammar(<<-END)
978
+ inline_grammar( <<-END )
979
979
  grammar RewriteModeCombinedRewriteAndAuto;
980
980
  options {
981
981
  language=Ruby;
@@ -987,7 +987,7 @@ class TestASTRewritingTreeParsers < ANTLR3::Test::Functional
987
987
  WS : (' '|'\\n') {$channel=HIDDEN;} ;
988
988
  END
989
989
 
990
- inline_grammar(<<-END)
990
+ inline_grammar( <<-END )
991
991
  tree grammar RewriteModeCombinedRewriteAndAutoWalker;
992
992
  options {
993
993
  language=Ruby;