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
@@ -330,24 +330,58 @@ public class RubyTarget
330
330
  String literal
331
331
  )
332
332
  {
333
+ int code_point = 0;
333
334
  literal = literal.substring( 1, literal.length() - 1 );
334
-
335
- String result = "?";
336
-
337
- if ( literal.equals( "\\" ) ) {
338
- result += "\\\\";
339
- }
340
- else if ( literal.equals( " " ) ) {
341
- result += "\\s";
342
- }
343
- else if ( literal.startsWith( "\\u" ) ) {
344
- result = "0x" + literal.substring( 2 );
345
- }
346
- else {
347
- result += literal;
335
+
336
+ if ( literal.charAt( 0 ) == '\\' ) {
337
+ switch ( literal.charAt( 1 ) ) {
338
+ case '\\':
339
+ case '"':
340
+ case '\'':
341
+ code_point = literal.codePointAt( 1 );
342
+ break;
343
+ case 'n':
344
+ code_point = 10;
345
+ break;
346
+ case 'r':
347
+ code_point = 13;
348
+ break;
349
+ case 't':
350
+ code_point = 9;
351
+ break;
352
+ case 'b':
353
+ code_point = 8;
354
+ break;
355
+ case 'f':
356
+ code_point = 12;
357
+ break;
358
+ case 'u': // Assume unnnn
359
+ code_point = Integer.parseInt( literal.substring( 2 ), 16 );
360
+ break;
361
+ default:
362
+ System.out.println( "1: hey you didn't account for this: \"" + literal + "\"" );
363
+ break;
364
+ }
365
+ } else if ( literal.length() == 1 ) {
366
+ code_point = literal.codePointAt( 0 );
367
+ } else {
368
+ System.out.println( "2: hey you didn't account for this: \"" + literal + "\"" );
348
369
  }
349
-
350
- return result;
370
+
371
+ return ( "0x" + Integer.toHexString( code_point ) );
372
+
373
+ //if ( literal.equals( "\\" ) ) {
374
+ // result += "\\\\";
375
+ //}
376
+ //else if ( literal.equals( " " ) ) {
377
+ // result += "\\s";
378
+ //}
379
+ //else if ( literal.startsWith( "\\u" ) ) {
380
+ // result = "0x" + literal.substring( 2 );
381
+ //}
382
+ //else {
383
+ // result += literal;
384
+ //}
351
385
  }
352
386
 
353
387
  public int getMaxCharValue( CodeGenerator generator )
Binary file
@@ -360,6 +360,8 @@ development goal for this project.
360
360
  =end
361
361
 
362
362
  class StringStream
363
+ NEWLINE = ?\n.ord
364
+
363
365
  include CharacterStream
364
366
 
365
367
  # current integer character index of the stream
@@ -377,24 +379,76 @@ class StringStream
377
379
 
378
380
  # the entire string that is wrapped by the stream
379
381
  attr_reader :data
382
+ attr_reader :string
380
383
 
381
- # creates a new StringStream object where +data+ is the string data to stream.
382
- # accepts the following options in a symbol-to-value hash:
383
- #
384
- # [:file or :name] the (file) name to associate with the stream; default: <tt>'(string)'</tt>
385
- # [:line] the initial line number; default: +1+
386
- # [:column] the initial column number; default: +0+
387
- #
388
- def initialize( data, options = {} )
389
- @data = data.to_s
390
- @data.equal?( data ) and @data = @data.clone
391
- @data.freeze
392
- @position = 0
393
- @line = options.fetch :line, 1
394
- @column = options.fetch :column, 0
395
- @markers = []
396
- mark
397
- @name ||= options[ :file ] || options[ :name ] # || '(string)'
384
+ if RUBY_VERSION =~ /^1\.9/
385
+
386
+ # creates a new StringStream object where +data+ is the string data to stream.
387
+ # accepts the following options in a symbol-to-value hash:
388
+ #
389
+ # [:file or :name] the (file) name to associate with the stream; default: <tt>'(string)'</tt>
390
+ # [:line] the initial line number; default: +1+
391
+ # [:column] the initial column number; default: +0+
392
+ #
393
+ def initialize( data, options = {} ) # for 1.9
394
+ @string = data.to_s.encode( Encoding::UTF_8 ).freeze
395
+ @data = @string.codepoints.to_a.freeze
396
+ @position = options.fetch :position, 0
397
+ @line = options.fetch :line, 1
398
+ @column = options.fetch :column, 0
399
+ @markers = []
400
+ @name ||= options[ :file ] || options[ :name ] # || '(string)'
401
+ mark
402
+ end
403
+
404
+ #
405
+ # identical to #peek, except it returns the character value as a String
406
+ #
407
+ def look( k = 1 ) # for 1.9
408
+ k == 0 and return nil
409
+ k += 1 if k < 0
410
+
411
+ index = @position + k - 1
412
+ index < 0 and return nil
413
+
414
+ @string[ index ]
415
+ end
416
+
417
+ else
418
+
419
+ # creates a new StringStream object where +data+ is the string data to stream.
420
+ # accepts the following options in a symbol-to-value hash:
421
+ #
422
+ # [:file or :name] the (file) name to associate with the stream; default: <tt>'(string)'</tt>
423
+ # [:line] the initial line number; default: +1+
424
+ # [:column] the initial column number; default: +0+
425
+ #
426
+ def initialize( data, options = {} ) # for 1.8
427
+ @data = data.to_s
428
+ @data.equal?( data ) and @data = @data.clone
429
+ @data.freeze
430
+ @string = @data
431
+ @position = options.fetch :position, 0
432
+ @line = options.fetch :line, 1
433
+ @column = options.fetch :column, 0
434
+ @markers = []
435
+ @name ||= options[ :file ] || options[ :name ] # || '(string)'
436
+ mark
437
+ end
438
+
439
+ #
440
+ # identical to #peek, except it returns the character value as a String
441
+ #
442
+ def look( k = 1 ) # for 1.8
443
+ k == 0 and return nil
444
+ k += 1 if k < 0
445
+
446
+ index = @position + k - 1
447
+ index < 0 and return nil
448
+
449
+ c = @data[ index ] and c.chr
450
+ end
451
+
398
452
  end
399
453
 
400
454
  def size
@@ -407,10 +461,10 @@ class StringStream
407
461
  # rewinds the stream back to the start and clears out any existing marker entries
408
462
  #
409
463
  def reset
410
- @position = 0
411
- @line = 1
412
- @column = 0
464
+ initial_location = @markers.first
465
+ @position, @line, @column = initial_location
413
466
  @markers.clear
467
+ @markers << initial_location
414
468
  return self
415
469
  end
416
470
 
@@ -421,7 +475,7 @@ class StringStream
421
475
  c = @data[ @position ] || EOF
422
476
  if @position < @data.length
423
477
  @column += 1
424
- if c == ?\n
478
+ if c == NEWLINE
425
479
  @line += 1
426
480
  @column = 0
427
481
  end
@@ -444,28 +498,15 @@ class StringStream
444
498
  @data[ index ] or EOF
445
499
  end
446
500
 
447
- #
448
- # identical to #peek, except it returns the character value as a String
449
- #
450
- def look( k = 1 )
451
- k == 0 and return nil
452
- k += 1 if k < 0
453
-
454
- index = @position + k - 1
455
- index < 0 and return nil
456
-
457
- c = @data[ index ] and c.chr
458
- end
459
-
460
501
  #
461
502
  # return a substring around the stream cursor at a distance +k+
462
503
  # if <tt>k >= 0</tt>, return the next k characters
463
504
  # if <tt>k < 0</tt>, return the previous <tt>|k|</tt> characters
464
505
  #
465
506
  def through( k )
466
- if k >= 0 then @data[ @position, k ] else
507
+ if k >= 0 then @string[ @position, k ] else
467
508
  start = ( @position + k ).at_least( 0 ) # start cannot be negative or index will wrap around
468
- @data[ start ... @position ]
509
+ @string[ start ... @position ]
469
510
  end
470
511
  end
471
512
 
@@ -487,7 +528,7 @@ class StringStream
487
528
  # This is an extra utility method for use inside lexer actions if needed.
488
529
  #
489
530
  def beginning_of_line?
490
- @position.zero? or @data[ @position - 1 ] == ?\n
531
+ @position.zero? or @data[ @position - 1 ] == NEWLINE
491
532
  end
492
533
 
493
534
  #
@@ -495,7 +536,7 @@ class StringStream
495
536
  # This is an extra utility method for use inside lexer actions if needed.
496
537
  #
497
538
  def end_of_line?
498
- @data[ @position ] == ?\n if @position >= @data.length
539
+ @data[ @position ] == NEWLINE #if @position < @data.length
499
540
  end
500
541
 
501
542
  #
@@ -516,7 +557,7 @@ class StringStream
516
557
 
517
558
  alias eof? end_of_string?
518
559
  alias bof? beginning_of_string?
519
-
560
+
520
561
  #
521
562
  # record the current stream location parameters in the stream's marker table and
522
563
  # return an integer-valued bookmark that may be used to restore the stream's
@@ -605,14 +646,14 @@ class StringStream
605
646
  # return the string slice between position +start+ and +stop+
606
647
  #
607
648
  def substring( start, stop )
608
- @data[ start, stop - start + 1 ]
649
+ @string[ start, stop - start + 1 ]
609
650
  end
610
651
 
611
652
  #
612
653
  # identical to String#[]
613
654
  #
614
655
  def []( start, *args )
615
- @data[ start, *args ]
656
+ @string[ start, *args ]
616
657
  end
617
658
  end
618
659
 
@@ -2,10 +2,10 @@
2
2
  #
3
3
  # GroupFile.g
4
4
  #
5
- # Generated using ANTLR version: 3.2.1-SNAPSHOT Apr 29, 2010 11:36:19
6
- # Ruby runtime library version: 1.7.3
5
+ # Generated using ANTLR version: 3.2.1-SNAPSHOT Jun 18, 2010 05:38:11
6
+ # Ruby runtime library version: 1.7.5
7
7
  # Input grammar file: GroupFile.g
8
- # Generated at: 2010-05-16 18:30:21
8
+ # Generated at: 2010-07-03 23:15:35
9
9
  #
10
10
 
11
11
  # ~~~> start load path setup
@@ -16,7 +16,7 @@ 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.7.3):
19
+ Failed to load the ANTLR3 runtime library (version 1.7.5):
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.7.3' )
49
+ Gem.activate( 'antlr3', '~> 1.7.5' )
50
50
  rescue Gem::LoadError
