racc 1.4.16-java → 1.5.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +19 -0
  3. data/bin/racc +3 -6
  4. data/ext/racc/cparse/extconf.rb +1 -1
  5. data/lib/racc/compat.rb +3 -1
  6. data/lib/racc/cparse-jruby.jar +0 -0
  7. data/lib/racc/debugflags.rb +3 -1
  8. data/lib/racc/exception.rb +4 -1
  9. data/lib/racc/grammar.rb +4 -1
  10. data/lib/racc/grammarfileparser.rb +4 -2
  11. data/lib/racc/info.rb +5 -2
  12. data/lib/racc/iset.rb +3 -1
  13. data/lib/racc/logfilegenerator.rb +3 -1
  14. data/lib/racc/parser-text.rb +5 -11
  15. data/lib/racc/parser.rb +5 -11
  16. data/lib/racc/parserfilegenerator.rb +7 -4
  17. data/lib/racc/sourcetext.rb +3 -1
  18. data/lib/racc/state.rb +4 -1
  19. data/lib/racc/statetransitiontable.rb +4 -2
  20. data/rdoc/ja/command.ja.html +1 -1
  21. data/sample/array.y +1 -1
  22. data/sample/array2.y +1 -1
  23. data/sample/calc-ja.y +2 -2
  24. data/sample/calc.y +2 -2
  25. data/sample/conflict.y +1 -1
  26. data/sample/hash.y +1 -1
  27. data/sample/lalr.y +1 -1
  28. data/sample/lists.y +1 -1
  29. data/sample/syntax.y +1 -1
  30. data/sample/yyerr.y +1 -1
  31. data/test/assets/nasl.y +1 -1
  32. data/test/regress/cadenza +1 -1
  33. data/test/regress/cast +1 -1
  34. data/test/regress/csspool +1 -1
  35. data/test/regress/edtf +1 -1
  36. data/test/regress/huia +1 -1
  37. data/test/regress/journey +1 -1
  38. data/test/regress/liquor +1 -1
  39. data/test/regress/machete +1 -1
  40. data/test/regress/mediacloth +1 -1
  41. data/test/regress/mof +1 -1
  42. data/test/regress/namae +1 -1
  43. data/test/regress/nasl +2 -2
  44. data/test/regress/nokogiri-css +1 -1
  45. data/test/regress/opal +1 -1
  46. data/test/regress/php_serialization +1 -1
  47. data/test/regress/riml +1 -1
  48. data/test/regress/ruby18 +1 -1
  49. data/test/regress/ruby22 +1 -1
  50. data/test/regress/tp_plus +1 -1
  51. data/test/regress/twowaysql +1 -1
  52. metadata +4 -18
  53. data/DEPENDS +0 -4
  54. data/Manifest.txt +0 -146
  55. data/bin/racc2y +0 -195
  56. data/bin/y2racc +0 -339
  57. data/fastcache/extconf.rb +0 -2
  58. data/fastcache/fastcache.c +0 -185
  59. data/misc/dist.sh +0 -31
  60. data/setup.rb +0 -1587
  61. data/tasks/doc.rb +0 -12
  62. data/tasks/email.rb +0 -55
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb271128342079331683bd28fc50612062c8987e954c7ca1370c781cf5fb1c79
4
- data.tar.gz: da2d08f8b05d1f6aaec72bf88196dff0a3cf9279656df82cf1812d9c4798ea16
3
+ metadata.gz: f8e85a2a4463d4488fb20fd6c44402cf2f8da2340c00d84dc27224487fad6972
4
+ data.tar.gz: 900b642719a990c973546e61a2d951d4c9e62867b9d684203a479b0116711c4b
5
5
  SHA512:
6
- metadata.gz: e9439f8f9209b983224921484bd7abac3eca09f4a97cc0a58724c790cf7d5d2ac62a6f37adc6fd3b0c74e5db71223c37376ed037c886f63111c7d4e1fbe38576
7
- data.tar.gz: 5537c6f4b28de230db14ec73ec7f1dcc2d4a5a97b76b9a2f27dc964306e9bcdb37880e75c7a1d496a059136e0100cbc6136cd8e8abb1445cd6cfefcd4c5f8628
6
+ metadata.gz: 1ab26acf94d4a80567cdb620e015df20e1ea798e466b9bdc8f13b5b057b2070a6f18681c60833633ca2d40373115d0a6c90c091fab8a3e2c4d24a1507394084e
7
+ data.tar.gz: 8c8c5d2430a597b8f23aaccaf05980b83f4446cf4ab735765b9ac9cebec253586750054b05d31e982c6818d3a94abd312f61ea8bd3fa63464c11919a4ccc704a
data/Rakefile CHANGED
@@ -1,9 +1,28 @@
1
1
  # -*- ruby -*-
