ruby_parser 3.4.0 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c54a714696b5a3055f3f423bb81b3a6f4ecc2584
4
- data.tar.gz: 5215e8bb9dccbd5f4dd6b515844fc1525ad56334
3
+ metadata.gz: 2598e7edcb4727f2807cb9f9dde630da1d1b30b6
4
+ data.tar.gz: 23661bce5d836c1ad68a13bf1688e0ca7405df5b
5
5
  SHA512:
6
- metadata.gz: ed81b97bf7ec8fc1800ab0c247cbb22850cb5e0559f9372eb19061f2d361237bc2c88cd2512ccfe7896c1515da4ded3bcadd8357b22028c9fd186ef4cbb55ed4
7
- data.tar.gz: adc086eee5342a953f578aae3daf22685b1462f7e5444476f83babb09ff2b1940b40de5dc7a83cf249b56915057f594612849c9b2155074156cb80568e6c5d19
6
+ metadata.gz: 53430c570a2ce9c8967def00bb7a2022c431332976047b6f77226bc8add5e6b5641ab9d822618cdcafd0f9be35d8857a662aefba1f5914da66b30fb6e304bd65
7
+ data.tar.gz: 0b1c66ba0ebd5decd0fbec1b3f5fc08d7a07c21dae9a8524751f7de37106ef0cb3d6392529e04bd747f76a4b03c74895e59d3fbb6e1e70e94732deab3754979c
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 3.4.1 / 2014-02-14
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Added StackState#store and #restore.
6
+
7
+ * 1 bug fix:
8
+
9
+ * 1.8/1.9/2.0: Fixed tSTRING_DBEG w/ f'd up amounts of nesting + braces + do/end. yeah. I'm as confused as you are.
10
+
1
11
  === 3.4.0 / 2014-02-04
2
12
 
3
13
  * 1 major enhancement:
data/Rakefile CHANGED
@@ -188,7 +188,7 @@ end
188
188
 
189
189
  task :debug_ruby do
190
190
  file = ENV["F"] || ENV["FILE"]
191
- sh "#{ruby20} -cwy #{file} 2>&1 | ./yuck.rb"
191
+ sh "/Users/ryan/Desktop/DVDs/debugparser/miniruby -cwy #{file} 2>&1 | ./yuck.rb"
192
192
  end
193
193
 
194
194
  task :extract => :isolate do
data/lib/ruby18_parser.rb CHANGED
@@ -5266,15 +5266,16 @@ def _reduce_420(val, _values, result)
5266
5266
  end
5267
5267
 
5268
5268
  def _reduce_421(val, _values, result)
5269
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
5269
+ result = [lexer.lex_strterm,
5270
+ lexer.brace_nest,
5271
+ lexer.string_nest, # TODO: remove
5272
+ lexer.cond.store,
5273
+ lexer.cmdarg.store]
5270
5274
 
5271
5275
  lexer.lex_strterm = nil
5272
5276
  lexer.brace_nest = 0
5273
5277
  lexer.string_nest = 0
5274
5278
 
5275
- lexer.cond.push false
5276
- lexer.cmdarg.push false
5277
-
5278
5279
  lexer.lex_state = :expr_beg
5279
5280
 
5280
5281
  result
@@ -5283,14 +5284,14 @@ end
5283
5284
  def _reduce_422(val, _values, result)
5284
5285
  _, memo, stmt, _ = val
5285
5286
 
5286
- lex_strterm, brace_nest, string_nest = memo
5287
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
5287
5288
 
5288
5289
  lexer.lex_strterm = lex_strterm
5289
5290
  lexer.brace_nest = brace_nest
5290
5291
  lexer.string_nest = string_nest
5291
5292
 
5292
- lexer.cond.lexpop
5293
- lexer.cmdarg.lexpop
5293
+ lexer.cond.restore oldcond
5294
+ lexer.cmdarg.restore oldcmdarg
5294
5295
 
5295
5296
  case stmt
5296
5297
  when Sexp then
data/lib/ruby18_parser.y CHANGED
@@ -1563,29 +1563,30 @@ xstring_contents: none
1563
1563
  }
1564
1564
  | tSTRING_DBEG
1565
1565
  {
1566
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
1566
+ result = [lexer.lex_strterm,
1567
+ lexer.brace_nest,
1568
+ lexer.string_nest, # TODO: remove
1569
+ lexer.cond.store,
1570
+ lexer.cmdarg.store]
1567
1571
 
1568
1572
  lexer.lex_strterm = nil
1569
1573
  lexer.brace_nest = 0
1570
1574
  lexer.string_nest = 0
1571
1575
 
1572
- lexer.cond.push false
1573
- lexer.cmdarg.push false
1574
-
1575
1576
  lexer.lex_state = :expr_beg
1576
1577
  }