51
51
  antlr_load_failed.call
52
52
  end
@@ -89,7 +89,7 @@ module GroupFile
89
89
 
90
90
 
91
91
  begin
92
- generated_using( "GroupFile.g", "3.2.1-SNAPSHOT Apr 29, 2010 11:36:19", "1.7.3" )
92
+ generated_using( "GroupFile.g", "3.2.1-SNAPSHOT Jun 18, 2010 05:38:11", "1.7.5" )
93
93
  rescue NoMethodError => error
94
94
  # ignore
95
95
  end
@@ -169,7 +169,7 @@ module GroupFile
169
169
 
170
170
  # - - - - main rule block - - - -
171
171
  # at line 18:9: ';'
172
- match( ?; )
172
+ match( 0x3b )
173
173
 
174
174
 
175
175
  @state.type = type
@@ -217,7 +217,7 @@ module GroupFile
217
217
 
218
218
  # - - - - main rule block - - - -
219
219
  # at line 20:9: '('
220
- match( ?( )
220
+ match( 0x28 )
221
221
 
222
222
 
223
223
  @state.type = type
@@ -241,7 +241,7 @@ module GroupFile
241
241
 
242
242
  # - - - - main rule block - - - -
243
243
  # at line 21:9: ')'
244
- match( ?) )
244
+ match( 0x29 )
245
245
 
