citrus 2.3.4 → 2.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,8 +19,6 @@ module Citrus
19
19
 
20
20
  CLOSE = -1
21
21
 
22
- @cache = {}
23
-
24
22
  # Returns a map of paths of files that have been loaded via #load to the
25
23
  # result of #eval on the code in that file.
26
24
  #
@@ -29,7 +27,7 @@ module Citrus
29
27
  # #require the same file with a different relative path, it will be loaded
30
28
  # twice.
31
29
  def self.cache
32
- @cache
30
+ @cache ||= {}
33
31
  end
34
32
 
35
33
  # Evaluates the given Citrus parsing expression grammar +code+ and returns an
@@ -71,22 +69,22 @@ module Citrus
71
69
  # # => [MyGrammar]
72
70
  #
73
71
  def self.load(file, options={})
74
- file += '.citrus' unless file =~ /\.citrus$/
72
+ file += '.citrus' unless /\.citrus$/ === file
75
73
  force = options.delete(:force)
76
74
 
77
- if force || !@cache[file]
75
+ if force || !cache[file]
78
76
  raise LoadError, "Cannot find file #{file}" unless ::File.file?(file)
79
77
  raise LoadError, "Cannot read file #{file}" unless ::File.readable?(file)
80
78
 
81
79
  begin
82
- @cache[file] = eval(::File.read(file), options)
80
+ cache[file] = eval(::File.read(file), options)
83
81
  rescue SyntaxError => e
84
82
  e.message.replace("#{::File.expand_path(file)}: #{e.message}")
85
83
  raise e
86
84
  end
87
85
  end
88
86
 
89
- @cache[file]
87
+ cache[file]
90
88
  end
91
89
 
92
90
  # Searches the <tt>$LOAD_PATH</tt> for a +file+ with the .citrus suffix and
@@ -99,11 +97,13 @@ module Citrus
99
97
  # # => [MyGrammar]
100
98
  #
101
99
  def self.require(file, options={})
102
- file += '.citrus' unless file =~ /\.citrus$/
100
+ file += '.citrus' unless /\.citrus$/ === file
103
101
  found = nil
104
102
 
105
- (Pathname.new(file).absolute? ? [''] : $LOAD_PATH).each do |dir|
106
- found = Dir[::File.join(dir, file)].first
103
+ paths = ['']
104
+ paths += $LOAD_PATH unless Pathname.new(file).absolute?
105
+ paths.each do |path|
106
+ found = Dir[::File.join(path, file)].first
107
107
  break if found
108
108
  end
109
109
 
@@ -670,6 +670,11 @@ module Citrus
670
670
  end
671
671
  end
672
672
 
673
+ # This alias allows strings to be compared to the string representation of
674
+ # Rule objects. It is most useful in assertions in unit tests, e.g.:
675
+ #
676
+ # assert_equal('"a" | "b"', rule)
677
+ #
673
678
  alias_method :to_str, :to_s
674
679
 
675
680
  # Returns the Citrus notation of this rule as a string that is suitable to
@@ -1287,6 +1292,11 @@ module Citrus
1287
1292
  @string
1288
1293
  end
1289
1294
 
1295
+ # This alias allows strings to be compared to the string value of Match
1296
+ # objects. It is most useful in assertions in unit tests, e.g.:
1297
+ #
1298
+ # assert_equal("a string", match)
1299
+ #
1290
1300
  alias_method :to_str, :to_s
1291
1301
 
1292
1302
  # The default value for a match is its string value. This method is
@@ -1296,11 +1306,9 @@ module Citrus
1296
1306
 
1297
1307
  # Returns this match plus all sub #matches in an array.
1298
1308
  def to_a
1299
- [captures[0]] + matches
1309
+ [self] + matches
1300
1310
  end
1301
1311
 
1302
- alias_method :to_ary, :to_a
1303
-
1304
1312
  # Returns the capture at the given +key+. If it is an Integer (and an
1305
1313
  # optional length) or a Range, the result of #to_a with the same arguments
1306
1314
  # is returned. Otherwise, the value at +key+ in #captures is returned.
@@ -1313,8 +1321,6 @@ module Citrus
1313
1321
  end
1314
1322
  end
1315
1323
 
1316
- alias_method :fetch, :[]
1317
-
1318
1324
  def ==(other)
1319
1325
  case other
1320
1326
  when String
@@ -1382,6 +1388,7 @@ module Citrus
1382
1388
  @matches = []