1577
1578
  compstmt tRCURLY
1578
1579
  {
1579
1580
  _, memo, stmt, _ = val
1580
1581
 
1581
- lex_strterm, brace_nest, string_nest = memo
1582
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
1582
1583
 
1583
1584
  lexer.lex_strterm = lex_strterm
1584
1585
  lexer.brace_nest = brace_nest
1585
1586
  lexer.string_nest = string_nest
1586
1587
 
1587
- lexer.cond.lexpop
1588
- lexer.cmdarg.lexpop
1588
+ lexer.cond.restore oldcond
1589
+ lexer.cmdarg.restore oldcmdarg
1589
1590
 
1590
1591
  case stmt
1591
1592
  when Sexp then
data/lib/ruby19_parser.rb CHANGED
@@ -5559,15 +5559,16 @@ def _reduce_462(val, _values, result)
5559
5559
  end
5560
5560
 
5561
5561
  def _reduce_463(val, _values, result)
5562
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
5562
+ result = [lexer.lex_strterm,
5563
+ lexer.brace_nest,
5564
+ lexer.string_nest, # TODO: remove
5565
+ lexer.cond.store,
5566
+ lexer.cmdarg.store]
5563
5567
 
5564
5568
  lexer.lex_strterm = nil
5565
5569
  lexer.brace_nest = 0
5566
5570
  lexer.string_nest = 0
5567
5571
 
5568
- lexer.cond.push false
5569
- lexer.cmdarg.push false
5570
-
5571
5572
  lexer.lex_state = :expr_beg
5572
5573
 
5573
5574
  result
@@ -5576,14 +5577,14 @@ end
5576
5577
  def _reduce_464(val, _values, result)
5577
5578
  _, memo, stmt, _ = val
5578
5579
 
5579
- lex_strterm, brace_nest, string_nest = memo
5580
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
5580
5581
 
5581
5582
  lexer.lex_strterm = lex_strterm
5582
5583
  lexer.brace_nest = brace_nest
5583
5584
  lexer.string_nest = string_nest
5584
5585
 
5585
- lexer.cond.lexpop
5586
- lexer.cmdarg.lexpop
5586
+ lexer.cond.restore oldcond
5587
+ lexer.cmdarg.restore oldcmdarg
5587
5588
 
5588
5589
  case stmt
5589
5590
  when Sexp then
data/lib/ruby19_parser.y CHANGED
@@ -1694,29 +1694,30 @@ regexp_contents: none
1694
1694
  }
1695
1695
  | tSTRING_DBEG
1696
1696
  {
1697
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
1697
+ result = [lexer.lex_strterm,
1698
+ lexer.brace_nest,
1699
+ lexer.string_nest, # TODO: remove
1700
+ lexer.cond.store,
1701
+ lexer.cmdarg.store]
1698
1702
 
1699
1703
  lexer.lex_strterm = nil
1700
1704
  lexer.brace_nest = 0
1701
1705
  lexer.string_nest = 0
1702
1706
 
1703
- lexer.cond.push false
1704
- lexer.cmdarg.push false
1705
-
1706
1707
  lexer.lex_state = :expr_beg
1707
1708
  }
1708
1709
  compstmt tRCURLY