246
246
 
247
247
  @state.type = type
@@ -265,7 +265,7 @@ module GroupFile
265
265
 
266
266
  # - - - - main rule block - - - -
267
267
  # at line 22:9: ','
268
- match( ?, )
268
+ match( 0x2c )
269
269
 
270
270
 
271
271
  @state.type = type
@@ -289,7 +289,7 @@ module GroupFile
289
289
 
290
290
  # - - - - main rule block - - - -
291
291
  # at line 23:9: '*'
292
- match( ?* )
292
+ match( 0x2a )
293
293
 
294
294
 
295
295
  @state.type = type
@@ -313,7 +313,7 @@ module GroupFile
313
313
 
314
314
  # - - - - main rule block - - - -
315
315
  # at line 24:9: '&'
316
- match( ?& )
316
+ match( 0x26 )
317
317
 
318
318
 
319
319
  @state.type = type
@@ -337,7 +337,7 @@ module GroupFile
337
337
 
338
338
  # - - - - main rule block - - - -
339
339
  # at line 25:9: '='
340
- match( ?= )
340
+ match( 0x3d )
341
341
 
342
342
 
343
343
  @state.type = type
@@ -361,20 +361,20 @@ module GroupFile
361
361
 
362
362
  # - - - - main rule block - - - -
