racc 1.4.15-java → 1.4.16-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/COPYING +22 -515
  3. data/Manifest.txt +3 -9
  4. data/README.ja.rdoc +3 -4
  5. data/README.rdoc +4 -4
  6. data/Rakefile +13 -55
  7. data/bin/racc +2 -4
  8. data/ext/racc/{cparse.c → cparse/cparse.c} +64 -31
  9. data/ext/racc/cparse/extconf.rb +8 -0
  10. data/lib/racc/cparse-jruby.jar +0 -0
  11. data/lib/racc/exception.rb +3 -5
  12. data/lib/racc/grammar.rb +5 -7
  13. data/lib/racc/grammarfileparser.rb +4 -3
  14. data/lib/racc/info.rb +4 -6
  15. data/lib/racc/iset.rb +2 -2
  16. data/lib/racc/logfilegenerator.rb +2 -2
  17. data/lib/racc/parser-text.rb +14 -11
  18. data/lib/racc/parser.rb +14 -11
  19. data/lib/racc/parserfilegenerator.rb +5 -7
  20. data/lib/racc/state.rb +11 -13
  21. data/test/assets/intp.y +4 -4
  22. data/test/assets/mailp.y +27 -27
  23. data/test/assets/mof.y +12 -12
  24. data/test/assets/nullbug2.y +2 -2
  25. data/test/assets/recv.y +20 -20
  26. data/test/assets/syntax.y +1 -1
  27. data/test/assets/twowaysql.y +1 -1
  28. data/test/helper.rb +65 -54
  29. data/test/regress/cadenza +60 -60
  30. data/test/regress/cast +8 -8
  31. data/test/regress/csspool +167 -167
  32. data/test/regress/edtf +115 -115
  33. data/test/regress/huia +75 -75
  34. data/test/regress/journey +12 -12
  35. data/test/regress/liquor +54 -54
  36. data/test/regress/machete +37 -37
  37. data/test/regress/mediacloth +83 -83
  38. data/test/regress/mof +60 -60
  39. data/test/regress/namae +29 -29
  40. data/test/regress/nasl +174 -174
  41. data/test/regress/nokogiri-css +59 -59
  42. data/test/regress/opal +352 -352
  43. data/test/regress/php_serialization +20 -20
  44. data/test/regress/riml +261 -261
  45. data/test/regress/ruby18 +353 -353
  46. data/test/regress/ruby22 +433 -433
  47. data/test/regress/tp_plus +125 -125
  48. data/test/regress/twowaysql +30 -30
  49. data/test/test_chk_y.rb +1 -0
  50. data/test/test_racc_command.rb +5 -24
  51. data/test/test_scan_y.rb +1 -0
  52. data/test/testscanner.rb +1 -1
  53. metadata +8 -75
  54. data/ext/racc/depend +0 -1
  55. data/ext/racc/extconf.rb +0 -7
  56. data/test/assets/bibtex.y +0 -141
  57. data/test/assets/rdblockparser.y +0 -576
  58. data/test/assets/rdinlineparser.y +0 -561
  59. data/test/regress/bibtex +0 -474
  60. data/test/regress/rdblockparser +0 -1061
  61. data/test/regress/rdinlineparser +0 -1243
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.4.14
4
- # from Racc grammer file "".
3
+ # This file is automatically generated by Racc 1.4.16.pre.1
4
+ # from Racc grammar file "".
5
5
  #
6
6
 
7
7
  require 'racc/parser.rb'
@@ -315,56 +315,56 @@ Racc_debug_parser = false
315
315
  module_eval(<<'.,.,', 'nokogiri-css.y', 9)
316
316
  def _reduce_1(val, _values, result)
317
317
  result = [val.first, val.last].flatten
318
-
318
+
319
319
  result
320
320
  end
321
321
  .,.,
322
322
 
323
323
  module_eval(<<'.,.,', 'nokogiri-css.y', 11)
324
324
  def _reduce_2(val, _values, result)
325
- result = val.flatten
325
+ result = val.flatten
326
326
  result