1709
1710
  {
1710
1711
  _, memo, stmt, _ = val
1711
1712
 
1712
- lex_strterm, brace_nest, string_nest = memo
1713
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
1713
1714
 
1714
1715
  lexer.lex_strterm = lex_strterm
1715
1716
  lexer.brace_nest = brace_nest
1716
1717
  lexer.string_nest = string_nest
1717
1718
 
1718
- lexer.cond.lexpop
1719
- lexer.cmdarg.lexpop
1719
+ lexer.cond.restore oldcond
1720
+ lexer.cmdarg.restore oldcmdarg
1720
1721
 
1721
1722
  case stmt
1722
1723
  when Sexp then
data/lib/ruby20_parser.rb CHANGED
@@ -5945,15 +5945,16 @@ def _reduce_483(val, _values, result)
5945
5945
  end
5946
5946
 
5947
5947
  def _reduce_484(val, _values, result)
5948
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
5948
+ result = [lexer.lex_strterm,
5949
+ lexer.brace_nest,
5950
+ lexer.string_nest, # TODO: remove
5951
+ lexer.cond.store,
5952
+ lexer.cmdarg.store]
5949
5953
 
5950
5954
  lexer.lex_strterm = nil
5951
5955
  lexer.brace_nest = 0
5952
5956
  lexer.string_nest = 0
5953
5957
 
5954
- lexer.cond.push false
5955
- lexer.cmdarg.push false
5956
-
5957
5958
  lexer.lex_state = :expr_beg
5958
5959
 
5959
5960
  result
@@ -5963,14 +5964,14 @@ def _reduce_485(val, _values, result)
5963
5964
  # TODO: tRCURLY -> tSTRING_DEND
5964
5965
  _, memo, stmt, _ = val
5965
5966
 
5966
- lex_strterm, brace_nest, string_nest = memo
5967
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
5967
5968
 
5968
5969
  lexer.lex_strterm = lex_strterm
5969
5970
  lexer.brace_nest = brace_nest
5970
5971
  lexer.string_nest = string_nest
5971
5972
 
5972
- lexer.cond.lexpop
5973
- lexer.cmdarg.lexpop
5973
+ lexer.cond.restore oldcond
5974
+ lexer.cmdarg.restore oldcmdarg
5974
5975
 
5975
5976
  case stmt
5976
5977
  when Sexp then
data/lib/ruby20_parser.y CHANGED
@@ -1829,15 +1829,16 @@ regexp_contents: none
1829
1829
  }
1830
1830
  | tSTRING_DBEG
1831
1831
  {
1832
- result = [lexer.lex_strterm, lexer.brace_nest, lexer.string_nest]
1832
+ result = [lexer.lex_strterm,
1833
+ lexer.brace_nest,
1834
+ lexer.string_nest, # TODO: remove
1835
+ lexer.cond.store,
1836
+ lexer.cmdarg.store]
1833
1837
 
1834
1838
  lexer.lex_strterm = nil
1835
1839
  lexer.brace_nest = 0
1836
1840
  lexer.string_nest = 0
1837
1841
 
1838
- lexer.cond.push false
1839
- lexer.cmdarg.push false
1840
-
1841
1842
  lexer.lex_state = :expr_beg
1842
1843
  }
1843
1844
  compstmt tRCURLY
@@ -1845,14 +1846,14 @@ regexp_contents: none
1845
1846
  # TODO: tRCURLY -> tSTRING_DEND
1846
1847
  _, memo, stmt, _ = val
1847
1848
 
1848
- lex_strterm, brace_nest, string_nest = memo
1849
+ lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg = memo
1849
1850
 
1850
1851
  lexer.lex_strterm = lex_strterm
1851
1852
  lexer.brace_nest = brace_nest
1852
1853
  lexer.string_nest = string_nest
1853
1854
 
1854
- lexer.cond.lexpop
1855
- lexer.cmdarg.lexpop
1855
+ lexer.cond.restore oldcond
1856
+ lexer.cmdarg.restore oldcmdarg
1856
1857
 
1857
1858
  case stmt
1858
1859
  when Sexp then
@@ -91,7 +91,7 @@ class RPStringScanner < StringScanner
91
91
  end
92
92
 
93
93
  module RubyParserStuff
94
- VERSION = "3.4.0" unless constants.include? "VERSION" # SIGH
94
+ VERSION = "3.4.1" unless constants.include? "VERSION" # SIGH
95
95
 
96
96
  attr_accessor :lexer, :in_def, :in_single, :file
97
97
  attr_reader :env, :comments
@@ -1277,6 +1277,16 @@ module RubyParserStuff
1277
1277
  p :stack_push => [name, @stack, caller.first] if debug
1278
1278
  nil
1279
1279
  end
1280
+
1281
+ def store
1282
+ result = @stack.dup
1283
+ @stack.replace [false]
1284
+ result
1285
+ end
1286
+
1287
+ def restore oldstate
1288
+ @stack.replace oldstate
1289
+ end
1280
1290
  end
1281
1291
  end
1282
1292
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
30
  xx3n58i0lQkBE1EpKE0lFu/y
31
31
  -----END CERTIFICATE-----
32
- date: 2014-02-05 00:00:00.000000000 Z
32
+ date: 2014-02-14 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: sexp_processor
@@ -121,14 +121,14 @@ dependencies:
121
121
  requirements:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
- version: '3.8'
124
+ version: '3.9'
125
125
  type: :development
126
126
  prerelease: false
127
127
  version_requirements: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ~>
130
130
  - !ruby/object:Gem::Version
131
- version: '3.8'
131
+ version: '3.9'
132
132
  description: |-
133
133
  ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
134
134
  racc--which does by default use a C extension). RP's output is
metadata.gz.sig CHANGED
Binary file