racc 1.4.15-java → 1.4.16-java

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 (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'
@@ -60,7 +60,7 @@ def parse( io )
60
60
 
61
61
  # @q.push [ false, nil ]
62
62
  @q.push [ false, [@s.pos, nil] ]
63
-
63
+
64
64
  ## call racc's private parse method
65
65
  do_parse
66
66
  end
@@ -326,7 +326,7 @@ Racc_debug_parser = false
326
326
  module_eval(<<'.,.,', 'twowaysql.y', 20)
327
327
  def _reduce_1(val, _values, result)
328
328
  result = RootNode.new( val[0] )
329
-
329
+
330
330
  result
331
331
  end
332
332
  .,.,
@@ -334,7 +334,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 20)
334
334
  module_eval(<<'.,.,', 'twowaysql.y', 25)
335
335
  def _reduce_2(val, _values, result)
336
336
  result = []
337
-
337
+
338
338
  result
339
339
  end
340
340
  .,.,
@@ -342,7 +342,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 25)
342
342
  module_eval(<<'.,.,', 'twowaysql.y', 29)
343
343
  def _reduce_3(val, _values, result)
344
344
  result.push val[1]
345
-
345
+
346
346
  result
347
347
  end
348
348
  .,.,
@@ -356,7 +356,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 29)
356
356
  module_eval(<<'.,.,', 'twowaysql.y', 38)
357
357
  def _reduce_7(val, _values, result)
358
358
  result = BeginNode.new( val[1] )
359
-
359
+
360
360
  result
361
361
  end
362
362
  .,.,
@@ -364,7 +364,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 38)
364
364
  module_eval(<<'.,.,', 'twowaysql.y', 43)
365
365
  def _reduce_8(val, _values, result)
366
366
  result = IfNode.new( val[0][1], val[1], val[2] )
367
-
367
+
368
368
  result
369
369
  end
370
370
  .,.,
@@ -372,7 +372,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 43)
372
372
  module_eval(<<'.,.,', 'twowaysql.y', 48)
373
373
  def _reduce_9(val, _values, result)
374
374
  result = val[1]
375
-
375
+
376
376
  result
377
377
  end
378
378
  .,.,
@@ -380,7 +380,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 48)
380
380
  module_eval(<<'.,.,', 'twowaysql.y', 52)
381
381
  def _reduce_10(val, _values, result)
382
382
  result = nil
383
-
383
+
384
384
  result
385
385
  end
386
386
  .,.,
@@ -394,7 +394,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 52)
394
394
  module_eval(<<'.,.,', 'twowaysql.y', 61)
395
395
  def _reduce_14(val, _values, result)
396
396
  result = SubStatementNode.new( val[0][1], val[1] )
397
-
397
+
398
398
  result
399
399
  end
400
400
  .,.,
@@ -402,7 +402,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 61)
402
402
  module_eval(<<'.,.,', 'twowaysql.y', 66)
403
403
  def _reduce_15(val, _values, result)
404
404
  result = SubStatementNode.new( val[0][1], val[1] )
405
-
405
+
406
406
  result
407
407
  end
408
408
  .,.,
@@ -410,7 +410,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 66)
410
410
  module_eval(<<'.,.,', 'twowaysql.y', 71)
411
411
  def _reduce_16(val, _values, result)
412
412
  result = LiteralNode.new( val[0][1] )
413
-
413
+
414
414
  result
415
415
  end
416
416
  .,.,
@@ -418,7 +418,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 71)
418
418
  module_eval(<<'.,.,', 'twowaysql.y', 75)
419
419
  def _reduce_17(val, _values, result)
420
420
  result = LiteralNode.new( val[0][1] )
421
-
421
+
422
422
  result
423
423
  end
424
424
  .,.,
@@ -426,7 +426,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 75)
426
426
  module_eval(<<'.,.,', 'twowaysql.y', 79)
427
427
  def _reduce_18(val, _values, result)
428
428
  result = LiteralNode.new( val[0][1] )
429
-
429
+
430
430
  result
431
431
  end
432
432
  .,.,
@@ -434,7 +434,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 79)
434
434
  module_eval(<<'.,.,', 'twowaysql.y', 83)