2
2
 
3
+ require "bundler/gem_tasks"
4
+
5
+ require 'rdoc/task'
6
+
7
+ RDoc::Task.new(:docs) do |rd|
8
+ spec = Gem::Specification.load("racc.gemspec")
9
+ rd.main = "README.en.rdoc"
10
+ rd.rdoc_files.include(spec.files.find_all { |file_name|
11
+ file_name =~ /^(bin|lib|ext)/ || file_name !~ /\//
12
+ })
13
+
14
+ title = "#{spec.name}-#{spec.version} Documentation"
15
+
16
+ rd.options << "-t #{title}"
17
+ end
18
+
3
19
  require 'rake/testtask'
4
20
 
5
21
  Rake::TestTask.new(:test) do |t|
6
22
  t.test_files = FileList["test/**/test_*.rb"]
23
+ if RUBY_VERSION >= "2.6"
24
+ t.ruby_opts = %w[--enable-frozen-string-literal --debug=frozen-string-literal]
25
+ end
7
26
  end
8
27
  gem 'rake-compiler', '>= 0.4.1'
9
28
 
data/bin/racc CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # $Id$
3
+ #
4
4
  #
5
5
  # Copyright (c) 1999-2006 Minero Aoki
6
6
  #
@@ -97,15 +97,12 @@ def main
97
97
  parser.on('--runtime-version', 'Prints runtime version and quit.') {
98
98
  printf "racc runtime version %s (rev. %s); %s\n",
99
99
  Racc::Parser::Racc_Runtime_Version,
100
- Racc::Parser::Racc_Runtime_Revision,
101
100
  if Racc::Parser.racc_runtime_type == 'ruby'
102
101
  sprintf('ruby core version %s (rev. %s)',
103
- Racc::Parser::Racc_Runtime_Core_Version_R,
104
- Racc::Parser::Racc_Runtime_Core_Revision_R)
102
+ Racc::Parser::Racc_Runtime_Core_Version_R)
105
103
  else
106
104
  sprintf('c core version %s (rev. %s)',
107
- Racc::Parser::Racc_Runtime_Core_Version_C,
108
- Racc::Parser::Racc_Runtime_Core_Revision_C)
105
+ Racc::Parser::Racc_Runtime_Core_Version_C)
109
106
  end
110
107
  exit 0
111
108
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
- # $Id: a9187b5bc40e6adf05e7b6ee5b370b39a3429ecd $
2
+ #
3
3
 
4
4
  require 'mkmf'
5
5
 
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 14fa1118eb3a23e85265e4f7afe2d5a297d69f9c $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of the GNU LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  unless Object.method_defined?(:__send)
13
15
  class Object
Binary file
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 74ff4369ce53c7f45cfc2644ce907785104ebf6e $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  module Racc
13
15
 
@@ -1,11 +1,14 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: ebb9798ad0b211e031670a12a1ab154678c1c8f3 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
6
7
  # This program is free software.
7
8
  # You can distribute/modify this program under the same terms of ruby.
8
9
  # see the file "COPYING".
10
+ #
11
+ #++
9
12
 
10
13
  module Racc
11
14
  class Error < StandardError; end
@@ -1,11 +1,14 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 3fcabd58bef02540bf78e8142469681cb9f975c2 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
6
7
  # This program is free software.
7
8
  # You can distribute/modify this program under the same terms of ruby.
8
9
  # see the file "COPYING".
10
+ #
11
+ #++
9
12
 
10
13
  require 'racc/compat'
11
14
  require 'racc/iset'
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 63bd084db2dce8a2c9760318faae6104717cead7 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of the GNU LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  require 'racc'
13
15
  require 'racc/compat'
@@ -427,7 +429,7 @@ module Racc
427
429
  $raccs_print_type = false
428
430
 
429
431
  def scan_action
430
- buf = ''
432
+ buf = String.new
431
433
  nest = 1
432
434
  pre = nil
433
435
  @in_block = 'action'
