ruby_parser 3.20.3 → 3.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +38 -0
- data/Manifest.txt +14 -24
- data/README.rdoc +3 -3
- data/Rakefile +113 -115
- data/compare/normalize.rb +2 -0
- data/lib/ruby_lexer.rb +9 -16
- data/lib/ruby_lexer.rex.rb +1 -2
- data/lib/ruby_parser.rb +15 -13
- data/lib/{ruby_parser.yy → ruby_parser2.yy} +3 -10
- data/lib/{ruby20_parser.rb → ruby_parser20.rb} +9 -12
- data/lib/{ruby21_parser.rb → ruby_parser21.rb} +9 -12
- data/lib/{ruby22_parser.rb → ruby_parser22.rb} +9 -12
- data/lib/{ruby23_parser.rb → ruby_parser23.rb} +9 -12
- data/lib/{ruby24_parser.rb → ruby_parser24.rb} +9 -12
- data/lib/{ruby25_parser.rb → ruby_parser25.rb} +9 -12
- data/lib/{ruby26_parser.rb → ruby_parser26.rb} +9 -12
- data/lib/{ruby27_parser.rb → ruby_parser27.rb} +9 -12
- data/lib/{ruby3_parser.yy → ruby_parser3.yy} +7 -33
- data/lib/{ruby30_parser.rb → ruby_parser30.rb} +11 -35
- data/lib/{ruby31_parser.rb → ruby_parser31.rb} +11 -35
- data/lib/{ruby32_parser.rb → ruby_parser32.rb} +11 -35
- data/lib/ruby_parser33.rb +13577 -0
- data/lib/ruby_parser_extras.rb +35 -17
- data/test/test_ruby_lexer.rb +5 -5
- data/test/test_ruby_parser.rb +22 -20
- data.tar.gz.sig +0 -0
- metadata +41 -51
- metadata.gz.sig +0 -0
- data/lib/ruby20_parser.y +0 -2707
- data/lib/ruby21_parser.y +0 -2724
- data/lib/ruby22_parser.y +0 -2735
- data/lib/ruby23_parser.y +0 -2737
- data/lib/ruby24_parser.y +0 -2745
- data/lib/ruby25_parser.y +0 -2745
- data/lib/ruby26_parser.y +0 -2760
- data/lib/ruby27_parser.y +0 -3360
- data/lib/ruby30_parser.y +0 -3508
- data/lib/ruby31_parser.y +0 -3542
- data/lib/ruby32_parser.y +0 -3543
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
5
|
+
# This file is automatically generated by Racc 1.8.0
|
6
|
+
# from Racc grammar file "stdin".
|
5
7
|
#
|
6
8
|
|
7
9
|
require 'racc/parser.rb'
|
@@ -8057,6 +8059,7 @@ Racc_arg = [
|
|
8057
8059
|
racc_shift_n,
|
8058
8060
|
racc_reduce_n,
|
8059
8061
|
racc_use_result_var ]
|
8062
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
8060
8063
|
|
8061
8064
|
Racc_token_to_s_table = [
|
8062
8065
|
"$end",
|
@@ -8459,6 +8462,7 @@ Racc_token_to_s_table = [
|
|
8459
8462
|
"blkarg_mark",
|
8460
8463
|
"@43",
|
8461
8464
|
"assoc" ]
|
8465
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
8462
8466
|
|
8463
8467
|
Racc_debug_parser = false
|
8464
8468
|
|
@@ -10369,7 +10373,6 @@ end
|
|
10369
10373
|
def _reduce_336(val, _values, result)
|
10370
10374
|
result = new_class val
|
10371
10375
|
self.env.unextend
|
10372
|
-
self.lexer.ignore_body_comments
|
10373
10376
|
|
10374
10377
|
result
|
10375
10378
|
end
|
@@ -10392,7 +10395,6 @@ end
|
|
10392
10395
|
def _reduce_339(val, _values, result)
|
10393
10396
|
result = new_sclass val
|
10394
10397
|
self.env.unextend
|
10395
|
-
self.lexer.ignore_body_comments
|
10396
10398
|
|
10397
10399
|
result
|
10398
10400
|
end
|
@@ -10409,7 +10411,6 @@ end
|
|
10409
10411
|
def _reduce_341(val, _values, result)
|
10410
10412
|
result = new_module val
|
10411
10413
|
self.env.unextend
|
10412
|
-
self.lexer.ignore_body_comments
|
10413
10414
|
|
10414
10415
|
result
|
10415
10416
|
end
|
@@ -10433,8 +10434,6 @@ def _reduce_343(val, _values, result)
|
|
10433
10434
|
self.env.unextend
|
10434
10435
|
self.in_def = in_def
|
10435
10436
|
|
10436
|
-
self.lexer.ignore_body_comments
|
10437
|
-
|
10438
10437
|
result
|
10439
10438
|
end
|
10440
10439
|
|
@@ -10478,8 +10477,6 @@ def _reduce_346(val, _values, result)
|
|
10478
10477
|
|
10479
10478
|
# TODO: restore cur_arg ? what's cur_arg?
|
10480
10479
|
|
10481
|
-
self.lexer.ignore_body_comments
|
10482
|
-
|
10483
10480
|
result
|
10484
10481
|
end
|
10485
10482
|
|
@@ -10532,19 +10529,19 @@ end
|
|
10532
10529
|
# reduce 358 omitted
|
10533
10530
|
|
10534
10531
|
def _reduce_359(val, _values, result)
|
10535
|
-
|
10532
|
+
result << self.lexer.comment
|
10536
10533
|
|
10537
10534
|
result
|
10538
10535
|
end
|
10539
10536
|
|
10540
10537
|
def _reduce_360(val, _values, result)
|
10541
|
-
|
10538
|
+
result << self.lexer.comment
|
10542
10539
|
|
10543
10540
|
result
|
10544
10541
|
end
|
10545
10542
|
|
10546
10543
|
def _reduce_361(val, _values, result)
|
10547
|
-
|
10544
|
+
result << self.lexer.comment
|
10548
10545
|
|
10549
10546
|
result
|
10550
10547
|
end
|
@@ -6,6 +6,8 @@ class Ruby30Parser
|
|
6
6
|
class Ruby31Parser
|
7
7
|
#elif V == 32
|
8
8
|
class Ruby32Parser
|
9
|
+
#elif V == 33
|
10
|
+
class Ruby33Parser
|
9
11
|
#else
|
10
12
|
fail "version not specified or supported on code generation"
|
11
13
|
#endif
|
@@ -420,8 +422,7 @@ rule
|
|
420
422
|
}
|
421
423
|
defn_head: k_def def_name
|
422
424
|
{
|
423
|
-
|
424
|
-
result = name
|
425
|
+
result = val
|
425
426
|
}
|
426
427
|
defs_head: k_def singleton dot_or_colon
|
427
428
|
{
|
@@ -438,9 +439,7 @@ rule
|
|
438
439
|
# lexer.cmdarg.push false
|
439
440
|
# lexer.cond.push false
|
440
441
|
|
441
|
-
|
442
|
-
|
443
|
-
result = [recv, name]
|
442
|
+
result = val
|
444
443
|
}
|
445
444
|
|
446
445
|
expr_value: expr
|
@@ -1520,7 +1519,6 @@ rule
|
|
1520
1519
|
{
|
1521
1520
|
result = new_class val
|
1522
1521
|
self.env.unextend
|
1523
|
-
self.lexer.ignore_body_comments
|
1524
1522
|
}
|
1525
1523
|
| k_class tLSHFT
|
1526
1524
|
expr
|
@@ -1539,7 +1537,6 @@ rule
|
|
1539
1537
|
{
|
1540
1538
|
result = new_sclass val
|
1541
1539
|
self.env.unextend
|
1542
|
-
self.lexer.ignore_body_comments
|
1543
1540
|
}
|
1544
1541
|
| k_module
|
1545
1542
|
cpath
|
@@ -1553,39 +1550,18 @@ rule
|
|
1553
1550
|
{
|
1554
1551
|
result = new_module val
|
1555
1552
|
self.env.unextend
|
1556
|
-
self.lexer.ignore_body_comments
|
1557
1553
|
}
|
1558
1554
|
| defn_head f_arglist bodystmt k_end
|
1559
1555
|
{
|
1560
|
-
# [ [:f, 1, false], s(:args)...]
|
1561
|
-
# =>
|
1562
|
-
# [[:k_def, 666], [:f, 1], false, s(:args)...]
|
1563
|
-
val.insert 1, val.first.pop
|
1564
|
-
val.insert 0, [:k_def, 666]
|
1565
|
-
|
1566
1556
|
result, in_def = new_defn val
|
1567
1557
|
|
1568
1558
|
lexer.cond.pop # group = local_pop
|
1569
1559
|
lexer.cmdarg.pop
|
1570
1560
|
self.env.unextend
|
1571
1561
|
self.in_def = in_def
|
1572
|
-
|
1573
|
-
self.lexer.ignore_body_comments
|
1574
1562
|
}
|
1575
1563
|
| defs_head f_arglist bodystmt k_end
|
1576
1564
|
{
|
1577
|
-
# [ [recv, [:name, 1, false]], s(:args...]
|
1578
|
-
# =>
|
1579
|
-
# [ recv, [:name, 1, false], s(:args...]
|
1580
|
-
# =>
|
1581
|
-
# [ recv, [:name, 1], false, s(:args...]
|
1582
|
-
# =>
|
1583
|
-
# [ :k_def, recv, [:name, 1], false, s(:args...]
|
1584
|
-
|
1585
|
-
val.prepend(*val.shift)
|
1586
|
-
val.insert 2, val[1].pop
|
1587
|
-
val.insert 0, [:k_def, 666]
|
1588
|
-
|
1589
1565
|
result, in_def = new_defs val
|
1590
1566
|
|
1591
1567
|
lexer.cond.pop # group = local_pop
|
@@ -1596,8 +1572,6 @@ rule
|
|
1596
1572
|
self.in_single -= 1
|
1597
1573
|
|
1598
1574
|
# TODO: restore cur_arg ? what's cur_arg?
|
1599
|
-
|
1600
|
-
self.lexer.ignore_body_comments
|
1601
1575
|
}
|
1602
1576
|
| kBREAK
|
1603
1577
|
{
|
@@ -1635,16 +1609,16 @@ rule
|
|
1635
1609
|
k_for: kFOR
|
1636
1610
|
k_class: kCLASS
|
1637
1611
|
{
|
1638
|
-
|
1612
|
+
result << self.lexer.comment
|
1639
1613
|
}
|
1640
1614
|
k_module: kMODULE
|
1641
1615
|
{
|
1642
|
-
|
1616
|
+
result << self.lexer.comment
|
1643
1617
|
}
|
1644
1618
|
k_def: kDEF
|
1645
1619
|
{
|
1646
|
-
self.comments.push self.lexer.comments
|
1647
1620
|
self.in_argdef = true
|
1621
|
+
result << self.lexer.comment
|
1648
1622
|
}
|
1649
1623
|
k_do: kDO
|
1650
1624
|
k_do_block: kDO_BLOCK
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
5
|
+
# This file is automatically generated by Racc 1.8.0
|
6
|
+
# from Racc grammar file "stdin".
|
5
7
|
#
|
6
8
|
|
7
9
|
require 'racc/parser.rb'
|
@@ -8259,6 +8261,7 @@ Racc_arg = [
|
|
8259
8261
|
racc_shift_n,
|
8260
8262
|
racc_reduce_n,
|
8261
8263
|
racc_use_result_var ]
|
8264
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
8262
8265
|
|
8263
8266
|
Racc_token_to_s_table = [
|
8264
8267
|
"$end",
|
@@ -8666,6 +8669,7 @@ Racc_token_to_s_table = [
|
|
8666
8669
|
"blkarg_mark",
|
8667
8670
|
"@38",
|
8668
8671
|
"assoc" ]
|
8672
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
8669
8673
|
|
8670
8674
|
Racc_debug_parser = false
|
8671
8675
|
|
@@ -9101,8 +9105,7 @@ def _reduce_62(val, _values, result)
|
|
9101
9105
|
end
|
9102
9106
|
|
9103
9107
|
def _reduce_63(val, _values, result)
|
9104
|
-
|
9105
|
-
result = name
|
9108
|
+
result = val
|
9106
9109
|
|
9107
9110
|
result
|
9108
9111
|
end
|
@@ -9123,9 +9126,7 @@ def _reduce_65(val, _values, result)
|
|
9123
9126
|
# lexer.cmdarg.push false
|
9124
9127
|
# lexer.cond.push false
|
9125
9128
|
|
9126
|
-
|
9127
|
-
|
9128
|
-
result = [recv, name]
|
9129
|
+
result = val
|
9129
9130
|
|
9130
9131
|
result
|
9131
9132
|
end
|
@@ -10652,7 +10653,6 @@ end
|
|
10652
10653
|
def _reduce_344(val, _values, result)
|
10653
10654
|
result = new_class val
|
10654
10655
|
self.env.unextend
|
10655
|
-
self.lexer.ignore_body_comments
|
10656
10656
|
|
10657
10657
|
result
|
10658
10658
|
end
|
@@ -10675,7 +10675,6 @@ end
|
|
10675
10675
|
def _reduce_347(val, _values, result)
|
10676
10676
|
result = new_sclass val
|
10677
10677
|
self.env.unextend
|
10678
|
-
self.lexer.ignore_body_comments
|
10679
10678
|
|
10680
10679
|
result
|
10681
10680
|
end
|
@@ -10692,18 +10691,11 @@ end
|
|
10692
10691
|
def _reduce_349(val, _values, result)
|
10693
10692
|
result = new_module val
|
10694
10693
|
self.env.unextend
|
10695
|
-
self.lexer.ignore_body_comments
|
10696
10694
|
|
10697
10695
|
result
|
10698
10696
|
end
|
10699
10697
|
|
10700
10698
|
def _reduce_350(val, _values, result)
|
10701
|
-
# [ [:f, 1, false], s(:args)...]
|
10702
|
-
# =>
|
10703
|
-
# [[:k_def, 666], [:f, 1], false, s(:args)...]
|
10704
|
-
val.insert 1, val.first.pop
|
10705
|
-
val.insert 0, [:k_def, 666]
|
10706
|
-
|
10707
10699
|
result, in_def = new_defn val
|
10708
10700
|
|
10709
10701
|
lexer.cond.pop # group = local_pop
|
@@ -10711,24 +10703,10 @@ def _reduce_350(val, _values, result)
|
|
10711
10703
|
self.env.unextend
|
10712
10704
|
self.in_def = in_def
|
10713
10705
|
|
10714
|
-
self.lexer.ignore_body_comments
|
10715
|
-
|
10716
10706
|
result
|
10717
10707
|
end
|
10718
10708
|
|
10719
10709
|
def _reduce_351(val, _values, result)
|
10720
|
-
# [ [recv, [:name, 1, false]], s(:args...]
|
10721
|
-
# =>
|
10722
|
-
# [ recv, [:name, 1, false], s(:args...]
|
10723
|
-
# =>
|
10724
|
-
# [ recv, [:name, 1], false, s(:args...]
|
10725
|
-
# =>
|
10726
|
-
# [ :k_def, recv, [:name, 1], false, s(:args...]
|
10727
|
-
|
10728
|
-
val.prepend(*val.shift)
|
10729
|
-
val.insert 2, val[1].pop
|
10730
|
-
val.insert 0, [:k_def, 666]
|
10731
|
-
|
10732
10710
|
result, in_def = new_defs val
|
10733
10711
|
|
10734
10712
|
lexer.cond.pop # group = local_pop
|
@@ -10740,8 +10718,6 @@ def _reduce_351(val, _values, result)
|
|
10740
10718
|
|
10741
10719
|
# TODO: restore cur_arg ? what's cur_arg?
|
10742
10720
|
|
10743
|
-
self.lexer.ignore_body_comments
|
10744
|
-
|
10745
10721
|
result
|
10746
10722
|
end
|
10747
10723
|
|
@@ -10794,20 +10770,20 @@ end
|
|
10794
10770
|
# reduce 363 omitted
|
10795
10771
|
|
10796
10772
|
def _reduce_364(val, _values, result)
|
10797
|
-
|
10773
|
+
result << self.lexer.comment
|
10798
10774
|
|
10799
10775
|
result
|
10800
10776
|
end
|
10801
10777
|
|
10802
10778
|
def _reduce_365(val, _values, result)
|
10803
|
-
|
10779
|
+
result << self.lexer.comment
|
10804
10780
|
|
10805
10781
|
result
|
10806
10782
|
end
|
10807
10783
|
|
10808
10784
|
def _reduce_366(val, _values, result)
|
10809
|
-
self.comments.push self.lexer.comments
|
10810
10785
|
self.in_argdef = true
|
10786
|
+
result << self.lexer.comment
|
10811
10787
|
|
10812
10788
|
result
|
10813
10789
|
end
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
5
|
+
# This file is automatically generated by Racc 1.8.0
|
6
|
+
# from Racc grammar file "stdin".
|
5
7
|
#
|
6
8
|
|
7
9
|
require 'racc/parser.rb'
|
@@ -8522,6 +8524,7 @@ Racc_arg = [
|
|
8522
8524
|
racc_shift_n,
|
8523
8525
|
racc_reduce_n,
|
8524
8526
|
racc_use_result_var ]
|
8527
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
8525
8528
|
|
8526
8529
|
Racc_token_to_s_table = [
|
8527
8530
|
"$end",
|
@@ -8933,6 +8936,7 @@ Racc_token_to_s_table = [
|
|
8933
8936
|
"blkarg_mark",
|
8934
8937
|
"@39",
|
8935
8938
|
"assoc" ]
|
8939
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
8936
8940
|
|
8937
8941
|
Racc_debug_parser = false
|
8938
8942
|
|
@@ -9392,8 +9396,7 @@ def _reduce_66(val, _values, result)
|
|
9392
9396
|
end
|
9393
9397
|
|
9394
9398
|
def _reduce_67(val, _values, result)
|
9395
|
-
|
9396
|
-
result = name
|
9399
|
+
result = val
|
9397
9400
|
|
9398
9401
|
result
|
9399
9402
|
end
|
@@ -9414,9 +9417,7 @@ def _reduce_69(val, _values, result)
|
|
9414
9417
|
# lexer.cmdarg.push false
|
9415
9418
|
# lexer.cond.push false
|
9416
9419
|
|
9417
|
-
|
9418
|
-
|
9419
|
-
result = [recv, name]
|
9420
|
+
result = val
|
9420
9421
|
|
9421
9422
|
result
|
9422
9423
|
end
|
@@ -10950,7 +10951,6 @@ end
|
|
10950
10951
|
def _reduce_349(val, _values, result)
|
10951
10952
|
result = new_class val
|
10952
10953
|
self.env.unextend
|
10953
|
-
self.lexer.ignore_body_comments
|
10954
10954
|
|
10955
10955
|
result
|
10956
10956
|
end
|
@@ -10973,7 +10973,6 @@ end
|
|
10973
10973
|
def _reduce_352(val, _values, result)
|
10974
10974
|
result = new_sclass val
|
10975
10975
|
self.env.unextend
|
10976
|
-
self.lexer.ignore_body_comments
|
10977
10976
|
|
10978
10977
|
result
|
10979
10978
|
end
|
@@ -10990,18 +10989,11 @@ end
|
|
10990
10989
|
def _reduce_354(val, _values, result)
|
10991
10990
|
result = new_module val
|
10992
10991
|
self.env.unextend
|
10993
|
-
self.lexer.ignore_body_comments
|
10994
10992
|
|
10995
10993
|
result
|
10996
10994
|
end
|
10997
10995
|
|
10998
10996
|
def _reduce_355(val, _values, result)
|
10999
|
-
# [ [:f, 1, false], s(:args)...]
|
11000
|
-
# =>
|
11001
|
-
# [[:k_def, 666], [:f, 1], false, s(:args)...]
|
11002
|
-
val.insert 1, val.first.pop
|
11003
|
-
val.insert 0, [:k_def, 666]
|
11004
|
-
|
11005
10997
|
result, in_def = new_defn val
|
11006
10998
|
|
11007
10999
|
lexer.cond.pop # group = local_pop
|
@@ -11009,24 +11001,10 @@ def _reduce_355(val, _values, result)
|
|
11009
11001
|
self.env.unextend
|
11010
11002
|
self.in_def = in_def
|
11011
11003
|
|
11012
|
-
self.lexer.ignore_body_comments
|
11013
|
-
|
11014
11004
|
result
|
11015
11005
|
end
|
11016
11006
|
|
11017
11007
|
def _reduce_356(val, _values, result)
|
11018
|
-
# [ [recv, [:name, 1, false]], s(:args...]
|
11019
|
-
# =>
|
11020
|
-
# [ recv, [:name, 1, false], s(:args...]
|
11021
|
-
# =>
|
11022
|
-
# [ recv, [:name, 1], false, s(:args...]
|
11023
|
-
# =>
|
11024
|
-
# [ :k_def, recv, [:name, 1], false, s(:args...]
|
11025
|
-
|
11026
|
-
val.prepend(*val.shift)
|
11027
|
-
val.insert 2, val[1].pop
|
11028
|
-
val.insert 0, [:k_def, 666]
|
11029
|
-
|
11030
11008
|
result, in_def = new_defs val
|
11031
11009
|
|
11032
11010
|
lexer.cond.pop # group = local_pop
|
@@ -11038,8 +11016,6 @@ def _reduce_356(val, _values, result)
|
|
11038
11016
|
|
11039
11017
|
# TODO: restore cur_arg ? what's cur_arg?
|
11040
11018
|
|
11041
|
-
self.lexer.ignore_body_comments
|
11042
|
-
|
11043
11019
|
result
|
11044
11020
|
end
|
11045
11021
|
|
@@ -11092,20 +11068,20 @@ end
|
|
11092
11068
|
# reduce 368 omitted
|
11093
11069
|
|
11094
11070
|
def _reduce_369(val, _values, result)
|
11095
|
-
|
11071
|
+
result << self.lexer.comment
|
11096
11072
|
|
11097
11073
|
result
|
11098
11074
|
end
|
11099
11075
|
|
11100
11076
|
def _reduce_370(val, _values, result)
|
11101
|
-
|
11077
|
+
result << self.lexer.comment
|
11102
11078
|
|
11103
11079
|
result
|
11104
11080
|
end
|
11105
11081
|
|
11106
11082
|
def _reduce_371(val, _values, result)
|
11107
|
-
self.comments.push self.lexer.comments
|
11108
11083
|
self.in_argdef = true
|
11084
|
+
result << self.lexer.comment
|
11109
11085
|
|
11110
11086
|
result
|
11111
11087
|
end
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
#
|
2
4
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
5
|
+
# This file is automatically generated by Racc 1.8.0
|
6
|
+
# from Racc grammar file "stdin".
|
5
7
|
#
|
6
8
|
|
7
9
|
require 'racc/parser.rb'
|
@@ -8471,6 +8473,7 @@ Racc_arg = [
|
|
8471
8473
|
racc_shift_n,
|
8472
8474
|
racc_reduce_n,
|
8473
8475
|
racc_use_result_var ]
|
8476
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
8474
8477
|
|
8475
8478
|
Racc_token_to_s_table = [
|
8476
8479
|
"$end",
|
@@ -8882,6 +8885,7 @@ Racc_token_to_s_table = [
|
|
8882
8885
|
"blkarg_mark",
|
8883
8886
|
"@39",
|
8884
8887
|
"assoc" ]
|
8888
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
8885
8889
|
|
8886
8890
|
Racc_debug_parser = false
|
8887
8891
|
|
@@ -9341,8 +9345,7 @@ def _reduce_66(val, _values, result)
|
|
9341
9345
|
end
|
9342
9346
|
|
9343
9347
|
def _reduce_67(val, _values, result)
|
9344
|
-
|
9345
|
-
result = name
|
9348
|
+
result = val
|
9346
9349
|
|
9347
9350
|
result
|
9348
9351
|
end
|
@@ -9363,9 +9366,7 @@ def _reduce_69(val, _values, result)
|
|
9363
9366
|
# lexer.cmdarg.push false
|
9364
9367
|
# lexer.cond.push false
|
9365
9368
|
|
9366
|
-
|
9367
|
-
|
9368
|
-
result = [recv, name]
|
9369
|
+
result = val
|
9369
9370
|
|
9370
9371
|
result
|
9371
9372
|
end
|
@@ -10913,7 +10914,6 @@ end
|
|
10913
10914
|
def _reduce_351(val, _values, result)
|
10914
10915
|
result = new_class val
|
10915
10916
|
self.env.unextend
|
10916
|
-
self.lexer.ignore_body_comments
|
10917
10917
|
|
10918
10918
|
result
|
10919
10919
|
end
|
@@ -10936,7 +10936,6 @@ end
|
|
10936
10936
|
def _reduce_354(val, _values, result)
|
10937
10937
|
result = new_sclass val
|
10938
10938
|
self.env.unextend
|
10939
|
-
self.lexer.ignore_body_comments
|
10940
10939
|
|
10941
10940
|
result
|
10942
10941
|
end
|
@@ -10953,18 +10952,11 @@ end
|
|
10953
10952
|
def _reduce_356(val, _values, result)
|
10954
10953
|
result = new_module val
|
10955
10954
|
self.env.unextend
|
10956
|
-
self.lexer.ignore_body_comments
|
10957
10955
|
|
10958
10956
|
result
|
10959
10957
|
end
|
10960
10958
|
|
10961
10959
|
def _reduce_357(val, _values, result)
|
10962
|
-
# [ [:f, 1, false], s(:args)...]
|
10963
|
-
# =>
|
10964
|
-
# [[:k_def, 666], [:f, 1], false, s(:args)...]
|
10965
|
-
val.insert 1, val.first.pop
|
10966
|
-
val.insert 0, [:k_def, 666]
|
10967
|
-
|
10968
10960
|
result, in_def = new_defn val
|
10969
10961
|
|
10970
10962
|
lexer.cond.pop # group = local_pop
|
@@ -10972,24 +10964,10 @@ def _reduce_357(val, _values, result)
|
|
10972
10964
|
self.env.unextend
|
10973
10965
|
self.in_def = in_def
|
10974
10966
|
|
10975
|
-
self.lexer.ignore_body_comments
|
10976
|
-
|
10977
10967
|
result
|
10978
10968
|
end
|
10979
10969
|
|
10980
10970
|
def _reduce_358(val, _values, result)
|
10981
|
-
# [ [recv, [:name, 1, false]], s(:args...]
|
10982
|
-
# =>
|
10983
|
-
# [ recv, [:name, 1, false], s(:args...]
|
10984
|
-
# =>
|
10985
|
-
# [ recv, [:name, 1], false, s(:args...]
|
10986
|
-
# =>
|
10987
|
-
# [ :k_def, recv, [:name, 1], false, s(:args...]
|
10988
|
-
|
10989
|
-
val.prepend(*val.shift)
|
10990
|
-
val.insert 2, val[1].pop
|
10991
|
-
val.insert 0, [:k_def, 666]
|
10992
|
-
|
10993
10971
|
result, in_def = new_defs val
|
10994
10972
|
|
10995
10973
|
lexer.cond.pop # group = local_pop
|
@@ -11001,8 +10979,6 @@ def _reduce_358(val, _values, result)
|
|
11001
10979
|
|
11002
10980
|
# TODO: restore cur_arg ? what's cur_arg?
|
11003
10981
|
|
11004
|
-
self.lexer.ignore_body_comments
|
11005
|
-
|
11006
10982
|
result
|
11007
10983
|
end
|
11008
10984
|
|
@@ -11055,20 +11031,20 @@ end
|
|
11055
11031
|
# reduce 370 omitted
|
11056
11032
|
|
11057
11033
|
def _reduce_371(val, _values, result)
|
11058
|
-
|
11034
|
+
result << self.lexer.comment
|
11059
11035
|
|
11060
11036
|
result
|
11061
11037
|
end
|
11062
11038
|
|
11063
11039
|
def _reduce_372(val, _values, result)
|
11064
|
-
|
11040
|
+
result << self.lexer.comment
|
11065
11041
|
|
11066
11042
|
result
|
11067
11043
|
end
|
11068
11044
|
|
11069
11045
|
def _reduce_373(val, _values, result)
|
11070
|
-
self.comments.push self.lexer.comments
|
11071
11046
|
self.in_argdef = true
|
11047
|
+
result << self.lexer.comment
|
11072
11048
|
|
11073
11049
|
result
|
11074
11050
|
end
|