cybrid_api_id_ruby 0.73.1 → 0.73.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_id_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_id_ruby/api/bank_applications_idp_api.rb +1 -1
  6. data/lib/cybrid_api_id_ruby/api/customer_tokens_idp_api.rb +1 -1
  7. data/lib/cybrid_api_id_ruby/api/organization_applications_idp_api.rb +1 -1
  8. data/lib/cybrid_api_id_ruby/api_client.rb +1 -1
  9. data/lib/cybrid_api_id_ruby/api_error.rb +1 -1
  10. data/lib/cybrid_api_id_ruby/configuration.rb +1 -1
  11. data/lib/cybrid_api_id_ruby/models/application_idp_model.rb +1 -1
  12. data/lib/cybrid_api_id_ruby/models/application_list_idp_model.rb +1 -1
  13. data/lib/cybrid_api_id_ruby/models/application_with_secret_all_of_idp_model.rb +1 -1
  14. data/lib/cybrid_api_id_ruby/models/application_with_secret_idp_model.rb +1 -1
  15. data/lib/cybrid_api_id_ruby/models/customer_token_idp_model.rb +1 -1
  16. data/lib/cybrid_api_id_ruby/models/post_bank_application_idp_model.rb +1 -1
  17. data/lib/cybrid_api_id_ruby/models/post_customer_token_idp_model.rb +1 -1
  18. data/lib/cybrid_api_id_ruby/models/post_organization_application_idp_model.rb +1 -1
  19. data/lib/cybrid_api_id_ruby/version.rb +2 -2
  20. data/lib/cybrid_api_id_ruby.rb +1 -1
  21. data/spec/api/bank_applications_idp_api_spec.rb +1 -1
  22. data/spec/api/customer_tokens_idp_api_spec.rb +1 -1
  23. data/spec/api/organization_applications_idp_api_spec.rb +1 -1
  24. data/spec/api_client_spec.rb +1 -1
  25. data/spec/configuration_spec.rb +1 -1
  26. data/spec/models/application_idp_model_spec.rb +1 -1
  27. data/spec/models/application_list_idp_model_spec.rb +1 -1
  28. data/spec/models/application_with_secret_all_of_idp_model_spec.rb +1 -1
  29. data/spec/models/application_with_secret_idp_model_spec.rb +1 -1
  30. data/spec/models/customer_token_idp_model_spec.rb +1 -1
  31. data/spec/models/post_bank_application_idp_model_spec.rb +1 -1
  32. data/spec/models/post_customer_token_idp_model_spec.rb +1 -1
  33. data/spec/models/post_organization_application_idp_model_spec.rb +1 -1
  34. data/spec/spec_helper.rb +1 -1
  35. data/vendor/bundle/ruby/3.2.0/bin/racc +29 -0
  36. data/vendor/bundle/ruby/3.2.0/cache/parser-3.2.2.3.gem +0 -0
  37. data/vendor/bundle/ruby/3.2.0/cache/racc-1.7.0.gem +0 -0
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +5 -5
  40. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  41. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.0/gem_make.out +5 -5
  42. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/gem.build_complete +0 -0
  43. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/gem_make.out +28 -0
  44. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/mkmf.log +57 -0
  45. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/racc/cparse.so +0 -0
  46. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.7/gem_make.out +5 -5
  47. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/macruby.rb +3 -1
  48. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby18.rb +3 -1
  49. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby19.rb +3 -1
  50. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby20.rb +3 -1
  51. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby21.rb +3 -1
  52. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby22.rb +3 -1
  53. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby23.rb +3 -1
  54. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby24.rb +3 -1
  55. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby25.rb +3 -1
  56. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby26.rb +3 -1
  57. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby27.rb +3 -1
  58. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby30.rb +3 -1
  59. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby31.rb +3 -1
  60. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby32.rb +3 -1
  61. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby33.rb +3 -1
  62. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rubymotion.rb +3 -1
  63. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/version.rb +1 -1
  64. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/parser.gemspec +1 -1
  65. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/COPYING +22 -0
  66. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ChangeLog +846 -0
  67. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/README.ja.rdoc +94 -0
  68. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/README.rdoc +79 -0
  69. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/TODO +5 -0
  70. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/bin/racc +320 -0
  71. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/NEWS.en.rdoc +282 -0
  72. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/grammar.en.rdoc +226 -0
  73. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/grammar2.en.rdoc +219 -0
  74. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/NEWS.ja.rdoc +307 -0
  75. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/command.ja.html +94 -0
  76. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/debug.ja.rdoc +36 -0
  77. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/grammar.ja.rdoc +348 -0
  78. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/index.ja.html +10 -0
  79. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/parser.ja.rdoc +125 -0
  80. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/usage.ja.html +414 -0
  81. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/MANIFEST +4 -0
  82. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/Makefile +269 -0
  83. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/cparse.c +861 -0
  84. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/extconf.rb +9 -0
  85. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/compat.rb +33 -0
  86. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/cparse.so +0 -0
  87. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/debugflags.rb +60 -0
  88. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/exception.rb +16 -0
  89. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/grammar.rb +1114 -0
  90. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/grammarfileparser.rb +561 -0
  91. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/info.rb +17 -0
  92. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/iset.rb +92 -0
  93. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/logfilegenerator.rb +212 -0
  94. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parser-text.rb +658 -0
  95. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parser.rb +632 -0
  96. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parserfilegenerator.rb +470 -0
  97. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/sourcetext.rb +35 -0
  98. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/state.rb +972 -0
  99. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/statetransitiontable.rb +311 -0
  100. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/static.rb +5 -0
  101. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc.rb +6 -0
  102. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.2.2.1.gemspec → parser-3.2.2.3.gemspec} +5 -5
  103. data/vendor/bundle/ruby/3.2.0/specifications/racc-1.7.0.gemspec +27 -0
  104. metadata +126 -82
  105. data/vendor/bundle/ruby/3.2.0/cache/parser-3.2.2.1.gem +0 -0
  106. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/LICENSE.txt +0 -0
  107. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-parse +0 -0
  108. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-rewrite +0 -0
  109. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/gauntlet_parser.rb +0 -0
  110. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/all.rb +0 -0
  111. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ast/node.rb +0 -0
  112. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ast/processor.rb +0 -0
  113. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/base.rb +0 -0
  114. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/builders/default.rb +0 -0
  115. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/clobbering_error.rb +0 -0
  116. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/color.rb +0 -0
  117. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/context.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/current.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/current_arg_stack.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/deprecation.rb +0 -0
  121. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/diagnostic/engine.rb +0 -0
  122. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/diagnostic.rb +0 -0
  123. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/dedenter.rb +0 -0
  124. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/explanation.rb +0 -0
  125. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/literal.rb +0 -0
  126. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer/stack_state.rb +0 -0
  127. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-F0.rb +0 -0
  128. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-F1.rb +0 -0
  129. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/lexer-strings.rb +0 -0
  130. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/max_numparam_stack.rb +0 -0
  131. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/messages.rb +0 -0
  132. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/meta.rb +0 -0
  133. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rewriter.rb +0 -0
  134. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby28.rb +0 -0
  135. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner/ruby_parse.rb +0 -0
  136. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner/ruby_rewrite.rb +0 -0
  137. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner.rb +0 -0
  138. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/buffer.rb +0 -0
  139. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/comment/associator.rb +0 -0
  140. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/comment.rb +0 -0
  141. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/collection.rb +0 -0
  142. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/condition.rb +0 -0
  143. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/constant.rb +0 -0
  144. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/definition.rb +0 -0
  145. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/for.rb +0 -0
  146. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/heredoc.rb +0 -0
  147. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/index.rb +0 -0
  148. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/keyword.rb +0 -0
  149. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/method_definition.rb +0 -0
  150. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/objc_kwarg.rb +0 -0
  151. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/operator.rb +0 -0
  152. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/rescue_body.rb +0 -0
  153. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/send.rb +0 -0
  154. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/ternary.rb +0 -0
  155. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map/variable.rb +0 -0
  156. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/map.rb +0 -0
  157. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/range.rb +0 -0
  158. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/rewriter/action.rb +0 -0
  159. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/rewriter.rb +0 -0
  160. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/tree_rewriter/action.rb +0 -0
  161. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/source/tree_rewriter.rb +0 -0
  162. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/static_environment.rb +0 -0
  163. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/syntax_error.rb +0 -0
  164. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/tree_rewriter.rb +0 -0
  165. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/variables_stack.rb +0 -0
  166. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser.rb +0 -0