@@ -1,14 +1,17 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 9479ae04c6714b9f3eba0c6c98bc58efc82a219c $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
6
7
  # This program is free software.
7
8
  # You can distribute/modify this program under the same terms of ruby.
8
9
  # see the file "COPYING".
10
+ #
11
+ #++
9
12
 
10
13
  module Racc
11
- VERSION = '1.4.16'
14
+ VERSION = '1.5.0'
12
15
  Version = VERSION
13
16
  Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
14
17
  end
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 31aa4331c08dfd4609c06eb5f94b7ef38dc708e1 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of the GNU LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  module Racc
13
15
 
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 5e9d0a01b5d56fd9cdc3d5cb078b1a3e1bbaf779 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of the GNU LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  module Racc
13
15
 
@@ -31,7 +31,7 @@ end
31
31
  # == Command-line Reference
32
32
  #
33
33
  # racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
34
- # [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
34
+ # [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
35
35
  # [-v] [--verbose]
36
36
  # [-O<var>filename</var>] [--log-file=<var>filename</var>]
37
37
  # [-g] [--debug]
@@ -43,7 +43,7 @@ end
43
43
  # [-S] [--output-status]
44
44
  # [--version] [--copyright] [--help] <var>grammarfile</var>
45
45
  #
46
- # [+filename+]
46
+ # [+grammarfile+]
47
47
  # Racc grammar file. Any extension is permitted.
48
48
  # [-o+outfile+, --output-file=+outfile+]
49
49
  # A filename for output. default is <+filename+>.tab.rb
@@ -188,19 +188,17 @@ module Racc
188
188
  class Parser
189
189
 
190
190
  Racc_Runtime_Version = ::Racc::VERSION
191
- Racc_Runtime_Revision = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'
192
-
193
191
  Racc_Runtime_Core_Version_R = ::Racc::VERSION
194
- Racc_Runtime_Core_Revision_R = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'.split[1]
192
+
195
193
  begin
196
194
  if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
195
+ require 'jruby'
197
196
  require 'racc/cparse-jruby.jar'
198
197
  com.headius.racc.Cparse.new.load(JRuby.runtime, false)
199
198
  else
200
199
  require 'racc/cparse'
201
200
  end
202
- # Racc_Runtime_Core_Version_C = (defined in extention)
203
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
201
+
204
202
  unless new.respond_to?(:_racc_do_parse_c, true)
205
203
  raise LoadError, 'old cparse.so'
206
204
  end
@@ -211,15 +209,11 @@ module Racc
211
209
  Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
212
210
  Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
213
211
  Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
214
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc:
215
212
  Racc_Runtime_Type = 'c' # :nodoc:
216
213
  rescue LoadError
217
- puts $!
218
- puts $!.backtrace
219
214
  Racc_Main_Parsing_Routine = :_racc_do_parse_rb
220
215
  Racc_YY_Parse_Method = :_racc_yyparse_rb
221
216
  Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
222
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
223
217
  Racc_Runtime_Type = 'ruby'
224
218
  end
225
219
 
@@ -29,7 +29,7 @@ end
29
29
  # == Command-line Reference
30
30
  #
31
31
  # racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
32
- # [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
32
+ # [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
33
33
  # [-v] [--verbose]
34
34
  # [-O<var>filename</var>] [--log-file=<var>filename</var>]
35
35
  # [-g] [--debug]
@@ -41,7 +41,7 @@ end
41
41
  # [-S] [--output-status]
42
42
  # [--version] [--copyright] [--help] <var>grammarfile</var>
43
43
  #
44
- # [+filename+]
44
+ # [+grammarfile+]
45
45
  # Racc grammar file. Any extension is permitted.
46
46
  # [-o+outfile+, --output-file=+outfile+]
47
47
  # A filename for output. default is <+filename+>.tab.rb
@@ -186,19 +186,17 @@ module Racc
186
186
  class Parser
187
187
 
188
188
  Racc_Runtime_Version = ::Racc::VERSION
189
- Racc_Runtime_Revision = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'
190
-
191
189
  Racc_Runtime_Core_Version_R = ::Racc::VERSION
192
- Racc_Runtime_Core_Revision_R = '$Id: e754525bd317344c4284fca6fdce0a425979ade1 $'.split[1]
190
+
193
191
  begin
194
192
  if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
