racc 1.6.2-java → 1.7.1-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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 652c8b3b6b59a4ac9bd82ec1d220d003eb54dff7520bbc0bb8f311551db12da1
4
- data.tar.gz: 3e92fc229c3e4e6f3e4b741ae7dd543289b09df69ac55bd466f9402082383c45
3
+ metadata.gz: 5e1f787053b9d2ca9e1af8423b23fa20e23b3680906b312d70e83e5e1afb62c0
4
+ data.tar.gz: ea654c9c32f3af816b2732bb3363a68621727fa14e2061a46508f0fac2a34b6a
5
5
  SHA512:
6
- metadata.gz: f4c04141732874928d82fe5f74d5b4156a4e88016073ca8cc28c19d633e354350779d206888a8a56c8d67070d3d37dd601891965f2bd75b2842747c39bd247b4
7
- data.tar.gz: 4a95e53d7811f50f57af4b5f56113f637a4fca5c9d1b68d16e02ab1940c8faad90883ba1ba75779550a18b117a78cc0bbef634f31b613012a4fa7a806328ba2a
6
+ metadata.gz: 349ead791d4de3a0c2f74af4bb43bb1663b0b3196fa76e511d33a9bfe18f1706803aa2aaf972a2fa1f56ea70a2662d45c4f2765997500be882302bf99bb51b24
7
+ data.tar.gz: e5ddb322e8bb9dc2ec4920e8c2852195f81a4ea37d5d0255ae87269de68eb1108b25e86facf67bd3f738648e3320c99184836dd2b3b8251b3e21709677089ea6
@@ -22,7 +22,7 @@
22
22
  Important Constants
23
23
  ----------------------------------------------------------------------- */
24
24
 
25
- #define RACC_VERSION "1.6.2"
25
+ #define RACC_VERSION "1.7.1"
26
26
 
27
27
  #define DEFAULT_TOKEN -1
28
28
  #define ERROR_TOKEN 1
Binary file
data/lib/racc/grammar.rb CHANGED
@@ -993,10 +993,6 @@ module Racc
993
993
  @to_s = '$end'
994
994
  @serialized = 'false'
995
995
  @string = false
996
- when ErrorSymbolValue
997
- @to_s = 'error'
998
- @serialized = 'Object.new'
999
- @string = false
1000
996
  else
1001
997
  raise ArgumentError, "unknown symbol value: #{value.class}"
1002
998
  end
data/lib/racc/info.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  #++
12
12
 
13
13
  module Racc
14
- VERSION = '1.6.2'
14
+ VERSION = '1.7.1'
15
15
  Version = VERSION
16
16
  Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
17
17
  end
@@ -12,7 +12,28 @@ module Racc
12
12
  # without restriction.
13
13
  #++
14
14
 
15
- require 'racc/info'
15
+ unless $".find {|p| p.end_with?('/racc/info.rb')}
16
+ $".push "#{__dir__}/racc/info.rb"
17
+ #--
18
+ #
19
+ #
20
+ #
21
+ # Copyright (c) 1999-2006 Minero Aoki
22
+ #
23
+ # This program is free software.
24
+ # You can distribute/modify this program under the same terms of ruby.
25
+ # see the file "COPYING".
26
+ #
27
+ #++
28
+
29
+ module Racc
30
+ VERSION = '1.7.1'
31
+ Version = VERSION
32
+ Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
33
+ end
34
+
35
+ end
36
+
16
37
 
17
38
  unless defined?(NotImplementedError)
18
39
  NotImplementedError = NotImplementError # :nodoc:
@@ -262,11 +283,11 @@ module Racc
262
283
  # def next_token
263
284
  # @q.shift
264
285
  # end
265
- class_eval %{
286
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
266
287
  def do_parse
267
288
  #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
268
289
  end
269
- }
290
+ RUBY
270
291
 
271
292
  # The method to fetch next token.
272
293
  # If you use #do_parse method, you must implement #next_token.
@@ -324,11 +345,11 @@ module Racc
324
345
  #
325
346
  # RECEIVER#METHOD_ID is a method to get next token.
326
347
  # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
327
- class_eval %{
348
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
328
349
  def yyparse(recv, mid)
329
350
  #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
330
351
  end
331
- }
352
+ RUBY
332
353
 
333
354
  def _racc_yyparse_rb(recv, mid, arg, c_debug)
334
355
  action_table, action_check, action_default, action_pointer,
data/lib/racc/parser.rb CHANGED
@@ -260,11 +260,11 @@ module Racc
260
260
  # def next_token
261
261
  # @q.shift
262
262
  # end
263
- class_eval %{
263
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
264
264
  def do_parse
265
265
  #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
266
266
  end
267
- }
267
+ RUBY
268
268
 
269
269
  # The method to fetch next token.
270
270
  # If you use #do_parse method, you must implement #next_token.
@@ -322,11 +322,11 @@ module Racc
322
322
  #
323
323
  # RECEIVER#METHOD_ID is a method to get next token.
324
324
  # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
325
- class_eval %{
325
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
326
326
  def yyparse(recv, mid)
327
327
  #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
328
328
  end
329
- }
329
+ RUBY
330
330
 
331
331
  def _racc_yyparse_rb(recv, mid, arg, c_debug)
332
332
  action_table, action_check, action_default, action_pointer,
@@ -135,8 +135,8 @@ module Racc
135
135
 
136
136
  def embed_library(src)
137
137
  line %[###### #{src.filename} begin]
138
- line %[unless $".index '#{src.filename}']
139
- line %[$".push '#{src.filename}']
138
+ line %[unless $".find {|p| p.end_with?('/#{src.filename}')}]
139
+ line %[$".push "\#{__dir__}/#{src.filename}"]
140
140
  put src, @params.convert_line?
141
141
  line %[end]
142
142
  line %[###### #{src.filename} end]
@@ -310,8 +310,10 @@ module Racc
310
310
  racc_reduce_n,
311
311
  racc_use_result_var ]
312
312
  End
313
+ line "Ractor.make_shareable(Racc_arg) if defined?(Ractor)"
313
314
  line
314
315
  string_list 'Racc_token_to_s_table', table.token_to_s_table
316
+ line "Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)"
315
317
  line
316
318
  line "Racc_debug_parser = #{table.debug_parser}"
317
319
  line
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: racc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.7.1
5
5
  platform: java
6
6
  authors:
7
7
  - Minero Aoki
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-12-23 00:00:00.000000000 Z
12
+ date: 2023-06-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |
15
15
  Racc is a LALR(1) parser generator.
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.3.25
89
+ rubygems_version: 3.3.26
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Racc is a LALR(1) parser generator