antlr3 1.7.2 → 1.7.5
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.
- data/History.txt +29 -0
- data/Manifest.txt +2 -2
- data/bin/antlr4ruby +1 -1
- data/java/antlr-full-3.2.1.jar +0 -0
- data/lib/antlr3.rb +18 -12
- data/lib/antlr3/main.rb +10 -8
- data/lib/antlr3/task.rb +12 -2
- data/lib/antlr3/template/group-file-lexer.rb +187 -189
- data/lib/antlr3/template/group-file-parser.rb +116 -116
- data/lib/antlr3/version.rb +1 -1
- data/{Rakefile → rakefile} +0 -0
- data/templates/Ruby.stg +4 -4
- data/templates/Support.stg +0 -0
- data/test/functional/debugging/rule-tracing.rb +1 -1
- metadata +4 -3
@@ -2,21 +2,21 @@
|
|
2
2
|
#
|
3
3
|
# GroupFile.g
|
4
4
|
#
|
5
|
-
# Generated using ANTLR version: 3.2.1-SNAPSHOT
|
6
|
-
# Ruby runtime library version: 1.
|
5
|
+
# Generated using ANTLR version: 3.2.1-SNAPSHOT Apr 29, 2010 11:36:19
|
6
|
+
# Ruby runtime library version: 1.7.3
|
7
7
|
# Input grammar file: GroupFile.g
|
8
|
-
# Generated at: 2010-
|
8
|
+
# Generated at: 2010-05-16 18:30:20
|
9
9
|
#
|
10
10
|
|
11
11
|
# ~~~> start load path setup
|
12
12
|
this_directory = File.expand_path( File.dirname( __FILE__ ) )
|
13
|
-
|
13
|
+
$LOAD_PATH.unshift( this_directory ) unless $LOAD_PATH.include?( this_directory )
|
14
14
|
|
15
15
|
antlr_load_failed = proc do
|
16
16
|
load_path = $LOAD_PATH.map { |dir| ' - ' << dir }.join( $/ )
|
17
17
|
raise LoadError, <<-END.strip!
|
18
18
|
|
19
|
-
Failed to load the ANTLR3 runtime library (version 1.
|
19
|
+
Failed to load the ANTLR3 runtime library (version 1.7.3):
|
20
20
|
|
21
21
|
Ensure the library has been installed on your system and is available
|
22
22
|
on the load path. If rubygems is available on your system, this can
|
@@ -46,7 +46,7 @@ rescue LoadError
|
|
46
46
|
|
47
47
|
# 3: try to activate the antlr3 gem
|
48
48
|
begin
|
49
|
-
Gem.activate( 'antlr3', '~> 1.
|
49
|
+
Gem.activate( 'antlr3', '~> 1.7.3' )
|
50
50
|
rescue Gem::LoadError
|
51
51
|
antlr_load_failed.call
|
52
52
|
end
|
@@ -70,7 +70,7 @@ module GroupFile
|
|
70
70
|
# TokenData defines all of the token type integer values
|
71
71
|
# as constants, which will be included in all
|
72
72
|
# ANTLR-generated recognizers.
|
73
|
-
const_defined?(:TokenData) or TokenData = ANTLR3::TokenScheme.new
|
73
|
+
const_defined?( :TokenData ) or TokenData = ANTLR3::TokenScheme.new
|
74
74
|
|
75
75
|
module TokenData
|
76
76
|
|
@@ -102,7 +102,11 @@ module GroupFile
|
|
102
102
|
|
103
103
|
include TokenData
|
104
104
|
|
105
|
-
|
105
|
+
begin
|
106
|
+
generated_using( "GroupFile.g", "3.2.1-SNAPSHOT Apr 29, 2010 11:36:19", "1.7.3" )
|
107
|
+
rescue NoMethodError => error
|
108
|
+
# ignore
|
109
|
+
end
|
106
110
|
|
107
111
|
def initialize( input, options = {} )
|
108
112
|
super( input, options )
|
@@ -165,9 +169,9 @@ module GroupFile
|
|
165
169
|
# (in GroupFile.g)
|
166
170
|
# 79:1: group_spec[ namespace ] returns [ group ] : ( group_name[ $namespace ] | ) ( member[ $group ] )* ;
|
167
171
|
#
|
168
|
-
def group_spec(namespace)
|
172
|
+
def group_spec( namespace )
|
169
173
|
# -> uncomment the next line to manually enable rule tracing
|
170
|
-
# trace_in(__method__, 1)
|
174
|
+
# trace_in( __method__, 1 )
|
171
175
|
group = nil
|
172
176
|
group_name1 = nil
|
173
177
|
|
@@ -175,21 +179,20 @@ module GroupFile
|
|
175
179
|
# at line 80:5: ( group_name[ $namespace ] | ) ( member[ $group ] )*
|
176
180
|
# at line 80:5: ( group_name[ $namespace ] | )
|
177
181
|
alt_1 = 2
|
178
|
-
look_1_0 = @input.peek(1)
|
182
|
+
look_1_0 = @input.peek( 1 )
|
179
183
|
|
180
|
-
if (look_1_0 == T__10)
|
184
|
+
if ( look_1_0 == T__10 )
|
181
185
|
alt_1 = 1
|
182
|
-
elsif (look_1_0 == EOF || look_1_0 == ID)
|
186
|
+
elsif ( look_1_0 == EOF || look_1_0 == ID )
|
183
187
|
alt_1 = 2
|
184
188
|
else
|
185
|
-
|
186
|
-
raise nvae
|
189
|
+
raise NoViableAlternative( "", 1, 0 )
|
187
190
|
end
|
188
191
|
case alt_1
|
189
192
|
when 1
|
190
193
|
# at line 80:7: group_name[ $namespace ]
|
191
|
-
@state.following.push(TOKENS_FOLLOWING_group_name_IN_group_spec_85)
|
192
|
-
group_name1 = group_name(namespace)
|
194
|
+
@state.following.push( TOKENS_FOLLOWING_group_name_IN_group_spec_85 )
|
195
|
+
group_name1 = group_name( namespace )
|
193
196
|
@state.following.pop
|
194
197
|
# --> action
|
195
198
|
group = group_name1
|
@@ -205,17 +208,17 @@ module GroupFile
|
|
205
208
|
# at line 83:5: ( member[ $group ] )*
|
206
209
|
while true # decision 2
|
207
210
|
alt_2 = 2
|
208
|
-
look_2_0 = @input.peek(1)
|
211
|
+
look_2_0 = @input.peek( 1 )
|
209
212
|
|
210
|
-
if (look_2_0 == ID)
|
213
|
+
if ( look_2_0 == ID )
|
211
214
|
alt_2 = 1
|
212
215
|
|
213
216
|
end
|
214
217
|
case alt_2
|
215
218
|
when 1
|
216
219
|
# at line 83:5: member[ $group ]
|
217
|
-
@state.following.push(TOKENS_FOLLOWING_member_IN_group_spec_108)
|
218
|
-
member(group)
|
220
|
+
@state.following.push( TOKENS_FOLLOWING_member_IN_group_spec_108 )
|
221
|
+
member( group )
|
219
222
|
@state.following.pop
|
220
223
|
|
221
224
|
else
|
@@ -229,7 +232,7 @@ module GroupFile
|
|
229
232
|
|
230
233
|
ensure
|
231
234
|
# -> uncomment the next line to manually enable rule tracing
|
232
|
-
# trace_out(__method__, 1)
|
235
|
+
# trace_out( __method__, 1 )
|
233
236
|
|
234
237
|
end
|
235
238
|
|
@@ -243,25 +246,25 @@ module GroupFile
|
|
243
246
|
# (in GroupFile.g)
|
244
247
|
# 86:1: group_name[ namespace ] returns [ group ] : 'group' (mod= CONSTANT '::' )* name= CONSTANT ( ';' )? ;
|
245
248
|
#
|
246
|
-
def group_name(namespace)
|
249
|
+
def group_name( namespace )
|
247
250
|
# -> uncomment the next line to manually enable rule tracing
|
248
|
-
# trace_in(__method__, 2)
|
251
|
+
# trace_in( __method__, 2 )
|
249
252
|
group = nil
|
250
253
|
mod = nil
|
251
254
|
name = nil
|
252
255
|
|
253
256
|
begin
|
254
257
|
# at line 87:5: 'group' (mod= CONSTANT '::' )* name= CONSTANT ( ';' )?
|
255
|
-
match(T__10, TOKENS_FOLLOWING_T__10_IN_group_name_128)
|
258
|
+
match( T__10, TOKENS_FOLLOWING_T__10_IN_group_name_128 )
|
256
259
|
# at line 88:5: (mod= CONSTANT '::' )*
|
257
260
|
while true # decision 3
|
258
261
|
alt_3 = 2
|
259
|
-
look_3_0 = @input.peek(1)
|
262
|
+
look_3_0 = @input.peek( 1 )
|
260
263
|
|
261
|
-
if (look_3_0 == CONSTANT)
|
262
|
-
look_3_1 = @input.peek(2)
|
264
|
+
if ( look_3_0 == CONSTANT )
|
265
|
+
look_3_1 = @input.peek( 2 )
|
263
266
|
|
264
|
-
if (look_3_1 == T__11)
|
267
|
+
if ( look_3_1 == T__11 )
|
265
268
|
alt_3 = 1
|
266
269
|
|
267
270
|
end
|
@@ -270,8 +273,8 @@ module GroupFile
|
|
270
273
|
case alt_3
|
271
274
|
when 1
|
272
275
|
# at line 89:7: mod= CONSTANT '::'
|
273
|
-
mod = match(CONSTANT, TOKENS_FOLLOWING_CONSTANT_IN_group_name_144)
|
274
|
-
match(T__11, TOKENS_FOLLOWING_T__11_IN_group_name_146)
|
276
|
+
mod = match( CONSTANT, TOKENS_FOLLOWING_CONSTANT_IN_group_name_144 )
|
277
|
+
match( T__11, TOKENS_FOLLOWING_T__11_IN_group_name_146 )
|
275
278
|
# --> action
|
276
279
|
namespace = namespace.const_get( mod.text )
|
277
280
|
# <-- action
|
@@ -280,21 +283,21 @@ module GroupFile
|
|
280
283
|
break # out of loop for decision 3
|
281
284
|
end
|
282
285
|
end # loop for decision 3
|
283
|
-
name = match(CONSTANT, TOKENS_FOLLOWING_CONSTANT_IN_group_name_169)
|
286
|
+
name = match( CONSTANT, TOKENS_FOLLOWING_CONSTANT_IN_group_name_169 )
|
284
287
|
# --> action
|
285
288
|
group = fetch_group( namespace, name.text )
|
286
289
|
# <-- action
|
287
290
|
# at line 93:5: ( ';' )?
|
288
291
|
alt_4 = 2
|
289
|
-
look_4_0 = @input.peek(1)
|
292
|
+
look_4_0 = @input.peek( 1 )
|
290
293
|
|
291
|
-
if (look_4_0 == T__12)
|
294
|
+
if ( look_4_0 == T__12 )
|
292
295
|
alt_4 = 1
|
293
296
|
end
|
294
297
|
case alt_4
|
295
298
|
when 1
|
296
299
|
# at line 93:5: ';'
|
297
|
-
match(T__12, TOKENS_FOLLOWING_T__12_IN_group_name_177)
|
300
|
+
match( T__12, TOKENS_FOLLOWING_T__12_IN_group_name_177 )
|
298
301
|
|
299
302
|
end
|
300
303
|
|
@@ -304,7 +307,7 @@ module GroupFile
|
|
304
307
|
|
305
308
|
ensure
|
306
309
|
# -> uncomment the next line to manually enable rule tracing
|
307
|
-
# trace_out(__method__, 2)
|
310
|
+
# trace_out( __method__, 2 )
|
308
311
|
|
309
312
|
end
|
310
313
|
|
@@ -318,9 +321,9 @@ module GroupFile
|
|
318
321
|
# (in GroupFile.g)
|
319
322
|
# 96:1: member[ group ] : name= ID ( parameter_declaration )? '::=' (aliased= ID | TEMPLATE | STRING ) ;
|
320
323
|
#
|
321
|
-
def member(group)
|
324
|
+
def member( group )
|
322
325
|
# -> uncomment the next line to manually enable rule tracing
|
323
|
-
# trace_in(__method__, 3)
|
326
|
+
# trace_in( __method__, 3 )
|
324
327
|
name = nil
|
325
328
|
aliased = nil
|
326
329
|
__TEMPLATE3__ = nil
|
@@ -331,18 +334,18 @@ module GroupFile
|
|
331
334
|
|
332
335
|
begin
|
333
336
|
# at line 98:5: name= ID ( parameter_declaration )? '::=' (aliased= ID | TEMPLATE | STRING )
|
334
|
-
name = match(ID, TOKENS_FOLLOWING_ID_IN_member_199)
|
337
|
+
name = match( ID, TOKENS_FOLLOWING_ID_IN_member_199 )
|
335
338
|
# at line 98:13: ( parameter_declaration )?
|
336
339
|
alt_5 = 2
|
337
|
-
look_5_0 = @input.peek(1)
|
340
|
+
look_5_0 = @input.peek( 1 )
|
338
341
|
|
339
|
-
if (look_5_0 == ID || look_5_0 == T__14 || look_5_0.between?(T__17, T__18))
|
342
|
+
if ( look_5_0 == ID || look_5_0 == T__14 || look_5_0.between?( T__17, T__18 ) )
|
340
343
|
alt_5 = 1
|
341
344
|
end
|
342
345
|
case alt_5
|
343
346
|
when 1
|
344
347
|
# at line 98:15: parameter_declaration
|
345
|
-
@state.following.push(TOKENS_FOLLOWING_parameter_declaration_IN_member_203)
|
348
|
+
@state.following.push( TOKENS_FOLLOWING_parameter_declaration_IN_member_203 )
|
346
349
|
parameter_declaration2 = parameter_declaration
|
347
350
|
@state.following.pop
|
348
351
|
# --> action
|
@@ -350,35 +353,34 @@ module GroupFile
|
|
350
353
|
# <-- action
|
351
354
|
|
352
355
|
end
|
353
|
-
match(T__13, TOKENS_FOLLOWING_T__13_IN_member_210)
|
356
|
+
match( T__13, TOKENS_FOLLOWING_T__13_IN_member_210 )
|
354
357
|
# at line 99:5: (aliased= ID | TEMPLATE | STRING )
|
355
358
|
alt_6 = 3
|
356
|
-
case look_6 = @input.peek(1)
|
359
|
+
case look_6 = @input.peek( 1 )
|
357
360
|
when ID then alt_6 = 1
|
358
361
|
when TEMPLATE then alt_6 = 2
|
359
362
|
when STRING then alt_6 = 3
|
360
363
|
else
|
361
|
-
|
362
|
-
raise nvae
|
364
|
+
raise NoViableAlternative( "", 6, 0 )
|
363
365
|
end
|
364
366
|
case alt_6
|
365
367
|
when 1
|
366
368
|
# at line 99:7: aliased= ID
|
367
|
-
aliased = match(ID, TOKENS_FOLLOWING_ID_IN_member_220)
|
369
|
+
aliased = match( ID, TOKENS_FOLLOWING_ID_IN_member_220 )
|
368
370
|
# --> action
|
369
371
|
group.alias_template( name.text, aliased.text )
|
370
372
|
# <-- action
|
371
373
|
|
372
374
|
when 2
|
373
375
|
# at line 100:7: TEMPLATE
|
374
|
-
__TEMPLATE3__ = match(TEMPLATE, TOKENS_FOLLOWING_TEMPLATE_IN_member_230)
|
376
|
+
__TEMPLATE3__ = match( TEMPLATE, TOKENS_FOLLOWING_TEMPLATE_IN_member_230 )
|
375
377
|
# --> action
|
376
378
|
group.define_template( name.text, extract_template( __TEMPLATE3__ ), params )
|
377
379
|
# <-- action
|
378
380
|
|
379
381
|
when 3
|
380
382
|
# at line 101:7: STRING
|
381
|
-
__STRING4__ = match(STRING, TOKENS_FOLLOWING_STRING_IN_member_242)
|
383
|
+
__STRING4__ = match( STRING, TOKENS_FOLLOWING_STRING_IN_member_242 )
|
382
384
|
# --> action
|
383
385
|
group.define_template( name.text, extract_template( __STRING4__ ), params )
|
384
386
|
# <-- action
|
@@ -391,7 +393,7 @@ module GroupFile
|
|
391
393
|
|
392
394
|
ensure
|
393
395
|
# -> uncomment the next line to manually enable rule tracing
|
394
|
-
# trace_out(__method__, 3)
|
396
|
+
# trace_out( __method__, 3 )
|
395
397
|
|
396
398
|
end
|
397
399
|
|
@@ -407,7 +409,7 @@ module GroupFile
|
|
407
409
|
#
|
408
410
|
def parameter_declaration
|
409
411
|
# -> uncomment the next line to manually enable rule tracing
|
410
|
-
# trace_in(__method__, 4)
|
412
|
+
# trace_in( __method__, 4 )
|
411
413
|
list = nil
|
412
414
|
parameters5 = nil
|
413
415
|
parameters6 = nil
|
@@ -417,31 +419,30 @@ module GroupFile
|
|
417
419
|
begin
|
418
420
|
# at line 107:3: ( '(' ( parameters )? ')' | parameters )
|
419
421
|
alt_8 = 2
|
420
|
-
look_8_0 = @input.peek(1)
|
422
|
+
look_8_0 = @input.peek( 1 )
|
421
423
|
|
422
|
-
if (look_8_0 == T__14)
|
424
|
+
if ( look_8_0 == T__14 )
|
423
425
|
alt_8 = 1
|
424
|
-
elsif (look_8_0 == ID || look_8_0.between?(T__17, T__18))
|
426
|
+
elsif ( look_8_0 == ID || look_8_0.between?( T__17, T__18 ) )
|
425
427
|
alt_8 = 2
|
426
428
|
else
|
427
|
-
|
428
|
-
raise nvae
|
429
|
+
raise NoViableAlternative( "", 8, 0 )
|
429
430
|
end
|
430
431
|
case alt_8
|
431
432
|
when 1
|
432
433
|
# at line 107:5: '(' ( parameters )? ')'
|
433
|
-
match(T__14, TOKENS_FOLLOWING_T__14_IN_parameter_declaration_276)
|
434
|
+
match( T__14, TOKENS_FOLLOWING_T__14_IN_parameter_declaration_276 )
|
434
435
|
# at line 107:9: ( parameters )?
|
435
436
|
alt_7 = 2
|
436
|
-
look_7_0 = @input.peek(1)
|
437
|
+
look_7_0 = @input.peek( 1 )
|
437
438
|
|
438
|
-
if (look_7_0 == ID || look_7_0.between?(T__17, T__18))
|
439
|
+
if ( look_7_0 == ID || look_7_0.between?( T__17, T__18 ) )
|
439
440
|
alt_7 = 1
|
440
441
|
end
|
441
442
|
case alt_7
|
442
443
|
when 1
|
443
444
|
# at line 107:11: parameters
|
444
|
-
@state.following.push(TOKENS_FOLLOWING_parameters_IN_parameter_declaration_280)
|
445
|
+
@state.following.push( TOKENS_FOLLOWING_parameters_IN_parameter_declaration_280 )
|
445
446
|
parameters5 = parameters
|
446
447
|
@state.following.pop
|
447
448
|
# --> action
|
@@ -449,11 +450,11 @@ module GroupFile
|
|
449
450
|
# <-- action
|
450
451
|
|
451
452
|
end
|
452
|
-
match(T__15, TOKENS_FOLLOWING_T__15_IN_parameter_declaration_287)
|
453
|
+
match( T__15, TOKENS_FOLLOWING_T__15_IN_parameter_declaration_287 )
|
453
454
|
|
454
455
|
when 2
|
455
456
|
# at line 108:5: parameters
|
456
|
-
@state.following.push(TOKENS_FOLLOWING_parameters_IN_parameter_declaration_293)
|
457
|
+
@state.following.push( TOKENS_FOLLOWING_parameters_IN_parameter_declaration_293 )
|
457
458
|
parameters6 = parameters
|
458
459
|
@state.following.pop
|
459
460
|
# --> action
|
@@ -467,7 +468,7 @@ module GroupFile
|
|
467
468
|
|
468
469
|
ensure
|
469
470
|
# -> uncomment the next line to manually enable rule tracing
|
470
|
-
# trace_out(__method__, 4)
|
471
|
+
# trace_out( __method__, 4 )
|
471
472
|
|
472
473
|
end
|
473
474
|
|
@@ -483,31 +484,31 @@ module GroupFile
|
|
483
484
|
#
|
484
485
|
def parameters
|
485
486
|
# -> uncomment the next line to manually enable rule tracing
|
486
|
-
# trace_in(__method__, 5)
|
487
|
+
# trace_in( __method__, 5 )
|
487
488
|
list = nil
|
488
489
|
# - - - - @init action - - - -
|
489
490
|
list = ANTLR3::Template::ParameterList.new
|
490
491
|
|
491
492
|
begin
|
492
493
|
# at line 113:5: parameter[ $list ] ( ',' parameter[ $list ] )*
|
493
|
-
@state.following.push(TOKENS_FOLLOWING_parameter_IN_parameters_317)
|
494
|
-
parameter(list)
|
494
|
+
@state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_317 )
|
495
|
+
parameter( list )
|
495
496
|
@state.following.pop
|
496
497
|
# at line 113:24: ( ',' parameter[ $list ] )*
|
497
498
|
while true # decision 9
|
498
499
|
alt_9 = 2
|
499
|
-
look_9_0 = @input.peek(1)
|
500
|
+
look_9_0 = @input.peek( 1 )
|
500
501
|
|
501
|
-
if (look_9_0 == T__16)
|
502
|
+
if ( look_9_0 == T__16 )
|
502
503
|
alt_9 = 1
|
503
504
|
|
504
505
|
end
|
505
506
|
case alt_9
|
506
507
|
when 1
|
507
508
|
# at line 113:26: ',' parameter[ $list ]
|
508
|
-
match(T__16, TOKENS_FOLLOWING_T__16_IN_parameters_322)
|
509
|
-
@state.following.push(TOKENS_FOLLOWING_parameter_IN_parameters_324)
|
510
|
-
parameter(list)
|
509
|
+
match( T__16, TOKENS_FOLLOWING_T__16_IN_parameters_322 )
|
510
|
+
@state.following.push( TOKENS_FOLLOWING_parameter_IN_parameters_324 )
|
511
|
+
parameter( list )
|
511
512
|
@state.following.pop
|
512
513
|
|
513
514
|
else
|
@@ -521,7 +522,7 @@ module GroupFile
|
|
521
522
|
|
522
523
|
ensure
|
523
524
|
# -> uncomment the next line to manually enable rule tracing
|
524
|
-
# trace_out(__method__, 5)
|
525
|
+
# trace_out( __method__, 5 )
|
525
526
|
|
526
527
|
end
|
527
528
|
|
@@ -535,58 +536,57 @@ module GroupFile
|
|
535
536
|
# (in GroupFile.g)
|
536
537
|
# 116:1: parameter[ parameters ] : ( '*' name= ID | '&' name= ID | name= ID ( '=' v= STRING )? );
|
537
538
|
#
|
538
|
-
def parameter(parameters)
|
539
|
+
def parameter( parameters )
|
539
540
|
# -> uncomment the next line to manually enable rule tracing
|
540
|
-
# trace_in(__method__, 6)
|
541
|
+
# trace_in( __method__, 6 )
|
541
542
|
name = nil
|
542
543
|
v = nil
|
543
544
|
|
544
545
|
begin
|
545
546
|
# at line 117:3: ( '*' name= ID | '&' name= ID | name= ID ( '=' v= STRING )? )
|
546
547
|
alt_11 = 3
|
547
|
-
case look_11 = @input.peek(1)
|
548
|
+
case look_11 = @input.peek( 1 )
|
548
549
|
when T__17 then alt_11 = 1
|
549
550
|
when T__18 then alt_11 = 2
|
550
551
|
when ID then alt_11 = 3
|
551
552
|
else
|
552
|
-
|
553
|
-
raise nvae
|
553
|
+
raise NoViableAlternative( "", 11, 0 )
|
554
554
|
end
|
555
555
|
case alt_11
|
556
556
|
when 1
|
557
557
|
# at line 117:5: '*' name= ID
|
558
|
-
match(T__17, TOKENS_FOLLOWING_T__17_IN_parameter_342)
|
559
|
-
name = match(ID, TOKENS_FOLLOWING_ID_IN_parameter_346)
|
558
|
+
match( T__17, TOKENS_FOLLOWING_T__17_IN_parameter_342 )
|
559
|
+
name = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_346 )
|
560
560
|
# --> action
|
561
561
|
parameters.splat = name.text
|
562
562
|
# <-- action
|
563
563
|
|
564
564
|
when 2
|
565
565
|
# at line 118:5: '&' name= ID
|
566
|
-
match(T__18, TOKENS_FOLLOWING_T__18_IN_parameter_354)
|
567
|
-
name = match(ID, TOKENS_FOLLOWING_ID_IN_parameter_358)
|
566
|
+
match( T__18, TOKENS_FOLLOWING_T__18_IN_parameter_354 )
|
567
|
+
name = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_358 )
|
568
568
|
# --> action
|
569
569
|
parameters.block = name.text
|
570
570
|
# <-- action
|
571
571
|
|
572
572
|
when 3
|
573
573
|
# at line 119:5: name= ID ( '=' v= STRING )?
|
574
|
-
name = match(ID, TOKENS_FOLLOWING_ID_IN_parameter_368)
|
574
|
+
name = match( ID, TOKENS_FOLLOWING_ID_IN_parameter_368 )
|
575
575
|
# --> action
|
576
576
|
param = ANTLR3::Template::Parameter.new( name.text )
|
577
577
|
# <-- action
|
578
578
|
# at line 120:5: ( '=' v= STRING )?
|
579
579
|
alt_10 = 2
|
580
|
-
look_10_0 = @input.peek(1)
|
580
|
+
look_10_0 = @input.peek( 1 )
|
581
581
|
|
582
|
-
if (look_10_0 == T__19)
|
582
|
+
if ( look_10_0 == T__19 )
|
583
583
|
alt_10 = 1
|
584
584
|
end
|
585
585
|
case alt_10
|
586
586
|
when 1
|
587
587
|
# at line 120:7: '=' v= STRING
|
588
|
-
match(T__19, TOKENS_FOLLOWING_T__19_IN_parameter_382)
|
589
|
-
v = match(STRING, TOKENS_FOLLOWING_STRING_IN_parameter_386)
|
588
|
+
match( T__19, TOKENS_FOLLOWING_T__19_IN_parameter_382 )
|
589
|
+
v = match( STRING, TOKENS_FOLLOWING_STRING_IN_parameter_386 )
|
590
590
|
# --> action
|
591
591
|
param.default = v.text
|
592
592
|
# <-- action
|
@@ -603,7 +603,7 @@ module GroupFile
|
|
603
603
|
|
604
604
|
ensure
|
605
605
|
# -> uncomment the next line to manually enable rule tracing
|
606
|
-
# trace_out(__method__, 6)
|
606
|
+
# trace_out( __method__, 6 )
|
607
607
|
|
608
608
|
end
|
609
609
|
|
@@ -612,33 +612,33 @@ module GroupFile
|
|
612
612
|
|
613
613
|
|
614
614
|
|
615
|
-
TOKENS_FOLLOWING_group_name_IN_group_spec_85 = Set[1, 5]
|
616
|
-
TOKENS_FOLLOWING_member_IN_group_spec_108 = Set[1, 5]
|
617
|
-
TOKENS_FOLLOWING_T__10_IN_group_name_128 = Set[4]
|
618
|
-
TOKENS_FOLLOWING_CONSTANT_IN_group_name_144 = Set[11]
|
619
|
-
TOKENS_FOLLOWING_T__11_IN_group_name_146 = Set[4]
|
620
|
-
TOKENS_FOLLOWING_CONSTANT_IN_group_name_169 = Set[1, 12]
|
621
|
-
TOKENS_FOLLOWING_T__12_IN_group_name_177 = Set[1]
|
622
|
-
TOKENS_FOLLOWING_ID_IN_member_199 = Set[5, 13, 14, 17, 18]
|
623
|
-
TOKENS_FOLLOWING_parameter_declaration_IN_member_203 = Set[13]
|
624
|
-
TOKENS_FOLLOWING_T__13_IN_member_210 = Set[5, 6, 7]
|
625
|
-
TOKENS_FOLLOWING_ID_IN_member_220 = Set[1]
|
626
|
-
TOKENS_FOLLOWING_TEMPLATE_IN_member_230 = Set[1]
|
627
|
-
TOKENS_FOLLOWING_STRING_IN_member_242 = Set[1]
|
628
|
-
TOKENS_FOLLOWING_T__14_IN_parameter_declaration_276 = Set[5, 14, 15, 17, 18]
|
629
|
-
TOKENS_FOLLOWING_parameters_IN_parameter_declaration_280 = Set[15]
|
630
|
-
TOKENS_FOLLOWING_T__15_IN_parameter_declaration_287 = Set[1]
|
631
|
-
TOKENS_FOLLOWING_parameters_IN_parameter_declaration_293 = Set[1]
|
632
|
-
TOKENS_FOLLOWING_parameter_IN_parameters_317 = Set[1, 16]
|
633
|
-
TOKENS_FOLLOWING_T__16_IN_parameters_322 = Set[5, 14, 17, 18]
|
634
|
-
TOKENS_FOLLOWING_parameter_IN_parameters_324 = Set[1, 16]
|
635
|
-
TOKENS_FOLLOWING_T__17_IN_parameter_342 = Set[5]
|
636
|
-
TOKENS_FOLLOWING_ID_IN_parameter_346 = Set[1]
|
637
|
-
TOKENS_FOLLOWING_T__18_IN_parameter_354 = Set[5]
|
638
|
-
TOKENS_FOLLOWING_ID_IN_parameter_358 = Set[1]
|
639
|
-
TOKENS_FOLLOWING_ID_IN_parameter_368 = Set[1, 19]
|
640
|
-
TOKENS_FOLLOWING_T__19_IN_parameter_382 = Set[7]
|
641
|
-
TOKENS_FOLLOWING_STRING_IN_parameter_386 = Set[1]
|
615
|
+
TOKENS_FOLLOWING_group_name_IN_group_spec_85 = Set[ 1, 5 ]
|
616
|
+
TOKENS_FOLLOWING_member_IN_group_spec_108 = Set[ 1, 5 ]
|
617
|
+
TOKENS_FOLLOWING_T__10_IN_group_name_128 = Set[ 4 ]
|
618
|
+
TOKENS_FOLLOWING_CONSTANT_IN_group_name_144 = Set[ 11 ]
|
619
|
+
TOKENS_FOLLOWING_T__11_IN_group_name_146 = Set[ 4 ]
|
620
|
+
TOKENS_FOLLOWING_CONSTANT_IN_group_name_169 = Set[ 1, 12 ]
|
621
|
+
TOKENS_FOLLOWING_T__12_IN_group_name_177 = Set[ 1 ]
|
622
|
+
TOKENS_FOLLOWING_ID_IN_member_199 = Set[ 5, 13, 14, 17, 18 ]
|
623
|
+
TOKENS_FOLLOWING_parameter_declaration_IN_member_203 = Set[ 13 ]
|
624
|
+
TOKENS_FOLLOWING_T__13_IN_member_210 = Set[ 5, 6, 7 ]
|
625
|
+
TOKENS_FOLLOWING_ID_IN_member_220 = Set[ 1 ]
|
626
|
+
TOKENS_FOLLOWING_TEMPLATE_IN_member_230 = Set[ 1 ]
|
627
|
+
TOKENS_FOLLOWING_STRING_IN_member_242 = Set[ 1 ]
|
628
|
+
TOKENS_FOLLOWING_T__14_IN_parameter_declaration_276 = Set[ 5, 14, 15, 17, 18 ]
|
629
|
+
TOKENS_FOLLOWING_parameters_IN_parameter_declaration_280 = Set[ 15 ]
|
630
|
+
TOKENS_FOLLOWING_T__15_IN_parameter_declaration_287 = Set[ 1 ]
|
631
|
+
TOKENS_FOLLOWING_parameters_IN_parameter_declaration_293 = Set[ 1 ]
|
632
|
+
TOKENS_FOLLOWING_parameter_IN_parameters_317 = Set[ 1, 16 ]
|
633
|
+
TOKENS_FOLLOWING_T__16_IN_parameters_322 = Set[ 5, 14, 17, 18 ]
|
634
|
+
TOKENS_FOLLOWING_parameter_IN_parameters_324 = Set[ 1, 16 ]
|
635
|
+
TOKENS_FOLLOWING_T__17_IN_parameter_342 = Set[ 5 ]
|
636
|
+
TOKENS_FOLLOWING_ID_IN_parameter_346 = Set[ 1 ]
|
637
|
+
TOKENS_FOLLOWING_T__18_IN_parameter_354 = Set[ 5 ]
|
638
|
+
TOKENS_FOLLOWING_ID_IN_parameter_358 = Set[ 1 ]
|
639
|
+
TOKENS_FOLLOWING_ID_IN_parameter_368 = Set[ 1, 19 ]
|
640
|
+
TOKENS_FOLLOWING_T__19_IN_parameter_382 = Set[ 7 ]
|
641
|
+
TOKENS_FOLLOWING_STRING_IN_parameter_386 = Set[ 1 ]
|
642
642
|
|
643
643
|
end # class Parser < ANTLR3::Parser
|
644
644
|
|
@@ -658,8 +658,8 @@ if __FILE__ == $0 and ARGV.first != '--'
|
|
658
658
|
# GroupFile.g
|
659
659
|
|
660
660
|
|
661
|
-
defined?(ANTLR3::Template::
|
662
|
-
ANTLR3::Template::
|
661
|
+
defined?(ANTLR3::Template::GroupFile::Lexer) or require 'antlr3/template/group-file'
|
662
|
+
ANTLR3::Template::GroupFile::Parser.main( ARGV )
|
663
663
|
|
664
664
|
# - - - - - - end action @parser::main - - - - - - -
|
665
665
|
|