193
+ require 'jruby'
195
194
  require 'racc/cparse-jruby.jar'
196
195
  com.headius.racc.Cparse.new.load(JRuby.runtime, false)
197
196
  else
198
197
  require 'racc/cparse'
199
198
  end
200
- # Racc_Runtime_Core_Version_C = (defined in extention)
201
- Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2]
199
+
202
200
  unless new.respond_to?(:_racc_do_parse_c, true)
203
201
  raise LoadError, 'old cparse.so'
204
202
  end
@@ -209,15 +207,11 @@ module Racc
209
207
  Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
210
208
  Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
211
209
  Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
212
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc:
213
210
  Racc_Runtime_Type = 'c' # :nodoc:
214
211
  rescue LoadError
215
- puts $!
216
- puts $!.backtrace
217
212
  Racc_Main_Parsing_Routine = :_racc_do_parse_rb
218
213
  Racc_YY_Parse_Method = :_racc_yyparse_rb
219
214
  Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
220
- Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R
221
215
  Racc_Runtime_Type = 'ruby'
222
216
  end
223
217
 
@@ -1,11 +1,14 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: fff07ebfd582f8dbc845e424908cb9f41f8bf42f $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
6
7
  # This program is free software.
7
8
  # You can distribute/modify this program under the same terms of ruby.
8
9
  # see the file "COPYING".
10
+ #
11
+ #++
9
12
 
10
13
  require 'enumerator'
11
14
  require 'racc/compat'
@@ -235,7 +238,7 @@ module Racc
235
238
  end
236
239
 
237
240
  def unique_separator(id)
238
- sep = "...end #{id}/module_eval..."
241
+ sep = String.new "...end #{id}/module_eval..."
239
242
  while @used_separator.key?(sep)
240
243
  sep.concat sprintf('%02x', rand(255))
241
244
  end
@@ -329,7 +332,7 @@ module Racc
329
332
  # TODO: this can be made a LOT more clean with a simple split/map
330
333
  sep = "\n"
331
334
  nsep = ",\n"
332
- buf = ''
335
+ buf = String.new
333
336
  com = ''
334
337
  ncom = ','
335
338
  co = com
@@ -339,7 +342,7 @@ module Racc
339
342
  if buf.size > 66
340
343
  @f.print sep; sep = nsep
341
344
  @f.print "'", buf, "'"
342
- buf = ''
345
+ buf = String.new
343
346
  co = com
344
347
  end
345
348
  end
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 3b2d89d9ada2f5fcb043837dcc5c9631856d5b70 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  module Racc
13
15
 
@@ -1,11 +1,14 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 6bd3136439c94cb8d928917f5e0de9c593181527 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
6
7
  # This program is free software.
7
8
  # You can distribute/modify this program under the same terms of ruby.
8
9
  # see the file "COPYING".
10
+ #
11
+ #++
9
12
 
10
13
  require 'racc/iset'
11
14
  require 'racc/statetransitiontable'
@@ -1,5 +1,6 @@
1
+ #--
2
+ #
1
3
  #
2
- # $Id: 4c5f4311663b6d03050953d64d6a0e7905ff2216 $
3
4
  #
4
5
  # Copyright (c) 1999-2006 Minero Aoki
5
6
  #
@@ -8,6 +9,7 @@
8
9
  # the GNU LGPL, Lesser General Public License version 2.1.
9
10
  # For details of LGPL, see the file "COPYING".
10
11
  #
12
+ #++
11
13
 
12
14
  require 'racc/parser'
13
15
 
@@ -196,7 +198,7 @@ module Racc
196
198
  def mkmapexp(arr)
197
199
  i = ii = 0
198
200
  as = arr.size
199
- map = ''
201
+ map = String.new
200
202
  maxdup = RE_DUP_MAX
201
203
  curr = nil
202
204
  while i < as
@@ -1,7 +1,7 @@
1
1
  <h1>Raccコマンドリファレンス</h1>
2
2
  <p>
3
3
  racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
4
- [-e<var>rubypath</var>] [--embedded=<var>rubypath</var>]
4
+ [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
5
5
  [-v] [--verbose]
6
6
  [-O<var>filename</var>] [--log-file=<var>filename</var>]
7
7
  [-g] [--debug]
@@ -1,4 +1,4 @@
1
- # $Id$
1
+ #
2
2
  #
3
3
  # convert Array-like string into Ruby's Array.
4
4