435
435
  def _reduce_19(val, _values, result)
436
436
  result = LiteralNode.new( val[0][1] )
437
-
437
+
438
438
  result
439
439
  end
440
440
  .,.,
@@ -442,7 +442,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 83)
442
442
  module_eval(<<'.,.,', 'twowaysql.y', 87)
443
443
  def _reduce_20(val, _values, result)
444
444
  result = WhiteSpaceNode.new( val[0][1], @preserve_space )
445
-
445
+
446
446
  result
447
447
  end
448
448
  .,.,
@@ -450,7 +450,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 87)
450
450
  module_eval(<<'.,.,', 'twowaysql.y', 91)
451
451
  def _reduce_21(val, _values, result)
452
452
  result = LiteralNode.new( val[0][1] )
453
-
453
+
454
454
  result
455
455
  end
456
456
  .,.,
@@ -458,7 +458,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 91)
458
458
  module_eval(<<'.,.,', 'twowaysql.y', 95)
459
459
  def _reduce_22(val, _values, result)
460
460
  result = LiteralNode.new( val[0][1] )
461
-
461
+
462
462
  result
463
463
  end
464
464
  .,.,
@@ -466,7 +466,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 95)
466
466
  module_eval(<<'.,.,', 'twowaysql.y', 99)
467
467
  def _reduce_23(val, _values, result)
468
468
  result = LiteralNode.new( val[0][1] )
469
-
469
+
470
470
  result
471
471
  end
472
472
  .,.,
@@ -475,7 +475,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 103)
475
475
  def _reduce_24(val, _values, result)
476
476
  @num_questions += 1
477
477
  result = QuestionNode.new( @num_questions )
478
-
478
+
479
479
  result
480
480
  end
481
481
  .,.,
@@ -483,7 +483,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 103)
483
483
  module_eval(<<'.,.,', 'twowaysql.y', 108)
484
484
  def _reduce_25(val, _values, result)
485
485
  result = ActualCommentNode.new( val[0][1] , val[0][2] )
486
-
486
+
487
487
  result
488
488
  end
489
489
  .,.,
@@ -495,7 +495,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 108)
495
495
  module_eval(<<'.,.,', 'twowaysql.y', 115)
496
496
  def _reduce_28(val, _values, result)
497
497
  result = BindVariableNode.new( val[0][1] )
498
-
498
+
499
499
  result
500
500
  end
501
501
  .,.,
@@ -503,7 +503,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 115)
503
503
  module_eval(<<'.,.,', 'twowaysql.y', 119)
504
504
  def _reduce_29(val, _values, result)
505
505
  result = BindVariableNode.new( val[0][1] )
506
-
506
+
507
507
  result
508
508
  end
509
509
  .,.,
@@ -511,7 +511,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 119)
511
511
  module_eval(<<'.,.,', 'twowaysql.y', 123)
512
512
  def _reduce_30(val, _values, result)
513
513
  result = BindVariableNode.new( val[0][1] )
514
-
514
+
515
515
  result
516
516
  end
517
517
  .,.,
@@ -519,7 +519,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 123)
519
519
  module_eval(<<'.,.,', 'twowaysql.y', 127)
520
520
  def _reduce_31(val, _values, result)
521
521
  result = BindVariableNode.new( val[0][1] )
522
-
522
+
523
523
  result
524
524
  end
525
525
  .,.,
@@ -527,7 +527,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 127)
527
527
  module_eval(<<'.,.,', 'twowaysql.y', 131)
528
528
  def _reduce_32(val, _values, result)
529
529
  result = ParenBindVariableNode.new( val[0][1] )
530
-
530
+
531
531
  result
532
532
  end
533
533
  .,.,
@@ -535,7 +535,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 131)
535
535
  module_eval(<<'.,.,', 'twowaysql.y', 136)
536
536
  def _reduce_33(val, _values, result)
537
537
  result = EmbedVariableNode.new( val[0][1] )
538
-
538
+
539
539
  result
540
540
  end
541
541
  .,.,
@@ -543,7 +543,7 @@ module_eval(<<'.,.,', 'twowaysql.y', 136)
543
543
  module_eval(<<'.,.,', 'twowaysql.y', 140)