327
327
  end
328
328
  .,.,
329
329
 
330
330
  module_eval(<<'.,.,', 'nokogiri-css.y', 12)
331
331
  def _reduce_3(val, _values, result)
332
- result = [val.last].flatten
332
+ result = [val.last].flatten
333
333
  result
334
334
  end
335
335
  .,.,
336
336
 
337
337
  module_eval(<<'.,.,', 'nokogiri-css.y', 15)
338
338
  def _reduce_4(val, _values, result)
339
- result = :DIRECT_ADJACENT_SELECTOR
339
+ result = :DIRECT_ADJACENT_SELECTOR
340
340
  result
341
341
  end
342
342
  .,.,
343
343
 
344
344
  module_eval(<<'.,.,', 'nokogiri-css.y', 16)
345
345
  def _reduce_5(val, _values, result)
346
- result = :CHILD_SELECTOR
346
+ result = :CHILD_SELECTOR
347
347
  result
348
348
  end
349
349
  .,.,
350
350
 
351
351
  module_eval(<<'.,.,', 'nokogiri-css.y', 17)
352
352
  def _reduce_6(val, _values, result)
353
- result = :FOLLOWING_SELECTOR
353
+ result = :FOLLOWING_SELECTOR
354
354
  result
355
355
  end
356
356
  .,.,
357
357
 
358
358
  module_eval(<<'.,.,', 'nokogiri-css.y', 18)
359
359
  def _reduce_7(val, _values, result)
360
- result = :DESCENDANT_SELECTOR
360
+ result = :DESCENDANT_SELECTOR
361
361
  result
362
362
  end
363
363
  .,.,
364
364
 
365
365
  module_eval(<<'.,.,', 'nokogiri-css.y', 19)
366
366
  def _reduce_8(val, _values, result)
367
- result = :CHILD_SELECTOR
367
+ result = :CHILD_SELECTOR
368
368
  result
369
369
  end
370
370
  .,.,
@@ -376,7 +376,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 23)
376
376
  else
377
377
  Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]])
378
378
  end
379
-
379
+
380
380
  result
381
381
  end
382
382
  .,.,
@@ -386,7 +386,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 23)
386
386
  module_eval(<<'.,.,', 'nokogiri-css.y', 31)
387
387
  def _reduce_11(val, _values, result)
388
388
  result = Node.new(:CONDITIONAL_SELECTOR, val)
389
-
389
+
390
390
  result
391
391
  end
392
392
  .,.,
@@ -394,7 +394,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 31)
394
394
  module_eval(<<'.,.,', 'nokogiri-css.y', 34)
395
395
  def _reduce_12(val, _values, result)
396
396
  result = Node.new(:CONDITIONAL_SELECTOR, val)
397
-
397
+
398
398
  result
399
399
  end
400
400
  .,.,
@@ -404,7 +404,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 37)
404
404
  result = Node.new(:CONDITIONAL_SELECTOR,
405
405
  [Node.new(:ELEMENT_NAME, ['*']), val.first]
406
406
  )
407
-
407
+
408
408
  result
409
409
  end
410
410
  .,.,
@@ -412,7 +412,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 37)
412
412
  module_eval(<<'.,.,', 'nokogiri-css.y', 44)
413
413
  def _reduce_14(val, _values, result)
414
414
  result = Node.new(val.first, [nil, val.last])
415
-
415
+
416
416
  result
417
417
  end
418
418
  .,.,
@@ -420,7 +420,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 44)
420
420
  module_eval(<<'.,.,', 'nokogiri-css.y', 49)
421
421
  def _reduce_15(val, _values, result)
422
422
  result = Node.new(val[1], [val.first, val.last])
423
-
423
+
424
424
  result
425
425
  end
426
426
  .,.,
@@ -428,7 +428,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 49)
428
428
  module_eval(<<'.,.,', 'nokogiri-css.y', 52)
429
429
  def _reduce_16(val, _values, result)
430
430
  result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last])
431
-
431
+
432
432
  result