1383
1389
 
1384
1390
  capture!(@events[0], self)
1391
+ @captures[0] = self
1385
1392
 
1386
1393
  stack = []
1387
1394
  offset = 0
@@ -1404,7 +1411,10 @@ module Citrus
1404
1411
  match = Match.new(@string.slice(os, event), @events[start..index])
1405
1412
  capture!(rule, match)
1406
1413
 
1407
- @matches << match if stack.size == 1
1414
+ if stack.size == 1
1415
+ @matches << match
1416
+ @captures[@matches.size] = match
1417
+ end
1408
1418
 
1409
1419
  capture = true
1410
1420
  end
@@ -1437,13 +1447,6 @@ module Citrus
1437
1447
 
1438
1448
  index += 1
1439
1449
  end
1440
-
1441
- # Add numeric indices to @captures.
1442
- @captures[0] = self
1443
-
1444
- @matches.each_with_index do |match, index|
1445
- @captures[index + 1] = match
1446
- end
1447
1450
  end
1448
1451
 
1449
1452
  def capture!(rule, match)
@@ -21,7 +21,7 @@ module Citrus
21
21
  end
22
22
  end
23
23
 
24
- # A grammar for Citrus grammar files. This grammar is used in Citrus#eval to
24
+ # A grammar for Citrus grammar files. This grammar is used in Citrus.eval to
25
25
  # parse and evaluate Citrus grammars and serves as a prime example of how to
26
26
  # create a complex grammar complete with semantic interpretation in pure Ruby.
27
27
  File = Grammar.new do #:nodoc:
@@ -316,12 +316,12 @@ module Citrus
316
316
  }
317
317
  end
318
318
 
319
- rule :require_keyword, [ 'require', :space ]
320
- rule :include_keyword, [ 'include', :space ]
321
- rule :grammar_keyword, [ 'grammar', :space ]
322
- rule :root_keyword, [ 'root', :space ]
323
- rule :rule_keyword, [ 'rule', :space ]
324
- rule :end_keyword, [ 'end', :space ]
319
+ rule :require_keyword, [ /\brequire\b/, :space ]
320
+ rule :include_keyword, [ /\binclude\b/, :space ]
321
+ rule :grammar_keyword, [ /\bgrammar\b/, :space ]
322
+ rule :root_keyword, [ /\broot\b/, :space ]
323
+ rule :rule_keyword, [ /\brule\b/, :space ]
324
+ rule :end_keyword, [ /\bend\b/, :space ]
325
325
  rule :lparen, [ '(', :space ]
326
326
  rule :rparen, [ ')', :space ]
327
327
  rule :lcurly, [ '{', :space ]
@@ -336,7 +336,7 @@ module Citrus
336
336
  rule :space, zero_or_more(any(:white, :comment))
337
337
  end
338
338
 
339
- def File.parse(*args) # :nodoc:
339
+ def File.parse(*) # :nodoc:
340
340
  super
341
341
  rescue ParseError => e
342
342
  # Raise SyntaxError when a parse fails.
@@ -1,6 +1,6 @@
1
1
  module Citrus
2
2
  # The current version of Citrus as [major, minor, patch].
3
- VERSION = [2, 3, 4]
3
+ VERSION = [2, 3, 5]
4
4
 
5
5
  # Returns the current version of Citrus as a string.
6
6
  def self.version