544
544
  def _reduce_34(val, _values, result)
545
545
  result = EmbedVariableNode.new( val[0][1] )
546
-
546
+
547
547
  result
548
548
  end
549
549
  .,.,
@@ -553,4 +553,4 @@ def _reduce_none(val, _values, result)
553
553
  end
554
554
 
555
555
  end # class Parser
556
- end # module TwoWaySQL
556
+ end # module TwoWaySQL
@@ -3,6 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
3
3
  module Racc
4
4
  class TestChkY < TestCase
5
5
  def setup
6
+ super
6
7
  file = File.join(ASSET_DIR, 'chk.y')
7
8
  @debug_flags = Racc::DebugFlags.parse_option_string('o')
8
9
  parser = Racc::GrammarFileParser.new(@debug_flags)
@@ -141,13 +141,13 @@ module Racc
141
141
  end
142
142
 
143
143
  def test_norule_y
144
- assert_raises(MiniTest::Assertion) {
144
+ assert_raise(Test::Unit::AssertionFailedError) {
145
145
  assert_compile 'norule.y'
146
146
  }
147
147
  end
148
148
 
149
149
  def test_unterm_y
150
- assert_raises(MiniTest::Assertion) {
150
+ assert_raise(Test::Unit::AssertionFailedError) {
151
151
  assert_compile 'unterm.y'
152
152
  }
153
153
  end
@@ -164,13 +164,13 @@ module Racc
164
164
  # .y files from `parser` gem
165
165
 
166
166
  def test_ruby18
167
- assert_compile 'ruby18.y'
167
+ assert_compile 'ruby18.y', [], timeout: 60
168
168
  assert_debugfile 'ruby18.y', []
169
169
  assert_output_unchanged 'ruby18.y'
170
170
  end
171
171
 
172
172
  def test_ruby22
173
- assert_compile 'ruby22.y'
173
+ assert_compile 'ruby22.y', [], timeout: 60
174
174
  assert_debugfile 'ruby22.y', []
175
175
  assert_output_unchanged 'ruby22.y'
176
176
  end
@@ -186,7 +186,7 @@ module Racc
186
186
  # .y file from opal gem
187
187
 
188
188
  def test_opal
189
- assert_compile 'opal.y'
189
+ assert_compile 'opal.y', [], timeout: 60
190
190
  assert_debugfile 'opal.y', []
191
191
  assert_output_unchanged 'opal.y'
192
192
  end
@@ -207,14 +207,6 @@ module Racc
207
207
  assert_output_unchanged 'nokogiri-css.y'
208
208
  end
209
209
 
210
- # .y file from bibtex-ruby gem
211
-
212
- def test_bibtex
213
- assert_compile 'bibtex.y'
214
- assert_debugfile 'bibtex.y', [0, 0, 0, 0, 0]
215
- assert_output_unchanged 'bibtex.y'
216
- end
217
-
218
210
  # .y file from edtf-ruby gem
219
211
 
220
212
  def test_edtf
@@ -271,17 +263,6 @@ module Racc
271
263
  assert_output_unchanged 'huia.y'
272
264
  end
273
265
 
274
- # .y files from rdtool gem
275
-
276
- def test_rdtool
277
- assert_compile 'rdblockparser.y'
278
- assert_compile 'rdinlineparser.y'
279
- assert_debugfile 'rdblockparser.y', [0, 0, 0, 0]
280
- assert_debugfile 'rdinlineparser.y', [0, 0, 0, 0]
281
- assert_output_unchanged 'rdblockparser.y'
282
- assert_output_unchanged 'rdinlineparser.y'
283
- end
284
-
285
266
  # .y file from cast gem
286
267
 
287
268
  def test_cast
@@ -3,6 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
3
3
  module Racc
4
4
  class TestScanY < TestCase
5
5
  def setup
6
+ super
6
7
  file = File.join(ASSET_DIR, 'scan.y')
7
8
  @debug_flags = Racc::DebugFlags.parse_option_string('o')
8
9
  parser = Racc::GrammarFileParser.new(@debug_flags)
@@ -30,7 +30,7 @@ testdata( File.dirname($0) + '/scandata', ARGV ).each do |file|
30
30
  begin
31
31
  ok = File.read(file)
32
32
  s = Racc::GrammarFileScanner.new( ok )
33
- sym, (val, lineno) = s.scan
33
+ sym, (val, _lineno) = s.scan
34
34
  if printonly then
35
35
  $stderr.puts
36
36
  $stderr.puts val
metadata CHANGED
@@ -1,77 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: racc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.15
4
+ version: 1.4.16
5
5
  platform: java
6
6
  authors:
7
+ - Minero Aoki
7
8
  - Aaron Patterson
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: 0.4.1
19
- name: rake-compiler
20
- prerelease: false
21
- type: :development
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 0.4.1
27
- - !ruby/object:Gem::Dependency
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '4.7'
33
- name: minitest
34
- prerelease: false
35
- type: :development
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '4.7'
41
- - !ruby/object:Gem::Dependency
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '4.0'
47
- - - "<"
48
- - !ruby/object:Gem::Version
49
- version: '7'
50
- name: rdoc
51
- prerelease: false
52
- type: :development
53
- version_requirements: !ruby/object:Gem::Requirement
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: '4.0'
58
- - - "<"
59
- - !ruby/object:Gem::Version
60
- version: '7'
61
- - !ruby/object:Gem::Dependency
62
- requirement: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '3.17'
67
- name: hoe
68
- prerelease: false
69
- type: :development
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '3.17'
12
+ date: 2020-01-11 00:00:00.000000000 Z
13
+ dependencies: []
75
14
  description: |-
76
15
  Racc is a LALR(1) parser generator.
77
16
  It is written in Ruby itself, and generates Ruby program.
@@ -80,6 +19,7 @@ description: |-
80
19
  can run your parsers generated by racc 1.4.x out of the
81
20
  box.
82
21
  email:
22
+ -
83
23
  - aaron@tenderlovemaking.com
84
24
  executables:
85
25
  - racc
@@ -110,9 +50,8 @@ files:
110
50
  - bin/y2racc
111
51
  - ext/racc/MANIFEST
112
52
  - ext/racc/com/headius/racc/Cparse.java
113
- - ext/racc/cparse.c
114
- - ext/racc/depend
115
- - ext/racc/extconf.rb
53
+ - ext/racc/cparse/cparse.c
54
+ - ext/racc/cparse/extconf.rb
116
55
  - fastcache/extconf.rb
117
56
  - fastcache/fastcache.c
118
57
  - lib/racc.rb
@@ -156,7 +95,6 @@ files:
156
95
  - setup.rb
157
96
  - tasks/doc.rb
158
97
  - tasks/email.rb
159
- - test/assets/bibtex.y
160
98
  - test/assets/cadenza.y
161
99
  - test/assets/cast.y
162
100
  - test/assets/chk.y
@@ -193,8 +131,6 @@ files:
193
131
  - test/assets/opt.y
194
132
  - test/assets/percent.y
195
133
  - test/assets/php_serialization.y
196
- - test/assets/rdblockparser.y
197
- - test/assets/rdinlineparser.y
198
134
  - test/assets/recv.y
199
135
  - test/assets/riml.y
200
136
  - test/assets/rrconf.y
@@ -213,7 +149,6 @@ files:
213
149
  - test/bench.y
214
150
  - test/helper.rb
215
151
  - test/infini.y
216
- - test/regress/bibtex
217
152
  - test/regress/cadenza
218
153
  - test/regress/cast
219
154
  - test/regress/csspool
@@ -229,8 +164,6 @@ files:
229
164
  - test/regress/nokogiri-css
230
165
  - test/regress/opal
231
166
  - test/regress/php_serialization
232
- - test/regress/rdblockparser
233
- - test/regress/rdinlineparser
234
167
  - test/regress/riml
235
168
  - test/regress/ruby18
236
169
  - test/regress/ruby22
@@ -272,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
205
  version: '0'
273
206
  requirements: []
274
207
  rubyforge_project:
275
- rubygems_version: 2.7.6
208
+ rubygems_version: 2.7.10
276
209
  signing_key:
277
210
  specification_version: 4
278
211
  summary: Racc is a LALR(1) parser generator