433
433
  end
434
434
  .,.,
@@ -437,7 +437,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 52)
437
437
 
438
438
  module_eval(<<'.,.,', 'nokogiri-css.y', 57)
439
439
  def _reduce_18(val, _values, result)
440
- result = Node.new(:CLASS_CONDITION, [val[1]])
440
+ result = Node.new(:CLASS_CONDITION, [val[1]])
441
441
  result
442
442
  end
443
443
  .,.,
@@ -446,7 +446,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 57)
446
446
 
447
447
  module_eval(<<'.,.,', 'nokogiri-css.y', 61)
448
448
  def _reduce_20(val, _values, result)
449
- result = Node.new(:ELEMENT_NAME, val)
449
+ result = Node.new(:ELEMENT_NAME, val)
450
450
  result
451
451
  end
452
452
  .,.,
@@ -456,7 +456,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 65)
456
456
  result = Node.new(:ELEMENT_NAME,
457
457
  [[val.first, val.last].compact.join(':')]
458
458
  )
459
-
459
+
460
460
  result
461
461
  end
462
462
  .,.,
@@ -465,14 +465,14 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 70)
465
465
  def _reduce_22(val, _values, result)
466
466
  name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first
467
467
  result = Node.new(:ELEMENT_NAME, [name])
468
-
468
+
469
469
  result
470
470
  end
471
471
  .,.,
472
472
 
473
473
  module_eval(<<'.,.,', 'nokogiri-css.y', 75)
474
474
  def _reduce_23(val, _values, result)
475
- result = val[0]
475
+ result = val[0]
476
476
  result
477
477
  end
478
478
  .,.,
@@ -484,7 +484,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 80)
484
484
  result = Node.new(:ATTRIBUTE_CONDITION,
485
485
  [val[1]] + (val[2] || [])
486
486
  )
487
-
487
+
488
488
  result
489
489
  end
490
490
  .,.,
@@ -494,7 +494,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 85)
494
494
  result = Node.new(:ATTRIBUTE_CONDITION,
495
495
  [val[1]] + (val[2] || [])
496
496
  )
497
-
497
+
498
498
  result
499
499
  end
500
500
  .,.,
@@ -505,7 +505,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 90)
505
505
  result = Node.new(:PSEUDO_CLASS,
506
506
  [Node.new(:FUNCTION, ['nth-child(', val[1]])]
507
507
  )
508
-
508
+
509
509
  result
510
510
  end
511
511
  .,.,
@@ -515,7 +515,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 98)
515
515
  result = Node.new(:ELEMENT_NAME,
516
516
  [[val.first, val.last].compact.join(':')]
517
517
  )
518
-
518
+
519
519
  result
520
520
  end
521
521
  .,.,
@@ -525,7 +525,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 103)
525
525
  # Default namespace is not applied to attributes.
526
526
  # So we don't add prefix "xmlns:" as in namespaced_ident.
527
527
  result = Node.new(:ELEMENT_NAME, [val.first])
528
-
528
+
529
529
  result
530
530
  end
531
531
  .,.,
@@ -533,7 +533,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 103)
533
533
  module_eval(<<'.,.,', 'nokogiri-css.y', 110)
534
534
  def _reduce_30(val, _values, result)
535
535
  result = Node.new(:FUNCTION, [val.first.strip])
536
-
536
+
537
537
  result
538
538
  end
539
539
  .,.,
@@ -541,7 +541,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 110)
541
541
  module_eval(<<'.,.,', 'nokogiri-css.y', 113)
542
542
  def _reduce_31(val, _values, result)
543
543
  result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
544
-
544
+
545
545
  result
546
546
  end
547
547
  .,.,
@@ -549,7 +549,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 113)
549
549
  module_eval(<<'.,.,', 'nokogiri-css.y', 116)
550
550
  def _reduce_32(val, _values, result)
551
551
  result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
552
-
552
+
553
553
  result
554
554
  end
555
555
  .,.,
@@ -557,7 +557,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 116)
557
557
  module_eval(<<'.,.,', 'nokogiri-css.y', 119)