@@ -0,0 +1,8 @@
1
+ grammar EndTagGrammar
2
+ rule end_tag
3
+ /*./
4
+ end
5
+ rule number
6
+ end_tag
7
+ end
8
+ end
@@ -0,0 +1,1491 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 54
13
+ 5
14
+ 45
15
+ 0
16
+ 1
17
+ 7
18
+ 2
19
+ 64
20
+ 65
21
+ 49
22
+ 3
23
+ 0
24
+ 49
25
+ 4
26
+ 2
27
+ 47
28
+ 49
29
+ 5
30
+ 1
31
+ 15
32
+ 99
33
+ 7
34
+ 6
35
+ 45
36
+ 7
37
+ 8
38
+ 43
39
+ 9
40
+ 43
41
+ 10
42
+ 65
43
+ 49
44
+ 11
45
+ 3
46
+ 13
47
+ 99
48
+ 12
49
+ 7
50
+ 12
51
+ 12
52
+ 7
53
+ 13
54
+ 12
55
+ 65
56
+ 12
57
+ 49
58
+ 14
59
+ 4
60
+ 15
61
+ 49
62
+ 12
63
+ 0
64
+ 15
65
+ 2
66
+ 11
67
+ I
68
+ 6
69
+ I
70
+ 0
71
+ I
72
+ 0
73
+ I
74
+ 0
75
+ n
76
+ p
77
+ 15
78
+ x
79
+ 4
80
+ File
81
+ n
82
+ s
83
+ 9
84
+ ../helper
85
+ x
86
+ 11
87
+ active_path
88
+ x
89
+ 11
90
+ expand_path
91
+ x
92
+ 7
93
+ require
94
+ x
95
+ 9
96
+ AliasTest
97
+ x
98
+ 4
99
+ Test
100
+ n
101
+ x
102
+ 4
103
+ Unit
104
+ x
105
+ 8
106
+ TestCase
107
+ x
108
+ 10
109
+ open_class
110
+ x
111
+ 14
112
+ __class_init__
113
+ M
114
+ 1
115
+ n
116
+ n
117
+ x
118
+ 9
119
+ AliasTest
120
+ i
121
+ 86
122
+ 5
123
+ 66
124
+ 99
125
+ 7
126
+ 0
127
+ 7
128
+ 1
129
+ 65
130
+ 67
131
+ 49
132
+ 2
133
+ 0
134
+ 49
135
+ 3
136
+ 4
137
+ 15
138
+ 99
139
+ 7
140
+ 4
141
+ 7
142
+ 5
143
+ 65
144
+ 67
145
+ 49
146
+ 2
147
+ 0
148
+ 49
149
+ 3
150
+ 4
151
+ 15
152
+ 99
153
+ 7
154
+ 6
155
+ 7
156
+ 7
157
+ 65
158
+ 67
159
+ 49
160
+ 2
161
+ 0
162
+ 49
163
+ 3
164
+ 4
165
+ 15
166
+ 99
167
+ 7
168
+ 8
169
+ 7
170
+ 9
171
+ 65
172
+ 67
173
+ 49
174
+ 2
175
+ 0
176
+ 49
177
+ 3
178
+ 4
179
+ 15
180
+ 99
181
+ 7
182
+ 10
183
+ 7
184
+ 11
185
+ 65
186
+ 67
187
+ 49
188
+ 2
189
+ 0
190
+ 49
191
+ 3
192
+ 4
193
+ 15
194
+ 99
195
+ 7
196
+ 12
197
+ 7
198
+ 13
199
+ 65
200
+ 67
201
+ 49
202
+ 2
203
+ 0
204
+ 49
205
+ 3
206
+ 4
207
+ 11
208
+ I
209
+ 5
210
+ I
211
+ 0
212
+ I
213
+ 0
214
+ I
215
+ 0
216
+ n
217
+ p
218
+ 14
219
+ x
220
+ 14
221
+ test_terminal?
222
+ M
223
+ 1
224
+ n
225
+ n
226
+ x
227
+ 14
228
+ test_terminal?
229
+ i
230
+ 39
231
+ 45
232
+ 0
233
+ 1
234
+ 13
235
+ 71
236
+ 2
237
+ 47
238
+ 9
239
+ 21
240
+ 47
241
+ 49
242
+ 3
243
+ 0
244
+ 13
245
+ 47
246
+ 49
247
+ 4
248
+ 0
249
+ 15
250
+ 8
251
+ 24
252
+ 49
253
+ 2
254
+ 0
255
+ 19
256
+ 0
257
+ 15
258
+ 5
259
+ 3
260
+ 20
261
+ 0
262
+ 49
263
+ 5
264
+ 0
265
+ 47
266
+ 49
267
+ 6
268
+ 2
269
+ 11
270
+ I
271
+ 4
272
+ I
273
+ 1
274
+ I
275
+ 0
276
+ I
277
+ 0
278
+ n
279
+ p
280
+ 7
281
+ x
282
+ 5
283
+ Alias
284
+ n
285
+ x
286
+ 3
287
+ new
288
+ x
289
+ 8
290
+ allocate
291
+ x
292
+ 10
293
+ initialize
294
+ x
295
+ 9
296
+ terminal?
297
+ x
298
+ 12
299
+ assert_equal
300
+ p
301
+ 7
302
+ I
303
+ -1
304
+ I
305
+ 4
306
+ I
307
+ 0
308
+ I
309
+ 5
310
+ I
311
+ 1b
312
+ I
313
+ 6
314
+ I
315
+ 27
316
+ x
317
+ 49
318
+ /Users/michael/Projects/citrus/test/alias_test.rb
319
+ p
320
+ 1
321
+ x
322
+ 4
323
+ rule
324
+ x
325
+ 17
326
+ method_visibility
327
+ x
328
+ 15
329
+ add_defn_method
330
+ x
331
+ 9
332
+ test_exec
333
+ M
334
+ 1
335
+ n
336
+ n
337
+ x
338
+ 9
339
+ test_exec
340
+ i
341
+ 86
342
+ 45
343
+ 0
344
+ 1
345
+ 56
346
+ 2
347
+ 50
348
+ 3
349
+ 0
350
+ 19
351
+ 0
352
+ 15
353
+ 20
354
+ 0
355
+ 7
356
+ 4
357
+ 49
358
+ 5
359
+ 1
360
+ 19
361
+ 1
362
+ 15
363
+ 20
364
+ 0
365
+ 7
366
+ 6
367
+ 49
368
+ 5
369
+ 1
370
+ 19
371
+ 2
372
+ 15
373
+ 20
374
+ 1
375
+ 45
376
+ 7
377
+ 8
378
+ 13
379
+ 71
380
+ 3
381
+ 47
382
+ 9
383
+ 57
384
+ 47
385
+ 49
386
+ 9
387
+ 0
388
+ 13
389
+ 7
390
+ 10
391
+ 64
392
+ 47
393
+ 49
394
+ 11
395
+ 1
396
+ 15
397
+ 8
398
+ 63
399
+ 7
400
+ 10
401
+ 64
402
+ 49
403
+ 3
404
+ 1
405
+ 49
406
+ 12
407
+ 1
408
+ 19
409
+ 3
410
+ 15
411
+ 5
412
+ 20
413
+ 1
414
+ 45
415
+ 13
416
+ 14
417
+ 4
418
+ 3
419
+ 35
420
+ 3
421
+ 20
422
+ 3
423
+ 47
424
+ 49
425
+ 15
426
+ 2
427
+ 11
428
+ I
429
+ 8
430
+ I
431
+ 4
432
+ I
433
+ 0
434
+ I
435
+ 0
436
+ n
437
+ p
438
+ 16
439
+ x
440
+ 7
441
+ Grammar
442
+ n
443
+ M
444
+ 1
445
+ p
446
+ 2
447
+ x
448
+ 9
449
+ for_block
450
+ t
451
+ n
452
+ x
453
+ 9
454
+ test_exec
455
+ i
456
+ 21
457
+ 5
458
+ 7
459
+ 0
460
+ 7
461
+ 1
462
+ 47
463
+ 49
464
+ 2
465
+ 2
466
+ 15
467
+ 5
468
+ 7
469
+ 1
470
+ 7
471
+ 3
472
+ 64
473
+ 47
474
+ 49
475
+ 2
476
+ 2
477
+ 11
478
+ I
479
+ 4
480
+ I
481
+ 0
482
+ I
483
+ 0
484
+ I
485
+ 0
486
+ I
487
+ -2
488
+ p
489
+ 4
490
+ x
491
+ 1
492
+ a
493
+ x
494
+ 1
495
+ b
496
+ x
497
+ 4
498
+ rule
499
+ s
500
+ 3
501
+ abc
502
+ p
503
+ 5
504
+ I
505
+ 0
506
+ I
507
+ b
508
+ I
509
+ a
510
+ I
511
+ c
512
+ I
513
+ 15
514
+ x
515
+ 49
516
+ /Users/michael/Projects/citrus/test/alias_test.rb
517
+ p
518
+ 0
519
+ x
520
+ 3
521
+ new
522
+ x
523
+ 1
524
+ a
525
+ x
526
+ 4
527
+ rule
528
+ x
529
+ 1
530
+ b
531
+ x
532
+ 5
533
+ Input
534
+ n
535
+ x
536
+ 8
537
+ allocate
538
+ s
539
+ 3
540
+ abc
541
+ x
542
+ 10
543
+ initialize
544
+ x
545
+ 4
546
+ exec
547
+ x
548
+ 5
549
+ CLOSE
550
+ n
551
+ x
552
+ 12
553
+ assert_equal
554
+ p
555
+ 13
556
+ I
557
+ -1
558
+ I
559
+ 9
560
+ I
561
+ 0
562
+ I
563
+ a
564
+ I
565
+ b
566
+ I
567
+ e
568
+ I
569
+ 15
570
+ I
571
+ f
572
+ I
573
+ 1f
574
+ I
575
+ 10
576
+ I
577
+ 45
578
+ I
579
+ 11
580
+ I
581
+ 56
582
+ x
583
+ 49
584
+ /Users/michael/Projects/citrus/test/alias_test.rb
585
+ p
586
+ 4
587
+ x
588
+ 7
589
+ grammar
590
+ x
591
+ 6
592
+ rule_a
593
+ x
594
+ 6
595
+ rule_b
596
+ x
597
+ 6
598
+ events
599
+ x
600
+ 14
601
+ test_exec_miss
602
+ M
603
+ 1
604
+ n
605
+ n
606
+ x
607
+ 14
608
+ test_exec_miss
609
+ i
610
+ 69
611
+ 45
612
+ 0
613
+ 1
614
+ 56
615
+ 2
616
+ 50
617
+ 3
618
+ 0
619
+ 19
620
+ 0
621
+ 15
622
+ 20
623
+ 0
624
+ 7
625
+ 4
626
+ 49
627
+ 5
628
+ 1
629
+ 19
630
+ 1
631
+ 15
632
+ 20
633
+ 1
634
+ 45
635
+ 6
636
+ 7
637
+ 13
638
+ 71
639
+ 3
640
+ 47
641
+ 9
642
+ 47
643
+ 47
644
+ 49
645
+ 8
646
+ 0
647
+ 13
648
+ 7
649
+ 9
650
+ 64
651
+ 47
652
+ 49
653
+ 10
654
+ 1
655
+ 15
656
+ 8
657
+ 53
658
+ 7
659
+ 9
660
+ 64
661
+ 49
662
+ 3
663
+ 1
664
+ 49
665
+ 11
666
+ 1
667
+ 19
668
+ 2
669
+ 15
670
+ 5
671
+ 35
672
+ 0
673
+ 20
674
+ 2
675
+ 47
676
+ 49
677
+ 12
678
+ 2
679
+ 11
680
+ I
681
+ 7
682
+ I
683
+ 3
684
+ I
685
+ 0
686
+ I
687
+ 0
688
+ n
689
+ p
690
+ 13
691
+ x
692
+ 7
693
+ Grammar
694
+ n
695
+ M
696
+ 1
697
+ p
698
+ 2
699
+ x
700
+ 9
701
+ for_block
702
+ t
703
+ n
704
+ x
705
+ 14
706
+ test_exec_miss
707
+ i
708
+ 21
709
+ 5
710
+ 7
711
+ 0
712
+ 7
713
+ 1
714
+ 47
715
+ 49
716
+ 2
717
+ 2
718
+ 15
719
+ 5
720
+ 7
721
+ 1
722
+ 7
723
+ 3
724
+ 64
725
+ 47
726
+ 49
727
+ 2
728
+ 2
729
+ 11
730
+ I
731
+ 4
732
+ I
733
+ 0
734
+ I
735
+ 0
736
+ I
737
+ 0
738
+ I
739
+ -2
740
+ p
741
+ 4
742
+ x
743
+ 1
744
+ a
745
+ x
746
+ 1
747
+ b
748
+ x
749
+ 4
750
+ rule
751
+ s
752
+ 3
753
+ abc
754
+ p
755
+ 5
756
+ I
757
+ 0
758
+ I
759
+ 16
760
+ I
761
+ a
762
+ I
763
+ 17
764
+ I
765
+ 15
766
+ x
767
+ 49
768
+ /Users/michael/Projects/citrus/test/alias_test.rb
769
+ p
770
+ 0
771
+ x
772
+ 3
773
+ new
774
+ x
775
+ 1
776
+ a
777
+ x
778
+ 4
779
+ rule
780
+ x
781
+ 5
782
+ Input
783
+ n
784
+ x
785
+ 8
786
+ allocate
787
+ s
788
+ 3
789
+ def
790
+ x
791
+ 10
792
+ initialize
793
+ x
794
+ 4
795
+ exec
796
+ x
797
+ 12
798
+ assert_equal
799
+ p
800
+ 11
801
+ I
802
+ -1
803
+ I
804
+ 14
805
+ I
806
+ 0
807
+ I
808
+ 15
809
+ I
810
+ b
811
+ I
812
+ 19
813
+ I
814
+ 15
815
+ I
816
+ 1a
817
+ I
818
+ 3b
819
+ I
820
+ 1b
821
+ I
822
+ 45
823
+ x
824
+ 49
825
+ /Users/michael/Projects/citrus/test/alias_test.rb
826
+ p
827
+ 3
828
+ x
829
+ 7
830
+ grammar
831
+ x
832
+ 4
833
+ rule
834
+ x
835
+ 6
836
+ events
837
+ x
838
+ 18
839
+ test_exec_included
840
+ M
841
+ 1
842
+ n
843
+ n
844
+ x
845
+ 18
846
+ test_exec_included
847
+ i
848
+ 97
849
+ 45
850
+ 0
851
+ 1
852
+ 56
853
+ 2
854
+ 50
855
+ 3
856
+ 0
857
+ 19
858
+ 0
859
+ 15
860
+ 45
861
+ 0
862
+ 4
863
+ 56
864
+ 5
865
+ 50
866
+ 3
867
+ 0
868
+ 19
869
+ 1
870
+ 15
871
+ 20
872
+ 1
873
+ 7
874
+ 6
875
+ 49
876
+ 7
877
+ 1
878
+ 19
879
+ 2
880
+ 15
881
+ 20
882
+ 0
883
+ 7
884
+ 8
885
+ 49
886
+ 7
887
+ 1
888
+ 19
889
+ 3
890
+ 15
891
+ 20
892
+ 2
893
+ 45
894
+ 9
895
+ 10
896
+ 13
897
+ 71
898
+ 3
899
+ 47
900
+ 9
901
+ 68
902
+ 47
903
+ 49
904
+ 11
905
+ 0
906
+ 13
907
+ 7
908
+ 12
909
+ 64
910
+ 47
911
+ 49
912
+ 13
913
+ 1
914
+ 15
915
+ 8
916
+ 74
917
+ 7
918
+ 12
919
+ 64
920
+ 49
921
+ 3
922
+ 1
923
+ 49
924
+ 14
925
+ 1
926
+ 19
927
+ 4
928
+ 15
929
+ 5
930
+ 20
931
+ 2
932
+ 45
933
+ 15
934
+ 16
935
+ 4
936
+ 3
937
+ 35
938
+ 3
939
+ 20
940
+ 4
941
+ 47
942
+ 49
943
+ 17
944
+ 2
945
+ 11
946
+ I
947
+ 9
948
+ I
949
+ 5
950
+ I
951
+ 0
952
+ I
953
+ 0
954
+ n
955
+ p
956
+ 18
957
+ x
958
+ 7
959
+ Grammar
960
+ n
961
+ M
962
+ 1
963
+ p
964
+ 2
965
+ x
966
+ 9
967
+ for_block
968
+ t
969
+ n
970
+ x
971
+ 18
972
+ test_exec_included
973
+ i
974
+ 11
975
+ 5
976
+ 7
977
+ 0
978
+ 7
979
+ 1
980
+ 64
981
+ 47
982
+ 49
983
+ 2
984
+ 2
985
+ 11
986
+ I
987
+ 4
988
+ I
989
+ 0
990
+ I
991
+ 0
992
+ I
993
+ 0
994
+ I
995
+ -2
996
+ p
997
+ 3
998
+ x
999
+ 1
1000
+ a
1001
+ s
1002
+ 3
1003
+ abc
1004
+ x
1005
+ 4
1006
+ rule
1007
+ p
1008
+ 3
1009
+ I
1010
+ 0
1011
+ I
1012
+ 20
1013
+ I
1014
+ b
1015
+ x
1016
+ 49
1017
+ /Users/michael/Projects/citrus/test/alias_test.rb
1018
+ p
1019
+ 0
1020
+ x
1021
+ 3
1022
+ new
1023
+ n
1024
+ M
1025
+ 1
1026
+ p
1027
+ 2
1028
+ x
1029
+ 9
1030
+ for_block
1031
+ t
1032
+ n
1033
+ x
1034
+ 18
1035
+ test_exec_included
1036
+ i
1037
+ 19
1038
+ 5
1039
+ 21
1040
+ 1
1041
+ 0
1042
+ 47
1043
+ 49
1044
+ 0
1045
+ 1
1046
+ 15
1047
+ 5
1048
+ 7
1049
+ 1
1050
+ 7
1051
+ 2
1052
+ 47
1053
+ 49
1054
+ 3
1055
+ 2
1056
+ 11
1057
+ I
1058
+ 4
1059
+ I
1060
+ 0
1061
+ I
1062
+ 0
1063
+ I
1064
+ 0
1065
+ I
1066
+ -2
1067
+ p
1068
+ 4
1069
+ x
1070
+ 7
1071
+ include
1072
+ x
1073
+ 1
1074
+ b
1075
+ x
1076
+ 1
1077
+ a
1078
+ x
1079
+ 4
1080
+ rule
1081
+ p
1082
+ 5
1083
+ I
1084
+ 0
1085
+ I
1086
+ 23
1087
+ I
1088
+ 9
1089
+ I
1090
+ 24
1091
+ I
1092
+ 13
1093
+ x
1094
+ 49
1095
+ /Users/michael/Projects/citrus/test/alias_test.rb
1096
+ p
1097
+ 0
1098
+ x
1099
+ 1
1100
+ b
1101
+ x
1102
+ 4
1103
+ rule
1104
+ x
1105
+ 1
1106
+ a
1107
+ x
1108
+ 5
1109
+ Input
1110
+ n
1111
+ x
1112
+ 8
1113
+ allocate
1114
+ s
1115
+ 3
1116
+ abc
1117
+ x
1118
+ 10
1119
+ initialize
1120
+ x
1121
+ 4
1122
+ exec
1123
+ x
1124
+ 5
1125
+ CLOSE
1126
+ n
1127
+ x
1128
+ 12
1129
+ assert_equal
1130
+ p
1131
+ 15
1132
+ I
1133
+ -1
1134
+ I
1135
+ 1e
1136
+ I
1137
+ 0
1138
+ I
1139
+ 1f
1140
+ I
1141
+ b
1142
+ I
1143
+ 22
1144
+ I
1145
+ 16
1146
+ I
1147
+ 26
1148
+ I
1149
+ 20
1150
+ I
1151
+ 27
1152
+ I
1153
+ 2a
1154
+ I
1155
+ 28
1156
+ I
1157
+ 50
1158
+ I
1159
+ 29
1160
+ I
1161
+ 61
1162
+ x
1163
+ 49
1164
+ /Users/michael/Projects/citrus/test/alias_test.rb
1165
+ p
1166
+ 5
1167
+ x
1168
+ 8
1169
+ grammar1
1170
+ x
1171
+ 8
1172
+ grammar2
1173
+ x
1174
+ 7
1175
+ rule_b2
1176
+ x
1177
+ 7
1178
+ rule_a1
1179
+ x
1180
+ 6
1181
+ events
1182
+ x
1183
+ 9
1184
+ test_to_s
1185
+ M
1186
+ 1
1187
+ n
1188
+ n
1189
+ x
1190
+ 9
1191
+ test_to_s
1192
+ i
1193
+ 45
1194
+ 45
1195
+ 0
1196
+ 1
1197
+ 13
1198
+ 71
1199
+ 2
1200
+ 47
1201
+ 9
1202
+ 23
1203
+ 47
1204
+ 49
1205
+ 3
1206
+ 0
1207
+ 13
1208
+ 7
1209
+ 4
1210
+ 47
1211
+ 49
1212
+ 5
1213
+ 1
1214
+ 15
1215
+ 8
1216
+ 28
1217
+ 7
1218
+ 4
1219
+ 49
1220
+ 2
1221
+ 1
1222
+ 19
1223
+ 0
1224
+ 15
1225
+ 5
1226
+ 7
1227
+ 6
1228
+ 64
1229
+ 20
1230
+ 0
1231
+ 49
1232
+ 7
1233
+ 0
1234
+ 47
1235
+ 49
1236
+ 8
1237
+ 2
1238
+ 11
1239
+ I
1240
+ 4
1241
+ I
1242
+ 1
1243
+ I
1244
+ 0
1245
+ I
1246
+ 0
1247
+ n
1248
+ p
1249
+ 9
1250
+ x
1251
+ 5
1252
+ Alias
1253
+ n
1254
+ x
1255
+ 3
1256
+ new
1257
+ x
1258
+ 8
1259
+ allocate
1260
+ x
1261
+ 5
1262
+ alpha
1263
+ x
1264
+ 10
1265
+ initialize
1266
+ s
1267
+ 5
1268
+ alpha
1269
+ x
1270
+ 4
1271
+ to_s
1272
+ x
1273
+ 12
1274
+ assert_equal
1275
+ p
1276
+ 7
1277
+ I
1278
+ -1
1279
+ I
1280
+ 2c
1281
+ I
1282
+ 0
1283
+ I
1284
+ 2d
1285
+ I
1286
+ 1f
1287
+ I
1288
+ 2e
1289
+ I
1290
+ 2d
1291
+ x
1292
+ 49
1293
+ /Users/michael/Projects/citrus/test/alias_test.rb
1294
+ p
1295
+ 1
1296
+ x
1297
+ 4
1298
+ rule
1299
+ x
1300
+ 20
1301
+ test_to_s_with_label
1302
+ M
1303
+ 1
1304
+ n
1305
+ n
1306
+ x
1307
+ 20
1308
+ test_to_s_with_label
1309
+ i
1310
+ 58
1311
+ 45
1312
+ 0
1313
+ 1
1314
+ 13
1315
+ 71
1316
+ 2
1317
+ 47
1318
+ 9
1319
+ 23
1320
+ 47
1321
+ 49
1322
+ 3
1323
+ 0
1324
+ 13
1325
+ 7
1326
+ 4
1327
+ 47
1328
+ 49
1329
+ 5
1330
+ 1
1331
+ 15
1332
+ 8
1333
+ 28
1334
+ 7
1335
+ 4
1336
+ 49
1337
+ 2
1338
+ 1
1339
+ 19
1340
+ 0
1341
+ 15
1342
+ 20
1343
+ 0
1344
+ 7
1345
+ 6
1346
+ 64
1347
+ 13
1348
+ 18
1349
+ 2
1350
+ 49
1351
+ 7
1352
+ 1
1353
+ 15
1354
+ 15
1355
+ 5
1356
+ 7
1357
+ 8
1358
+ 64
1359
+ 20
1360
+ 0
1361
+ 49
1362
+ 9
1363
+ 0
1364
+ 47
1365
+ 49
1366
+ 10
1367
+ 2
1368
+ 11
1369
+ I
1370
+ 4
1371
+ I
1372
+ 1
1373
+ I
1374
+ 0
1375
+ I
1376
+ 0
1377
+ n
1378
+ p
1379
+ 11
1380
+ x
1381
+ 5
1382
+ Alias
1383
+ n
1384
+ x
1385
+ 3
1386
+ new
1387
+ x
1388
+ 8
1389
+ allocate
1390
+ x
1391
+ 5
1392
+ alpha
1393
+ x
1394
+ 10
1395
+ initialize
1396
+ s
1397
+ 7
1398
+ a_label
1399
+ x
1400
+ 6
1401
+ label=
1402
+ s
1403
+ 13
1404
+ a_label:alpha
1405
+ x
1406
+ 4
1407
+ to_s
1408
+ x
1409
+ 12
1410
+ assert_equal
1411
+ p
1412
+ 9
1413
+ I
1414
+ -1
1415
+ I
1416
+ 31
1417
+ I
1418
+ 0
1419
+ I
1420
+ 32
1421
+ I
1422
+ 1f
1423
+ I
1424
+ 33
1425
+ I
1426
+ 2c
1427
+ I
1428
+ 34
1429
+ I
1430
+ 3a
1431
+ x
1432
+ 49
1433
+ /Users/michael/Projects/citrus/test/alias_test.rb
1434
+ p
1435
+ 1
1436
+ x
1437
+ 4
1438
+ rule
1439
+ p
1440
+ 13
1441
+ I
1442
+ 2
1443
+ I
1444
+ 4
1445
+ I
1446
+ 10
1447
+ I
1448
+ 9
1449
+ I
1450
+ 1e
1451
+ I
1452
+ 14
1453
+ I
1454
+ 2c
1455
+ I
1456
+ 1e
1457
+ I
1458
+ 3a
1459
+ I
1460
+ 2c
1461
+ I
1462
+ 48
1463
+ I
1464
+ 31
1465
+ I
1466
+ 56
1467
+ x
1468
+ 49
1469
+ /Users/michael/Projects/citrus/test/alias_test.rb
1470
+ p
1471
+ 0
1472
+ x
1473
+ 13
1474
+ attach_method
1475
+ p
1476
+ 5
1477
+ I
1478
+ 0
1479
+ I
1480
+ 1
1481
+ I
1482
+ 13
1483
+ I
1484
+ 3
1485
+ I
1486
+ 36
1487
+ x
1488
+ 49
1489
+ /Users/michael/Projects/citrus/test/alias_test.rb
1490
+ p
1491
+ 0