363
363
  # at line 125:5: 'A' .. 'Z' ( 'a' .. 'z' | '_' | 'A' .. 'Z' | '0' .. '9' )*
364
- match_range( ?A, ?Z )
364
+ match_range( 0x41, 0x5a )
365
365
  # at line 125:14: ( 'a' .. 'z' | '_' | 'A' .. 'Z' | '0' .. '9' )*
366
366
  while true # decision 1
367
367
  alt_1 = 2
368
368
  look_1_0 = @input.peek( 1 )
369
369
 
370
- if ( look_1_0.between?( ?0, ?9 ) || look_1_0.between?( ?A, ?Z ) || look_1_0 == ?_ || look_1_0.between?( ?a, ?z ) )
370
+ if ( look_1_0.between?( 0x30, 0x39 ) || look_1_0.between?( 0x41, 0x5a ) || look_1_0 == 0x5f || look_1_0.between?( 0x61, 0x7a ) )
371
371
  alt_1 = 1
372
372
 
373
373
  end
374
374
  case alt_1
375
375
  when 1
376
376
  # at line
377
- if @input.peek( 1 ).between?( ?0, ?9 ) || @input.peek( 1 ).between?( ?A, ?Z ) || @input.peek(1) == ?_ || @input.peek( 1 ).between?( ?a, ?z )
377
+ if @input.peek( 1 ).between?( 0x30, 0x39 ) || @input.peek( 1 ).between?( 0x41, 0x5a ) || @input.peek(1) == 0x5f || @input.peek( 1 ).between?( 0x61, 0x7a )
378
378
  @input.consume
379
379
  else
380
380
  mse = MismatchedSet( nil )
@@ -411,7 +411,7 @@ module GroupFile
411
411
 
412
412
  # - - - - main rule block - - - -
413
413
  # at line 129:5: ( 'a' .. 'z' | '_' ) ( 'a' .. 'z' | '_' | 'A' .. 'Z' | '0' .. '9' )*
414
- if @input.peek(1) == ?_ || @input.peek( 1 ).between?( ?a, ?z )
414
+ if @input.peek(1) == 0x5f || @input.peek( 1 ).between?( 0x61, 0x7a )
415
415
  @input.consume
416
416
  else
417
417
  mse = MismatchedSet( nil )
@@ -425,14 +425,14 @@ module GroupFile
425
425
  alt_2 = 2
426
426
  look_2_0 = @input.peek( 1 )
427
427
 
428
- if ( look_2_0.between?( ?0, ?9 ) || look_2_0.between?( ?A, ?Z ) || look_2_0 == ?_ || look_2_0.between?( ?a, ?z ) )
428
+ if ( look_2_0.between?( 0x30, 0x39 ) || look_2_0.between?( 0x41, 0x5a ) || look_2_0 == 0x5f || look_2_0.between?( 0x61, 0x7a ) )
429
429
  alt_2 = 1
430
430
 
431
431
  end
432
432
  case alt_2
433
433
  when 1
434
434
  # at line
435
- if @input.peek( 1 ).between?( ?0, ?9 ) || @input.peek( 1 ).between?( ?A, ?Z ) || @input.peek(1) == ?_ || @input.peek( 1 ).between?( ?a, ?z )
435
+ if @input.peek( 1 ).between?( 0x30, 0x39 ) || @input.peek( 1 ).between?( 0x41, 0x5a ) || @input.peek(1) == 0x5f || @input.peek( 1 ).between?( 0x61, 0x7a )
436
436
  @input.consume
437
437
  else
438
438
  mse = MismatchedSet( nil )
