[ruby/racc] Make racc Ractor compatible

1948de9d1d
This commit is contained in:
Masataka Pocke Kuwabara 2021-09-13 19:00:53 +09:00 committed by Hiroshi SHIBATA
parent 7e283c585e
commit 11e15b4d48
21 changed files with 55 additions and 13 deletions

View file

@ -310,8 +310,10 @@ module Racc
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
End End
line "Ractor.make_shareable(Racc_arg) if defined?(Ractor)"
line line
string_list 'Racc_token_to_s_table', table.token_to_s_table string_list 'Racc_token_to_s_table', table.token_to_s_table
line "Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)"
line line
line "Racc_debug_parser = #{table.debug_parser}" line "Racc_debug_parser = #{table.debug_parser}"
line line

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -286,6 +286,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -358,6 +359,7 @@ Racc_token_to_s_table = [
"generic_block", "generic_block",
"extends_statement", "extends_statement",
"document_component" ] "document_component" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1896,6 +1896,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -2064,6 +2065,7 @@ Racc_token_to_s_table = [
"logical_or_expression", "logical_or_expression",
"conditional_expression", "conditional_expression",
"assignment_operator" ] "assignment_operator" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -705,6 +705,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -853,6 +854,7 @@ Racc_token_to_s_table = [
"calc_product", "calc_product",
"calc_value", "calc_value",
"unary_operator" ] "unary_operator" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -699,6 +699,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -806,6 +807,7 @@ Racc_token_to_s_table = [
"d01_23", "d01_23",
"d01_29", "d01_29",
"d01_30" ] "d01_30" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -894,6 +894,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -1028,6 +1029,7 @@ Racc_token_to_s_table = [
"interpolation", "interpolation",
"interpolated_string_chunk", "interpolated_string_chunk",
"chars" ] "chars" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -105,6 +105,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -128,6 +129,7 @@ Racc_token_to_s_table = [
"literal", "literal",
"slash", "slash",
"dot" ] "dot" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -424,6 +424,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -481,6 +482,7 @@ Racc_token_to_s_table = [
"tag_next_cont", "tag_next_cont",
"tag_next_cont2", "tag_next_cont2",
"tag_next_cont3" ] "tag_next_cont3" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -446,6 +446,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -492,6 +493,7 @@ Racc_token_to_s_table = [
"items", "items",
"item", "item",
"quantifier" ] "quantifier" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -581,6 +581,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -671,6 +672,7 @@ Racc_token_to_s_table = [
"dictionary_contents", "dictionary_contents",
"dictionary_definition", "dictionary_definition",
"template_parameters" ] "template_parameters" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -545,6 +545,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -690,6 +691,7 @@ Racc_token_to_s_table = [
"flavors", "flavors",
"valueInitializers", "valueInitializers",
"valueInitializer" ] "valueInitializer" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -345,6 +345,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -377,6 +378,7 @@ Racc_token_to_s_table = [
"suffices", "suffices",
"u_word", "u_word",
"titles" ] "titles" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1368,6 +1368,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -1505,6 +1506,7 @@ Racc_token_to_s_table = [
"list_elems", "list_elems",
"param", "param",
"var_decl" ] "var_decl" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -248,6 +248,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -305,6 +306,7 @@ Racc_token_to_s_table = [
"negation", "negation",
"eql_incl_dash", "eql_incl_dash",
"negation_arg" ] "negation_arg" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -6523,6 +6523,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -6822,6 +6823,7 @@ Racc_token_to_s_table = [
"restarg_mark", "restarg_mark",
"blkarg_mark", "blkarg_mark",
"assoc" ] "assoc" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -144,6 +144,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -172,6 +173,7 @@ Racc_token_to_s_table = [
"object", "object",
"attribute_list", "attribute_list",
"attribute" ] "attribute" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -2037,6 +2037,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -2216,6 +2217,7 @@ Racc_token_to_s_table = [
"Catchable", "Catchable",
"ElseBlock", "ElseBlock",
"ElseifBlock" ] "ElseifBlock" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -6294,6 +6294,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -6560,6 +6561,7 @@ Racc_token_to_s_table = [
"restarg_mark", "restarg_mark",
"blkarg_mark", "blkarg_mark",
"assoc" ] "assoc" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -6733,6 +6733,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -7059,6 +7060,7 @@ Racc_token_to_s_table = [
"restarg_mark", "restarg_mark",
"blkarg_mark", "blkarg_mark",
"assoc" ] "assoc" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -691,6 +691,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -873,6 +874,7 @@ Racc_token_to_s_table = [
"optional_sign", "optional_sign",
"array_values", "array_values",
"array_value" ] "array_value" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false

View file

@ -1,6 +1,6 @@
# #
# DO NOT MODIFY!!!! # DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.5.0 # This file is automatically generated by Racc 1.5.2
# from Racc grammar file "". # from Racc grammar file "".
# #
@ -282,6 +282,7 @@ Racc_arg = [
racc_shift_n, racc_shift_n,
racc_reduce_n, racc_reduce_n,
racc_use_result_var ] racc_use_result_var ]
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
Racc_token_to_s_table = [ Racc_token_to_s_table = [
"$end", "$end",
@ -316,6 +317,7 @@ Racc_token_to_s_table = [
"or_stmt", "or_stmt",
"bind_var", "bind_var",
"embed_var" ] "embed_var" ]
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
Racc_debug_parser = false Racc_debug_parser = false