558
558
  def _reduce_33(val, _values, result)
559
559
  result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
560
-
560
+
561
561
  result
562
562
  end
563
563
  .,.,
@@ -565,28 +565,28 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 119)
565
565
  module_eval(<<'.,.,', 'nokogiri-css.y', 122)
566
566
  def _reduce_34(val, _values, result)
567
567
  result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten)
568
-
568
+
569
569
  result
570
570
  end
571
571
  .,.,
572
572
 
573
573
  module_eval(<<'.,.,', 'nokogiri-css.y', 126)
574
574
  def _reduce_35(val, _values, result)
575
- result = [val.first, val.last]
575
+ result = [val.first, val.last]
576
576
  result
577
577
  end
578
578
  .,.,
579
579
 
580
580
  module_eval(<<'.,.,', 'nokogiri-css.y', 127)
581
581
  def _reduce_36(val, _values, result)
582
- result = [val.first, val.last]
582
+ result = [val.first, val.last]
583
583
  result
584
584
  end
585
585
  .,.,
586
586
 
587
587
  module_eval(<<'.,.,', 'nokogiri-css.y', 128)
588
588
  def _reduce_37(val, _values, result)
589
- result = [val.first, val.last]
589
+ result = [val.first, val.last]
590
590
  result
591
591
  end
592
592
  .,.,
@@ -611,7 +611,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 133)
611
611
  # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)'))
612
612
  result = val
613
613
  end
614
-
614
+
615
615
  result
616
616
  end
617
617
  .,.,
@@ -623,7 +623,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 152)
623
623
  else
624
624
  raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
625
625
  end
626
-
626
+
627
627
  result
628
628
  end
629
629
  .,.,
@@ -641,7 +641,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 158)
641
641
  else
642
642
  raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
643
643
  end
644
-
644
+
645
645
  result
646
646
  end
647
647
  .,.,
@@ -663,7 +663,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 170)
663
663
  else
664
664
  raise Racc::ParseError, "parse error on IDENT '#{val[1]}'"
665
665
  end
666
-
666
+
667
667
  result
668
668
  end
669
669
  .,.,
@@ -671,14 +671,14 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 170)
671
671
  module_eval(<<'.,.,', 'nokogiri-css.y', 189)
672
672
  def _reduce_44(val, _values, result)
673
673
  result = Node.new(:PSEUDO_CLASS, [val[1]])
674
-
674
+
675
675
  result
676
676
  end
677
677
  .,.,
678
678
 
679
679
  module_eval(<<'.,.,', 'nokogiri-css.y', 191)
680
680
  def _reduce_45(val, _values, result)
681
- result = Node.new(:PSEUDO_CLASS, [val[1]])
681
+ result = Node.new(:PSEUDO_CLASS, [val[1]])
682
682
  result
683
683
  end
684
684
  .,.,
@@ -690,7 +690,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 191)
690
690
  module_eval(<<'.,.,', 'nokogiri-css.y', 199)
691
691
  def _reduce_48(val, _values, result)
692
692
  result = Node.new(:COMBINATOR, val)
693
-
693
+
694
694
  result
695
695
  end
696
696
  .,.,
@@ -698,7 +698,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 199)
698
698
  module_eval(<<'.,.,', 'nokogiri-css.y', 202)
699
699
  def _reduce_49(val, _values, result)
700
700
  result = Node.new(:COMBINATOR, val)
701
-
701
+
702
702
  result
703
703
  end
704
704
  .,.,
@@ -706,7 +706,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 202)
706
706
  module_eval(<<'.,.,', 'nokogiri-css.y', 205)
707
707
  def _reduce_50(val, _values, result)
708
708
  result = Node.new(:COMBINATOR, val)
709
-
709
+
710
710
  result
711
711
  end
712
712
  .,.,
@@ -714,7 +714,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 205)
714
714
  module_eval(<<'.,.,', 'nokogiri-css.y', 208)
715
715
  def _reduce_51(val, _values, result)