@@ -475,41 +475,41 @@ module GroupFile
475
475
  alt_3 = 3
476
476
  look_3_0 = @input.peek( 1 )
477
477
 
478
- if ( look_3_0 == ?> )
478
+ if ( look_3_0 == 0x3e )
479
479
  look_3_1 = @input.peek( 2 )
480
480
 
481
- if ( look_3_1 == ?> )
481
+ if ( look_3_1 == 0x3e )
482
482
  look_3_4 = @input.peek( 3 )
483
483
 
484
- if ( look_3_4 == ?> )
484
+ if ( look_3_4 == 0x3e )
485
485
  alt_3 = 3
486
- elsif ( look_3_4.between?( 0x0000, ?= ) || look_3_4.between?( ??, 0xFFFF ) )
486
+ elsif ( look_3_4.between?( 0x0, 0x3d ) || look_3_4.between?( 0x3f, 0xffff ) )
487
487
  alt_3 = 2
488
488
 
489
489
  end
490
- elsif ( look_3_1.between?( 0x0000, ?= ) || look_3_1.between?( ??, 0xFFFF ) )
490
+ elsif ( look_3_1.between?( 0x0, 0x3d ) || look_3_1.between?( 0x3f, 0xffff ) )
491
491
  alt_3 = 2
492
492
 
493
493
  end
494
- elsif ( look_3_0 == ?\\ )
494
+ elsif ( look_3_0 == 0x5c )
495
495
  look_3_2 = @input.peek( 2 )
496
496
 
497
- if ( look_3_2 == ?> )
497
+ if ( look_3_2 == 0x3e )
498
498
  alt_3 = 1
499
- elsif ( look_3_2 == ?\\ )
499
+ elsif ( look_3_2 == 0x5c )
500
500
  alt_3 = 1
501
- elsif ( look_3_2.between?( 0x0000, ?= ) || look_3_2.between?( ??, ?[ ) || look_3_2.between?( ?], 0xFFFF ) )
501
+ elsif ( look_3_2.between?( 0x0, 0x3d ) || look_3_2.between?( 0x3f, 0x5b ) || look_3_2.between?( 0x5d, 0xffff ) )
502
502
  alt_3 = 1
503
503
 
504
504
  end
505
- elsif ( look_3_0.between?( 0x0000, ?= ) || look_3_0.between?( ??, ?[ ) || look_3_0.between?( ?], 0xFFFF ) )
505
+ elsif ( look_3_0.between?( 0x0, 0x3d ) || look_3_0.between?( 0x3f, 0x5b ) || look_3_0.between?( 0x5d, 0xffff ) )
506
506
  alt_3 = 2
507
507
 
508
508
  end
509
509
  case alt_3
510
510
  when 1
511
511
  # at line 135:35: '\\\\' .
512
- match( ?\\ )
512
+ match( 0x5c )
513
513
  match_any
514
514
 
515
515
  when 2
@@ -547,9 +547,9 @@ module GroupFile
547
547
  alt_6 = 2
548
548
  look_6_0 = @input.peek( 1 )
549
549
 