@@ -0,0 +1,311 @@
1
+ #--
2
+ #
3
+ #
4
+ #
5
+ # Copyright (c) 1999-2006 Minero Aoki
6
+ #
7
+ # This program is free software.
8
+ # You can distribute/modify this program under the same terms of ruby.
9
+ # see the file "COPYING".
10
+ #
11
+ #++
12
+
13
+ require 'racc/parser'
14
+
15
+ module Racc
16
+
17
+ StateTransitionTable = Struct.new(:action_table,
18
+ :action_check,
19
+ :action_default,
20
+ :action_pointer,
21
+ :goto_table,
22
+ :goto_check,
23
+ :goto_default,
24
+ :goto_pointer,
25
+ :token_table,
26
+ :reduce_table,
27
+ :reduce_n,
28
+ :shift_n,
29
+ :nt_base,
30
+ :token_to_s_table,
31
+ :use_result_var,
32
+ :debug_parser)
33
+ class StateTransitionTable # reopen
34
+ def StateTransitionTable.generate(states)
35
+ StateTransitionTableGenerator.new(states).generate
36
+ end
37
+
38
+ def initialize(states)
39
+ super()
40
+ @states = states
41
+ @grammar = states.grammar
42
+ self.use_result_var = true
43
+ self.debug_parser = true
44
+ end
45
+
46
+ attr_reader :states
47
+ attr_reader :grammar
48
+
49
+ def parser_class
50
+ ParserClassGenerator.new(@states).generate
51
+ end
52
+
53
+ def token_value_table
54
+ h = {}
55
+ token_table().each do |sym, i|
56
+ h[sym.value] = i
57
+ end
58
+ h
59
+ end
60
+ end
61
+
62
+
63
+ class StateTransitionTableGenerator
64
+
65
+ def initialize(states)
66
+ @states = states
67
+ @grammar = states.grammar
68
+ end
69
+
70
+ def generate
71
+ t = StateTransitionTable.new(@states)
72
+ gen_action_tables t, @states
73
+ gen_goto_tables t, @grammar
74
+ t.token_table = token_table(@grammar)
75
+ t.reduce_table = reduce_table(@grammar)
76
+ t.reduce_n = @states.reduce_n
77
+ t.shift_n = @states.shift_n
78
+ t.nt_base = @grammar.nonterminal_base
79
+ t.token_to_s_table = @grammar.symbols.map {|sym| sym.to_s }
80
+ t
81
+ end
82
+
83
+ def reduce_table(grammar)
84
+ t = [0, 0, :racc_error]
85
+ grammar.each_with_index do |rule, idx|
86
+ next if idx == 0
87
+ t.push rule.size
88
+ t.push rule.target.ident
89
+ t.push(if rule.action.empty? # and @params.omit_action_call?
90
+ then :_reduce_none
91
+ else "_reduce_#{idx}".intern
92
+ end)
93
+ end
94
+ t
95
+ end
96
+
97
+ def token_table(grammar)
98
+ h = {}
99
+ grammar.symboltable.terminals.each do |t|
100
+ h[t] = t.ident
101
+ end
102
+ h
103
+ end
104
+
105
+ def gen_action_tables(t, states)
106
+ t.action_table = yytable = []
107
+ t.action_check = yycheck = []
108
+ t.action_default = yydefact = []
109
+ t.action_pointer = yypact = []
110
+ e1 = []
111
+ e2 = []
112
+ states.each do |state|
113
+ yydefact.push act2actid(state.defact)
114
+ if state.action.empty?
115
+ yypact.push nil
116
+ next
117
+ end
118
+ vector = []
119
+ state.action.each do |tok, act|
120
+ vector[tok.ident] = act2actid(act)
121
+ end
122
+ addent e1, vector, state.ident, yypact
123
+ end
124
+ set_table e1, e2, yytable, yycheck, yypact
125
+ end
126
+
127
+ def gen_goto_tables(t, grammar)
128
+ t.goto_table = yytable2 = []
129
+ t.goto_check = yycheck2 = []
130
+ t.goto_pointer = yypgoto = []
131
+ t.goto_default = yydefgoto = []
132
+ e1 = []
133
+ e2 = []
134
+ grammar.each_nonterminal do |tok|
135
+ tmp = []
136
+
137
+ # decide default
138
+ freq = Array.new(@states.size, 0)
139
+ @states.each do |state|
140
+ st = state.goto_table[tok]
141
+ if st
142
+ st = st.ident
143
+ freq[st] += 1
144
+ end
145
+ tmp[state.ident] = st
146
+ end
147
+ max = freq.max
148
+ if max > 1
149
+ default = freq.index(max)
150
+ tmp.map! {|i| default == i ? nil : i }
151
+ else
152
+ default = nil
153
+ end
154
+ yydefgoto.push default
155
+
156
+ # delete default value
157
+ tmp.pop until tmp.last or tmp.empty?
158
+ if tmp.compact.empty?
159
+ # only default
160
+ yypgoto.push nil
161
+ next
162
+ end
163
+
164
+ addent e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto
165
+ end
166
+ set_table e1, e2, yytable2, yycheck2, yypgoto
167
+ end
168
+
169
+ def addent(all, arr, chkval, ptr)
170
+ max = arr.size
171
+ min = nil
172
+ arr.each_with_index do |item, idx|
173
+ if item
174
+ min ||= idx
175
+ end
176
+ end
177
+ ptr.push(-7777) # mark
178
+ arr = arr[min...max]
179
+ all.push [arr, chkval, mkmapexp(arr), min, ptr.size - 1]
180
+ end
181
+
182
+ n = 2 ** 16
183
+ begin
184
+ Regexp.compile("a{#{n}}")
185
+ RE_DUP_MAX = n
186
+ rescue RegexpError
187
+ n /= 2
188
+ retry
189
+ end
190
+
191
+ def mkmapexp(arr)
192
+ i = ii = 0
193
+ as = arr.size
194
+ map = String.new
195
+ maxdup = RE_DUP_MAX
196
+ curr = nil
197
+ while i < as
198
+ ii = i + 1
199
+ if arr[i]
200
+ ii += 1 while ii < as and arr[ii]
201
+ curr = '-'
202
+ else
203
+ ii += 1 while ii < as and not arr[ii]
204
+ curr = '.'
205
+ end
206
+
207
+ offset = ii - i
208
+ if offset == 1
209
+ map << curr
210
+ else
211
+ while offset > maxdup
212
+ map << "#{curr}{#{maxdup}}"
213
+ offset -= maxdup
214
+ end
215
+ map << "#{curr}{#{offset}}" if offset > 1
216
+ end
217
+ i = ii
218
+ end
219
+ Regexp.compile(map, Regexp::NOENCODING)
220
+ end
221
+
222
+ def set_table(entries, dummy, tbl, chk, ptr)
223
+ upper = 0
224
+ map = '-' * 10240
225
+
226
+ # sort long to short
227
+ entries.sort_by!.with_index {|a,i| [-a[0].size, i] }
228
+
229
+ entries.each do |arr, chkval, expr, min, ptri|
230
+ if upper + arr.size > map.size
231
+ map << '-' * (arr.size + 1024)
232
+ end
233
+ idx = map.index(expr)
234
+ ptr[ptri] = idx - min
235
+ arr.each_with_index do |item, i|
236
+ if item
237
+ i += idx
238
+ tbl[i] = item
239
+ chk[i] = chkval
240
+ map[i] = ?o
241
+ end
242
+ end
243
+ upper = idx + arr.size
244
+ end
245
+ end
246
+
247
+ def act2actid(act)
248
+ case act
249
+ when Shift then act.goto_id
250
+ when Reduce then -act.ruleid
251
+ when Accept then @states.shift_n
252
+ when Error then @states.reduce_n * -1
253
+ else
254
+ raise "racc: fatal: wrong act type #{act.class} in action table"
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+
261
+ class ParserClassGenerator
262
+
263
+ def initialize(states)
264
+ @states = states
265
+ @grammar = states.grammar
266
+ end
267
+
268
+ def generate
269
+ table = @states.state_transition_table
270
+ c = Class.new(::Racc::Parser)
271
+ c.const_set :Racc_arg, [table.action_table,
272
+ table.action_check,
273
+ table.action_default,
274
+ table.action_pointer,
275
+ table.goto_table,
276
+ table.goto_check,
277
+ table.goto_default,
278
+ table.goto_pointer,
279
+ table.nt_base,
280
+ table.reduce_table,
281
+ table.token_value_table,
282
+ table.shift_n,
283
+ table.reduce_n,
284
+ false]
285
+ c.const_set :Racc_token_to_s_table, table.token_to_s_table
286
+ c.const_set :Racc_debug_parser, true
287
+ define_actions c
288
+ c
289
+ end
290
+
291
+ private
292
+
293
+ def define_actions(c)
294
+ c.module_eval "def _reduce_none(vals, vstack) vals[0] end"
295
+ @grammar.each do |rule|
296
+ if rule.action.empty?
297
+ c.alias_method("_reduce_#{rule.ident}", :_reduce_none)
298
+ else
299
+ c.define_method("_racc_action_#{rule.ident}", &rule.action.proc)
300
+ c.module_eval(<<-End, __FILE__, __LINE__ + 1)
301
+ def _reduce_#{rule.ident}(vals, vstack)
302
+ _racc_action_#{rule.ident}(*vals)
303
+ end
304
+ End
305
+ end
306
+ end
307
+ end
308
+
309
+ end
310
+
311
+ end # module Racc
@@ -0,0 +1,5 @@
1
+ require 'racc'
2
+ require 'racc/parser'
3
+ require 'racc/grammarfileparser'
4
+ require 'racc/parserfilegenerator'
5
+ require 'racc/logfilegenerator'
@@ -0,0 +1,6 @@
1
+ require 'racc/compat'
2
+ require 'racc/debugflags'
3
+ require 'racc/grammar'
4
+ require 'racc/state'
5
+ require 'racc/exception'
6
+ require 'racc/info'
@@ -1,15 +1,15 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: parser 3.2.2.1 ruby lib
2
+ # stub: parser 3.2.2.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "parser".freeze
6
- s.version = "3.2.2.1"
6
+ s.version = "3.2.2.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
- s.metadata = { "bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.2.2.1/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.2.2.1", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.2.2.1" } if s.respond_to? :metadata=
9
+ s.metadata = { "bug_tracker_uri" => "https://github.com/whitequark/parser/issues", "changelog_uri" => "https://github.com/whitequark/parser/blob/v3.2.2.3/CHANGELOG.md", "documentation_uri" => "https://www.rubydoc.info/gems/parser/3.2.2.3", "source_code_uri" => "https://github.com/whitequark/parser/tree/v3.2.2.3" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["whitequark".freeze]
12
- s.date = "2023-04-24"
12
+ s.date = "2023-06-08"
13
13
  s.description = "A Ruby parser written in pure Ruby.".freeze
14
14
  s.email = ["whitequark@whitequark.org".freeze]
15
15
  s.executables = ["ruby-parse".freeze, "ruby-rewrite".freeze]
@@ -25,9 +25,9 @@ Gem::Specification.new do |s|
25
25
  s.specification_version = 4
26
26
 
27
27
  s.add_runtime_dependency(%q<ast>.freeze, ["~> 2.4.1"])
28
+ s.add_runtime_dependency(%q<racc>.freeze, [">= 0"])
28
29
  s.add_development_dependency(%q<bundler>.freeze, [">= 1.15", "< 3.0.0"])
29
30
  s.add_development_dependency(%q<rake>.freeze, ["~> 13.0.1"])
30
- s.add_development_dependency(%q<racc>.freeze, ["= 1.6.2"])
31
31
  s.add_development_dependency(%q<cliver>.freeze, ["~> 0.3.2"])
32
32
  s.add_development_dependency(%q<yard>.freeze, [">= 0"])
33
33
  s.add_development_dependency(%q<kramdown>.freeze, [">= 0"])
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: racc 1.7.0 ruby lib
3
+ # stub: ext/racc/cparse/extconf.rb
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "racc".freeze
7
+ s.version = "1.7.0"
8
+
9
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
+ s.require_paths = ["lib".freeze]
11
+ s.authors = ["Minero Aoki".freeze, "Aaron Patterson".freeze]
12
+ s.date = "2023-06-08"
13
+ s.description = "Racc is a LALR(1) parser generator.\n It is written in Ruby itself, and generates Ruby program.\n\n NOTE: Ruby 1.8.x comes with Racc runtime module. You\n can run your parsers generated by racc 1.4.x out of the\n box.\n".freeze
14
+ s.email = [nil, "aaron@tenderlovemaking.com".freeze]
15
+ s.executables = ["racc".freeze]
16
+ s.extensions = ["ext/racc/cparse/extconf.rb".freeze]
17
+ s.extra_rdoc_files = ["README.ja.rdoc".freeze, "README.rdoc".freeze]
18
+ s.files = ["README.ja.rdoc".freeze, "README.rdoc".freeze, "bin/racc".freeze, "ext/racc/cparse/extconf.rb".freeze]
19
+ s.homepage = "https://github.com/ruby/racc".freeze
20
+ s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
21
+ s.rdoc_options = ["--main".freeze, "README.rdoc".freeze]
22
+ s.required_ruby_version = Gem::Requirement.new(">= 2.5".freeze)
23
+ s.rubygems_version = "3.4.12".freeze
24
+ s.summary = "Racc is a LALR(1) parser generator".freeze
25
+
26
+ s.installed_by_version = "3.4.12" if s.respond_to? :installed_by_version
27
+ end