716
716
  result = Node.new(:COMBINATOR, val)
717
-
717
+
718
718
  result
719
719
  end
720
720
  .,.,
@@ -722,7 +722,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 208)
722
722
  module_eval(<<'.,.,', 'nokogiri-css.y', 211)
723
723
  def _reduce_52(val, _values, result)
724
724
  result = Node.new(:COMBINATOR, val)
725
-
725
+
726
726
  result
727
727
  end
728
728
  .,.,
@@ -739,21 +739,21 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 211)
739
739
 
740
740
  module_eval(<<'.,.,', 'nokogiri-css.y', 220)
741
741
  def _reduce_58(val, _values, result)
742
- result = Node.new(:ID, val)
742
+ result = Node.new(:ID, val)
743
743
  result
744
744
  end
745
745
  .,.,
746
746
 
747
747
  module_eval(<<'.,.,', 'nokogiri-css.y', 223)
748
748
  def _reduce_59(val, _values, result)
749
- result = [val.first, val[1]]
749
+ result = [val.first, val[1]]
750
750
  result
751
751
  end
752
752
  .,.,
753
753
 
754
754
  module_eval(<<'.,.,', 'nokogiri-css.y', 224)
755
755
  def _reduce_60(val, _values, result)
756
- result = [val.first, val[1]]
756
+ result = [val.first, val[1]]
757
757
  result
758
758
  end
759
759
  .,.,
@@ -762,49 +762,49 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 224)
762
762
 
763
763
  module_eval(<<'.,.,', 'nokogiri-css.y', 228)
764
764
  def _reduce_62(val, _values, result)
765
- result = :equal
765
+ result = :equal
766
766
  result
767
767
  end
768
768
  .,.,
769
769
 
770
770
  module_eval(<<'.,.,', 'nokogiri-css.y', 229)
771
771
  def _reduce_63(val, _values, result)
772
- result = :prefix_match
772
+ result = :prefix_match
773
773
  result
774
774
  end
775
775
  .,.,
776
776
 
777
777
  module_eval(<<'.,.,', 'nokogiri-css.y', 230)
778
778
  def _reduce_64(val, _values, result)
779
- result = :suffix_match
779
+ result = :suffix_match
780
780
  result
781
781
  end
782
782
  .,.,
783
783
 
784
784
  module_eval(<<'.,.,', 'nokogiri-css.y', 231)
785
785
  def _reduce_65(val, _values, result)
786
- result = :substring_match
786
+ result = :substring_match
787
787
  result
788
788
  end
789
789
  .,.,
790
790
 
791
791
  module_eval(<<'.,.,', 'nokogiri-css.y', 232)
792
792
  def _reduce_66(val, _values, result)
793
- result = :not_equal
793
+ result = :not_equal
794
794
  result
795
795
  end
796
796
  .,.,
797
797
 
798
798
  module_eval(<<'.,.,', 'nokogiri-css.y', 233)
799
799
  def _reduce_67(val, _values, result)
800
- result = :includes
800
+ result = :includes
801
801
  result
802
802
  end
803
803
  .,.,
804
804
 
805
805
  module_eval(<<'.,.,', 'nokogiri-css.y', 234)
806
806
  def _reduce_68(val, _values, result)
807
- result = :dash_match
807
+ result = :dash_match
808
808
  result
809
809
  end
810
810
  .,.,
@@ -812,7 +812,7 @@ module_eval(<<'.,.,', 'nokogiri-css.y', 234)
812
812
  module_eval(<<'.,.,', 'nokogiri-css.y', 238)
813
813
  def _reduce_69(val, _values, result)
814
814
  result = Node.new(:NOT, [val[1]])
815
-
815
+
816
816
  result
817
817
  end
818
818
  .,.,
@@ -832,5 +832,5 @@ def _reduce_none(val, _values, result)
832
832
  end
833
833
 
834
834
  end # class Parser
835
- end # module CSS
836
- end # module Nokogiri
835
+ end # module CSS
836
+ end # module Nokogiri