550
- if ( look_6_0 == ?" )
550
+ if ( look_6_0 == 0x22 )
551
551
  alt_6 = 1
552
- elsif ( look_6_0 == ?\' )
552
+ elsif ( look_6_0 == 0x27 )
553
553
  alt_6 = 2
554
554
  else
555
555
  raise NoViableAlternative( "", 6, 0 )
@@ -557,22 +557,22 @@ module GroupFile
557
557
  case alt_6
558
558
  when 1
559
559
  # at line 140:5: '\"' (~ ( '\\\\' | '\"' ) | '\\\\' . )* '\"'
560
- match( ?" )
560
+ match( 0x22 )
561
561
  # at line 140:10: (~ ( '\\\\' | '\"' ) | '\\\\' . )*
562
562
  while true # decision 4
563
563
  alt_4 = 3
564
564
  look_4_0 = @input.peek( 1 )
565
565
 
566
- if ( look_4_0.between?( 0x0000, ?! ) || look_4_0.between?( ?#, ?[ ) || look_4_0.between?( ?], 0xFFFF ) )
566
+ if ( look_4_0.between?( 0x0, 0x21 ) || look_4_0.between?( 0x23, 0x5b ) || look_4_0.between?( 0x5d, 0xffff ) )
567
567
  alt_4 = 1
568
- elsif ( look_4_0 == ?\\ )
568
+ elsif ( look_4_0 == 0x5c )
569
569
  alt_4 = 2
570
570
 
571
571
  end
572
572
  case alt_4
573
573
  when 1
574
574
  # at line 140:12: ~ ( '\\\\' | '\"' )
575
- if @input.peek( 1 ).between?( 0x0000, ?! ) || @input.peek( 1 ).between?( ?#, ?[ ) || @input.peek( 1 ).between?( ?], 0x00FF )
575
+ if @input.peek( 1 ).between?( 0x0, 0x21 ) || @input.peek( 1 ).between?( 0x23, 0x5b ) || @input.peek( 1 ).between?( 0x5d, 0xff )
576
576
  @input.consume
577
577
  else
578
578
  mse = MismatchedSet( nil )
@@ -584,33 +584,33 @@ module GroupFile
584
584
 
585
585
  when 2
586
586
  # at line 140:31: '\\\\' .
587
- match( ?\\ )
587
+ match( 0x5c )
588
588
  match_any
589
589
 
590
590
  else
591
591
  break # out of loop for decision 4
592
592
  end
593
593
  end # loop for decision 4
594
- match( ?" )
594
+ match( 0x22 )
595
595
 
596
596
  when 2
597
597
  # at line 141:5: '\\'' (~ ( '\\\\' | '\\'' ) | '\\\\' . )* '\\''
598
- match( ?\' )
598
+ match( 0x27 )
599
599
  # at line 141:10: (~ ( '\\\\' | '\\'' ) | '\\\\' . )*
600
600
  while true # decision 5
601
601
  alt_5 = 3
602
602
  look_5_0 = @input.peek( 1 )
603
603
 
604
- if ( look_5_0.between?( 0x0000, ?& ) || look_5_0.between?( ?(, ?[ ) || look_5_0.between?( ?], 0xFFFF ) )
604
+ if ( look_5_0.between?( 0x0, 0x26 ) || look_5_0.between?( 0x28, 0x5b ) || look_5_0.between?( 0x5d, 0xffff ) )
605
605
  alt_5 = 1
606
- elsif ( look_5_0 == ?\\ )
606
+ elsif ( look_5_0 == 0x5c )
607
607
  alt_5 = 2
608
608
 
609
609
  end
610
610
  case alt_5
611
611
  when 1
612
612
  # at line 141:12: ~ ( '\\\\' | '\\'' )
613
- if @input.peek( 1 ).between?( 0x0000, ?& ) || @input.peek( 1 ).between?( ?(, ?[ ) || @input.peek( 1 ).between?( ?], 0x00FF )
613
+ if @input.peek( 1 ).between?( 0x0, 0x26 ) || @input.peek( 1 ).between?( 0x28, 0x5b ) || @input.peek( 1 ).between?( 0x5d, 0xff )
614
614
  @input.consume
615
615
  else
616
616
  mse = MismatchedSet( nil )
@@ -622,14 +622,14 @@ module GroupFile
622
622
 
623
623
  when 2
624
624
  # at line 141:31: '\\\\' .
625
- match( ?\\ )
625
+ match( 0x5c )
626
626
  match_any
627
627
 
628
628
  else
629
629
  break # out of loop for decision 5
630
630
  end
631
631
  end # loop for decision 5
632
- match( ?\' )
632
+ match( 0x27 )
633
633
 
634
634
  end
635
635
 
@@ -657,14 +657,14 @@ module GroupFile
657
657
  alt_10 = 2
658
658
  look_10_0 = @input.peek( 1 )
659
659
 
660
- if ( look_10_0 == ?# )
660
+ if ( look_10_0 == 0x23 )
661
661
  alt_10 = 1
662
- elsif ( look_10_0 == ?/ )
662
+ elsif ( look_10_0 == 0x2f )
663
663
  look_10_2 = @input.peek( 2 )
664
664
 
665
- if ( look_10_2 == ?/ )
665
+ if ( look_10_2 == 0x2f )
666
666
  alt_10 = 1
667
- elsif ( look_10_2 == ?* )
667
+ elsif ( look_10_2 == 0x2a )
668
668
  alt_10 = 2
669
669
  else
670
670
  raise NoViableAlternative( "", 10, 2 )
@@ -679,9 +679,9 @@ module GroupFile
679
679
  alt_7 = 2
680
680
  look_7_0 = @input.peek( 1 )
681
681
 
682
- if ( look_7_0 == ?# )
682
+ if ( look_7_0 == 0x23 )
683
683
  alt_7 = 1
684
- elsif ( look_7_0 == ?/ )
684
+ elsif ( look_7_0 == 0x2f )
685
685
  alt_7 = 2
686
686
  else
687
687
  raise NoViableAlternative( "", 7, 0 )
@@ -689,7 +689,7 @@ module GroupFile
689
689
  case alt_7
690
690
  when 1
691
691
  # at line 146:7: '#'
692
- match( ?# )
692
+ match( 0x23 )
693
693
 
694
694
  when 2
695
695
  # at line 146:13: '//'
@@ -701,14 +701,14 @@ module GroupFile
701
701
  alt_8 = 2
702
702
  look_8_0 = @input.peek( 1 )
703
703
 
704
- if ( look_8_0.between?( 0x0000, ?\t ) || look_8_0.between?( 0x000B, 0xFFFF ) )
704
+ if ( look_8_0.between?( 0x0, 0x9 ) || look_8_0.between?( 0xb, 0xffff ) )
705
705
  alt_8 = 1
706
706
 
707
707
  end
708
708
  case alt_8
709
709
  when 1
710
710
  # at line 146:20: ~ '\\n'
711
- if @input.peek( 1 ).between?( 0x0000, ?\t ) || @input.peek( 1 ).between?( 0x000B, 0x00FF )
711
+ if @input.peek( 1 ).between?( 0x0, 0x9 ) || @input.peek( 1 ).between?( 0xb, 0xff )
712
712
  @input.consume
713
713
  else
714
714
  mse = MismatchedSet( nil )
@@ -731,16 +731,16 @@ module GroupFile
731
731
  alt_9 = 2
732
732
  look_9_0 = @input.peek( 1 )
733
733
 
734
- if ( look_9_0 == ?* )
734
+ if ( look_9_0 == 0x2a )
735
735
  look_9_1 = @input.peek( 2 )
736
736
 
737
- if ( look_9_1 == ?/ )
737
+ if ( look_9_1 == 0x2f )
738
738
  alt_9 = 2
739
- elsif ( look_9_1.between?( 0x0000, ?. ) || look_9_1.between?( ?0, 0xFFFF ) )
739
+ elsif ( look_9_1.between?( 0x0, 0x2e ) || look_9_1.between?( 0x30, 0xffff ) )
740
740
  alt_9 = 1
741
741
 
742
742
  end
743
- elsif ( look_9_0.between?( 0x0000, ?) ) || look_9_0.between?( ?+, 0xFFFF ) )
743
+ elsif ( look_9_0.between?( 0x0, 0x29 ) || look_9_0.between?( 0x2b, 0xffff ) )
744
744
  alt_9 = 1
745
745
 
746
746
  end
@@ -786,14 +786,14 @@ module GroupFile
786
786
  alt_11 = 2
787
787
  look_11_0 = @input.peek( 1 )
788
788
 
789
- if ( look_11_0.between?( ?\t, ?\n ) || look_11_0.between?( ?\f, ?\r ) || look_11_0 == ?\s )
789
+ if ( look_11_0.between?( 0x9, 0xa ) || look_11_0.between?( 0xc, 0xd ) || look_11_0 == 0x20 )
790
790
  alt_11 = 1
791
791
 
792
792
  end
793
793
  case alt_11
794
794
  when 1
795
795
  # at line
796
- if @input.peek( 1 ).between?( ?\t, ?\n ) || @input.peek( 1 ).between?( ?\f, ?\r ) || @input.peek(1) == ?\s
796
+ if @input.peek( 1 ).between?( 0x9, 0xa ) || @input.peek( 1 ).between?( 0xc, 0xd ) || @input.peek(1) == 0x20
797
797
  @input.consume
798
798
  else
799
799
  mse = MismatchedSet( nil )