cybrid_api_organization_ruby 0.73.0 → 0.73.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -2
  3. data/README.md +5 -5
  4. data/cybrid_api_organization_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_organization_ruby/api/organizations_organization_api.rb +1 -1
  6. data/lib/cybrid_api_organization_ruby/api_client.rb +1 -1
  7. data/lib/cybrid_api_organization_ruby/api_error.rb +1 -1
  8. data/lib/cybrid_api_organization_ruby/configuration.rb +1 -1
  9. data/lib/cybrid_api_organization_ruby/models/error_response_organization_model.rb +1 -1
  10. data/lib/cybrid_api_organization_ruby/models/organization_organization_model.rb +1 -1
  11. data/lib/cybrid_api_organization_ruby/models/patch_organization_organization_model.rb +1 -1
  12. data/lib/cybrid_api_organization_ruby/version.rb +2 -2
  13. data/lib/cybrid_api_organization_ruby.rb +1 -1
  14. data/spec/api/organizations_organization_api_spec.rb +1 -1
  15. data/spec/api_client_spec.rb +1 -1
  16. data/spec/configuration_spec.rb +1 -1
  17. data/spec/models/error_response_organization_model_spec.rb +1 -1
  18. data/spec/models/organization_organization_model_spec.rb +1 -1
  19. data/spec/models/patch_organization_organization_model_spec.rb +1 -1
  20. data/spec/spec_helper.rb +1 -1
  21. data/vendor/bundle/ruby/3.2.0/bin/racc +29 -0
  22. data/vendor/bundle/ruby/3.2.0/cache/parser-3.2.2.3.gem +0 -0
  23. data/vendor/bundle/ruby/3.2.0/cache/racc-1.7.0.gem +0 -0
  24. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
  25. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.15.5/gem_make.out +5 -5
  26. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  27. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.0/gem_make.out +5 -5
  28. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/gem.build_complete +0 -0
  29. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/gem_make.out +28 -0
  30. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/mkmf.log +57 -0
  31. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.0/racc/cparse.so +0 -0
  32. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.0.7/gem_make.out +5 -5
  33. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/macruby.rb +3 -1
  34. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby18.rb +3 -1
  35. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby19.rb +3 -1
  36. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby20.rb +3 -1
  37. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby21.rb +3 -1
  38. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby22.rb +3 -1
  39. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby23.rb +3 -1
  40. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby24.rb +3 -1
  41. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby25.rb +3 -1
  42. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby26.rb +3 -1
  43. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby27.rb +3 -1
  44. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby30.rb +3 -1
  45. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby31.rb +3 -1
  46. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby32.rb +3 -1
  47. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby33.rb +3 -1
  48. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rubymotion.rb +3 -1
  49. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/version.rb +1 -1
  50. data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/parser.gemspec +1 -1
  51. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/COPYING +22 -0
  52. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ChangeLog +846 -0
  53. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/README.ja.rdoc +94 -0
  54. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/README.rdoc +79 -0
  55. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/TODO +5 -0
  56. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/bin/racc +320 -0
  57. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/NEWS.en.rdoc +282 -0
  58. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/grammar.en.rdoc +226 -0
  59. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/en/grammar2.en.rdoc +219 -0
  60. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/NEWS.ja.rdoc +307 -0
  61. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/command.ja.html +94 -0
  62. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/debug.ja.rdoc +36 -0
  63. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/grammar.ja.rdoc +348 -0
  64. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/index.ja.html +10 -0
  65. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/parser.ja.rdoc +125 -0
  66. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/doc/ja/usage.ja.html +414 -0
  67. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/MANIFEST +4 -0
  68. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/Makefile +269 -0
  69. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/cparse.c +861 -0
  70. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/ext/racc/cparse/extconf.rb +9 -0
  71. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/compat.rb +33 -0
  72. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/cparse.so +0 -0
  73. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/debugflags.rb +60 -0
  74. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/exception.rb +16 -0
  75. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/grammar.rb +1114 -0
  76. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/grammarfileparser.rb +561 -0
  77. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/info.rb +17 -0
  78. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/iset.rb +92 -0
  79. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/logfilegenerator.rb +212 -0
  80. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parser-text.rb +658 -0
  81. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parser.rb +632 -0
  82. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/parserfilegenerator.rb +470 -0
  83. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/sourcetext.rb +35 -0
  84. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/state.rb +972 -0
  85. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/statetransitiontable.rb +311 -0
  86. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc/static.rb +5 -0
  87. data/vendor/bundle/ruby/3.2.0/gems/racc-1.7.0/lib/racc.rb +6 -0
  88. data/vendor/bundle/ruby/3.2.0/specifications/{parser-3.2.2.1.gemspec → parser-3.2.2.3.gemspec} +5 -5
  89. data/vendor/bundle/ruby/3.2.0/specifications/racc-1.7.0.gemspec +27 -0
  90. metadata +127 -83
  91. data/vendor/bundle/ruby/3.2.0/cache/parser-3.2.2.1.gem +0 -0
  92. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/LICENSE.txt +0 -0
  93. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-parse +0 -0
  94. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/bin/ruby-rewrite +0 -0
  95. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/gauntlet_parser.rb +0 -0
  96. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/all.rb +0 -0
  97. /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
  98. /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
  99. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/base.rb +0 -0
  100. /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
  101. /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
  102. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/color.rb +0 -0
  103. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/context.rb +0 -0
  104. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/current.rb +0 -0
  105. /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
  106. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/deprecation.rb +0 -0
  107. /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
  108. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/diagnostic.rb +0 -0
  109. /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
  110. /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
  111. /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
  112. /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
  113. /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
  114. /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
  115. /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
  116. /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
  117. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/messages.rb +0 -0
  118. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/meta.rb +0 -0
  119. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/rewriter.rb +0 -0
  120. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/ruby28.rb +0 -0
  121. /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
  122. /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
  123. /data/vendor/bundle/ruby/3.2.0/gems/{parser-3.2.2.1 → parser-3.2.2.3}/lib/parser/runner.rb +0 -0
  124. /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
  125. /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
  126. /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
  127. /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
  128. /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
  129. /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
  130. /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
  131. /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
  132. /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
  133. /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
  134. /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
  135. /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
  136. /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
  137. /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
  138. /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
  139. /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
  140. /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
  141. /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
  142. /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
  143. /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
  144. /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
  145. /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
  146. /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
  147. /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
  148. /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
  149. /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
  150. /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
  151. /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
  152. /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,658 @@
1
+ module Racc
2
+ PARSER_TEXT = <<'__end_of_file__'
3
+ # frozen_string_literal: false
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
+ #
10
+ # As a special exception, when this code is copied by Racc
11
+ # into a Racc output file, you may use that output file
12
+ # without restriction.
13
+ #++
14
+
15
+ unless $".find {|p| p.end_with?('/racc/info.rb')}
16
+ $".push '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.6.2'
31
+ Version = VERSION
32
+ Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
33
+ end
34
+
35
+ end
36
+
37
+
38
+ unless defined?(NotImplementedError)
39
+ NotImplementedError = NotImplementError # :nodoc:
40
+ end
41
+
42
+ module Racc
43
+ class ParseError < StandardError; end
44
+ end
45
+ unless defined?(::ParseError)
46
+ ParseError = Racc::ParseError # :nodoc:
47
+ end
48
+
49
+ # Racc is a LALR(1) parser generator.
50
+ # It is written in Ruby itself, and generates Ruby programs.
51
+ #
52
+ # == Command-line Reference
53
+ #
54
+ # racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
55
+ # [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
56
+ # [-v] [--verbose]
57
+ # [-O<var>filename</var>] [--log-file=<var>filename</var>]
58
+ # [-g] [--debug]
59
+ # [-E] [--embedded]
60
+ # [-l] [--no-line-convert]
61
+ # [-c] [--line-convert-all]
62
+ # [-a] [--no-omit-actions]
63
+ # [-C] [--check-only]
64
+ # [-S] [--output-status]
65
+ # [--version] [--copyright] [--help] <var>grammarfile</var>
66
+ #
67
+ # [+grammarfile+]
68
+ # Racc grammar file. Any extension is permitted.
69
+ # [-o+outfile+, --output-file=+outfile+]
70
+ # A filename for output. default is <+filename+>.tab.rb
71
+ # [-O+filename+, --log-file=+filename+]
72
+ # Place logging output in file +filename+.
73
+ # Default log file name is <+filename+>.output.
74
+ # [-e+rubypath+, --executable=+rubypath+]
75
+ # output executable file(mode 755). where +path+ is the Ruby interpreter.
76
+ # [-v, --verbose]
77
+ # verbose mode. create +filename+.output file, like yacc's y.output file.
78
+ # [-g, --debug]
79
+ # add debug code to parser class. To display debuggin information,
80
+ # use this '-g' option and set @yydebug true in parser class.
81
+ # [-E, --embedded]
82
+ # Output parser which doesn't need runtime files (racc/parser.rb).
83
+ # [-C, --check-only]
84
+ # Check syntax of racc grammar file and quit.
85
+ # [-S, --output-status]
86
+ # Print messages time to time while compiling.
87
+ # [-l, --no-line-convert]
88
+ # turns off line number converting.
89
+ # [-c, --line-convert-all]
90
+ # Convert line number of actions, inner, header and footer.
91
+ # [-a, --no-omit-actions]
92
+ # Call all actions, even if an action is empty.
93
+ # [--version]
94
+ # print Racc version and quit.
95
+ # [--copyright]
96
+ # Print copyright and quit.
97
+ # [--help]
98
+ # Print usage and quit.
99
+ #
100
+ # == Generating Parser Using Racc
101
+ #
102
+ # To compile Racc grammar file, simply type:
103
+ #
104
+ # $ racc parse.y
105
+ #
106
+ # This creates Ruby script file "parse.tab.y". The -o option can change the output filename.
107
+ #
108
+ # == Writing A Racc Grammar File
109
+ #
110
+ # If you want your own parser, you have to write a grammar file.
111
+ # A grammar file contains the name of your parser class, grammar for the parser,
112
+ # user code, and anything else.
113
+ # When writing a grammar file, yacc's knowledge is helpful.
114
+ # If you have not used yacc before, Racc is not too difficult.
115
+ #
116
+ # Here's an example Racc grammar file.
117
+ #
118
+ # class Calcparser
119
+ # rule
120
+ # target: exp { print val[0] }
121
+ #
122
+ # exp: exp '+' exp
123
+ # | exp '*' exp
124
+ # | '(' exp ')'
125
+ # | NUMBER
126
+ # end
127
+ #
128
+ # Racc grammar files resemble yacc files.
129
+ # But (of course), this is Ruby code.
130
+ # yacc's $$ is the 'result', $0, $1... is
131
+ # an array called 'val', and $-1, $-2... is an array called '_values'.
132
+ #
133
+ # See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for
134
+ # more information on grammar files.
135
+ #
136
+ # == Parser
137
+ #
138
+ # Then you must prepare the parse entry method. There are two types of
139
+ # parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse
140
+ #
141
+ # Racc::Parser#do_parse is simple.
142
+ #
143
+ # It's yyparse() of yacc, and Racc::Parser#next_token is yylex().
144
+ # This method must returns an array like [TOKENSYMBOL, ITS_VALUE].
145
+ # EOF is [false, false].
146
+ # (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default.
147
+ # If you want to change this, see the grammar reference.
148
+ #
149
+ # Racc::Parser#yyparse is little complicated, but useful.
150
+ # It does not use Racc::Parser#next_token, instead it gets tokens from any iterator.
151
+ #
152
+ # For example, <code>yyparse(obj, :scan)</code> causes
153
+ # calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+.
154
+ #
155
+ # == Debugging
156
+ #
157
+ # When debugging, "-v" or/and the "-g" option is helpful.
158
+ #
159
+ # "-v" creates verbose log file (.output).
160
+ # "-g" creates a "Verbose Parser".
161
+ # Verbose Parser prints the internal status when parsing.
162
+ # But it's _not_ automatic.
163
+ # You must use -g option and set +@yydebug+ to +true+ in order to get output.
164
+ # -g option only creates the verbose parser.
165
+ #
166
+ # === Racc reported syntax error.
167
+ #
168
+ # Isn't there too many "end"?
169
+ # grammar of racc file is changed in v0.10.
170
+ #
171
+ # Racc does not use '%' mark, while yacc uses huge number of '%' marks..
172
+ #
173
+ # === Racc reported "XXXX conflicts".
174
+ #
175
+ # Try "racc -v xxxx.y".
176
+ # It causes producing racc's internal log file, xxxx.output.
177
+ #
178
+ # === Generated parsers does not work correctly
179
+ #
180
+ # Try "racc -g xxxx.y".
181
+ # This command let racc generate "debugging parser".
182
+ # Then set @yydebug=true in your parser.
183
+ # It produces a working log of your parser.
184
+ #
185
+ # == Re-distributing Racc runtime
186
+ #
187
+ # A parser, which is created by Racc, requires the Racc runtime module;
188
+ # racc/parser.rb.
189
+ #
190
+ # Ruby 1.8.x comes with Racc runtime module,
191
+ # you need NOT distribute Racc runtime files.
192
+ #
193
+ # If you want to include the Racc runtime module with your parser.
194
+ # This can be done by using '-E' option:
195
+ #
196
+ # $ racc -E -omyparser.rb myparser.y
197
+ #
198
+ # This command creates myparser.rb which `includes' Racc runtime.
199
+ # Only you must do is to distribute your parser file (myparser.rb).
200
+ #
201
+ # Note: parser.rb is ruby license, but your parser is not.
202
+ # Your own parser is completely yours.
203
+ module Racc
204
+
205
+ unless defined?(Racc_No_Extensions)
206
+ Racc_No_Extensions = false # :nodoc:
207
+ end
208
+
209
+ class Parser
210
+
211
+ Racc_Runtime_Version = ::Racc::VERSION
212
+ Racc_Runtime_Core_Version_R = ::Racc::VERSION
213
+
214
+ begin
215
+ if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
216
+ require 'jruby'
217
+ require 'racc/cparse-jruby.jar'
218
+ com.headius.racc.Cparse.new.load(JRuby.runtime, false)
219
+ else
220
+ require 'racc/cparse'
221
+ end
222
+
223
+ unless new.respond_to?(:_racc_do_parse_c, true)
224
+ raise LoadError, 'old cparse.so'
225
+ end
226
+ if Racc_No_Extensions
227
+ raise LoadError, 'selecting ruby version of racc runtime core'
228
+ end
229
+
230
+ Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
231
+ Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
232
+ Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
233
+ Racc_Runtime_Type = 'c' # :nodoc:
234
+ rescue LoadError
235
+ Racc_Main_Parsing_Routine = :_racc_do_parse_rb
236
+ Racc_YY_Parse_Method = :_racc_yyparse_rb
237
+ Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
238
+ Racc_Runtime_Type = 'ruby'
239
+ end
240
+
241
+ def Parser.racc_runtime_type # :nodoc:
242
+ Racc_Runtime_Type
243
+ end
244
+
245
+ def _racc_setup
246
+ @yydebug = false unless self.class::Racc_debug_parser
247
+ @yydebug = false unless defined?(@yydebug)
248
+ if @yydebug
249
+ @racc_debug_out = $stderr unless defined?(@racc_debug_out)
250
+ @racc_debug_out ||= $stderr
251
+ end
252
+ arg = self.class::Racc_arg
253
+ arg[13] = true if arg.size < 14
254
+ arg
255
+ end
256
+
257
+ def _racc_init_sysvars
258
+ @racc_state = [0]
259
+ @racc_tstack = []
260
+ @racc_vstack = []
261
+
262
+ @racc_t = nil
263
+ @racc_val = nil
264
+
265
+ @racc_read_next = true
266
+
267
+ @racc_user_yyerror = false
268
+ @racc_error_status = 0
269
+ end
270
+
271
+ # The entry point of the parser. This method is used with #next_token.
272
+ # If Racc wants to get token (and its value), calls next_token.
273
+ #
274
+ # Example:
275
+ # def parse
276
+ # @q = [[1,1],
277
+ # [2,2],
278
+ # [3,3],
279
+ # [false, '$']]
280
+ # do_parse
281
+ # end
282
+ #
283
+ # def next_token
284
+ # @q.shift
285
+ # end
286
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
287
+ def do_parse
288
+ #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
289
+ end
290
+ RUBY
291
+
292
+ # The method to fetch next token.
293
+ # If you use #do_parse method, you must implement #next_token.
294
+ #
295
+ # The format of return value is [TOKEN_SYMBOL, VALUE].
296
+ # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT
297
+ # for 'IDENT'. ";" (String) for ';'.
298
+ #
299
+ # The final symbol (End of file) must be false.
300
+ def next_token
301
+ raise NotImplementedError, "#{self.class}\#next_token is not defined"
302
+ end
303
+
304
+ def _racc_do_parse_rb(arg, in_debug)
305
+ action_table, action_check, action_default, action_pointer,
306
+ _, _, _, _,
307
+ _, _, token_table, * = arg
308
+
309
+ _racc_init_sysvars
310
+ tok = act = i = nil
311
+
312
+ catch(:racc_end_parse) {
313
+ while true
314
+ if i = action_pointer[@racc_state[-1]]
315
+ if @racc_read_next
316
+ if @racc_t != 0 # not EOF
317
+ tok, @racc_val = next_token()
318
+ unless tok # EOF
319
+ @racc_t = 0
320
+ else
321
+ @racc_t = (token_table[tok] or 1) # error token
322
+ end
323
+ racc_read_token(@racc_t, tok, @racc_val) if @yydebug
324
+ @racc_read_next = false
325
+ end
326
+ end
327
+ i += @racc_t
328
+ unless i >= 0 and
329
+ act = action_table[i] and
330
+ action_check[i] == @racc_state[-1]
331
+ act = action_default[@racc_state[-1]]
332
+ end
333
+ else
334
+ act = action_default[@racc_state[-1]]
335
+ end
336
+ while act = _racc_evalact(act, arg)
337
+ ;
338
+ end
339
+ end
340
+ }
341
+ end
342
+
343
+ # Another entry point for the parser.
344
+ # If you use this method, you must implement RECEIVER#METHOD_ID method.
345
+ #
346
+ # RECEIVER#METHOD_ID is a method to get next token.
347
+ # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
348
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
349
+ def yyparse(recv, mid)
350
+ #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
351
+ end
352
+ RUBY
353
+
354
+ def _racc_yyparse_rb(recv, mid, arg, c_debug)
355
+ action_table, action_check, action_default, action_pointer,
356
+ _, _, _, _,
357
+ _, _, token_table, * = arg
358
+
359
+ _racc_init_sysvars
360
+
361
+ catch(:racc_end_parse) {
362
+ until i = action_pointer[@racc_state[-1]]
363
+ while act = _racc_evalact(action_default[@racc_state[-1]], arg)
364
+ ;
365
+ end
366
+ end
367
+ recv.__send__(mid) do |tok, val|
368
+ unless tok
369
+ @racc_t = 0
370
+ else
371
+ @racc_t = (token_table[tok] or 1) # error token
372
+ end
373
+ @racc_val = val
374
+ @racc_read_next = false
375
+
376
+ i += @racc_t
377
+ unless i >= 0 and
378
+ act = action_table[i] and
379
+ action_check[i] == @racc_state[-1]
380
+ act = action_default[@racc_state[-1]]
381
+ end
382
+ while act = _racc_evalact(act, arg)
383
+ ;
384
+ end
385
+
386
+ while !(i = action_pointer[@racc_state[-1]]) ||
387
+ ! @racc_read_next ||
388
+ @racc_t == 0 # $
389
+ unless i and i += @racc_t and
390
+ i >= 0 and
391
+ act = action_table[i] and
392
+ action_check[i] == @racc_state[-1]
393
+ act = action_default[@racc_state[-1]]
394
+ end
395
+ while act = _racc_evalact(act, arg)
396
+ ;
397
+ end
398
+ end
399
+ end
400
+ }
401
+ end
402
+
403
+ ###
404
+ ### common
405
+ ###
406
+
407
+ def _racc_evalact(act, arg)
408
+ action_table, action_check, _, action_pointer,
409
+ _, _, _, _,
410
+ _, _, _, shift_n,
411
+ reduce_n, * = arg
412
+ nerr = 0 # tmp
413
+
414
+ if act > 0 and act < shift_n
415
+ #
416
+ # shift
417
+ #
418
+ if @racc_error_status > 0
419
+ @racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF
420
+ end
421
+ @racc_vstack.push @racc_val
422
+ @racc_state.push act
423
+ @racc_read_next = true
424
+ if @yydebug
425
+ @racc_tstack.push @racc_t
426
+ racc_shift @racc_t, @racc_tstack, @racc_vstack
427
+ end
428
+
429
+ elsif act < 0 and act > -reduce_n
430
+ #
431
+ # reduce
432
+ #
433
+ code = catch(:racc_jump) {
434
+ @racc_state.push _racc_do_reduce(arg, act)
435
+ false
436
+ }
437
+ if code
438
+ case code
439
+ when 1 # yyerror
440
+ @racc_user_yyerror = true # user_yyerror
441
+ return -reduce_n
442
+ when 2 # yyaccept
443
+ return shift_n
444
+ else
445
+ raise '[Racc Bug] unknown jump code'
446
+ end
447
+ end
448
+
449
+ elsif act == shift_n
450
+ #
451
+ # accept
452
+ #
453
+ racc_accept if @yydebug
454
+ throw :racc_end_parse, @racc_vstack[0]
455
+
456
+ elsif act == -reduce_n
457
+ #
458
+ # error
459
+ #
460
+ case @racc_error_status
461
+ when 0
462
+ unless arg[21] # user_yyerror
463
+ nerr += 1
464
+ on_error @racc_t, @racc_val, @racc_vstack
465
+ end
466
+ when 3
467
+ if @racc_t == 0 # is $
468
+ # We're at EOF, and another error occurred immediately after
469
+ # attempting auto-recovery
470
+ throw :racc_end_parse, nil
471
+ end
472
+ @racc_read_next = true
473
+ end
474
+ @racc_user_yyerror = false
475
+ @racc_error_status = 3
476
+ while true
477
+ if i = action_pointer[@racc_state[-1]]
478
+ i += 1 # error token
479
+ if i >= 0 and
480
+ (act = action_table[i]) and
481
+ action_check[i] == @racc_state[-1]
482
+ break
483
+ end
484
+ end
485
+ throw :racc_end_parse, nil if @racc_state.size <= 1
486
+ @racc_state.pop
487
+ @racc_vstack.pop
488
+ if @yydebug
489
+ @racc_tstack.pop
490
+ racc_e_pop @racc_state, @racc_tstack, @racc_vstack
491
+ end
492
+ end
493
+ return act
494
+
495
+ else
496
+ raise "[Racc Bug] unknown action #{act.inspect}"
497
+ end
498
+
499
+ racc_next_state(@racc_state[-1], @racc_state) if @yydebug
500
+
501
+ nil
502
+ end
503
+
504
+ def _racc_do_reduce(arg, act)
505
+ _, _, _, _,
506
+ goto_table, goto_check, goto_default, goto_pointer,
507
+ nt_base, reduce_table, _, _,
508
+ _, use_result, * = arg
509
+
510
+ state = @racc_state
511
+ vstack = @racc_vstack
512
+ tstack = @racc_tstack
513
+
514
+ i = act * -3
515
+ len = reduce_table[i]
516
+ reduce_to = reduce_table[i+1]
517
+ method_id = reduce_table[i+2]
518
+ void_array = []
519
+
520
+ tmp_t = tstack[-len, len] if @yydebug
521
+ tmp_v = vstack[-len, len]
522
+ tstack[-len, len] = void_array if @yydebug
523
+ vstack[-len, len] = void_array
524
+ state[-len, len] = void_array
525
+
526
+ # tstack must be updated AFTER method call
527
+ if use_result
528
+ vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
529
+ else
530
+ vstack.push __send__(method_id, tmp_v, vstack)
531
+ end
532
+ tstack.push reduce_to
533
+
534
+ racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
535
+
536
+ k1 = reduce_to - nt_base
537
+ if i = goto_pointer[k1]
538
+ i += state[-1]
539
+ if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
540
+ return curstate
541
+ end
542
+ end
543
+ goto_default[k1]
544
+ end
545
+
546
+ # This method is called when a parse error is found.
547
+ #
548
+ # ERROR_TOKEN_ID is an internal ID of token which caused error.
549
+ # You can get string representation of this ID by calling
550
+ # #token_to_str.
551
+ #
552
+ # ERROR_VALUE is a value of error token.
553
+ #
554
+ # value_stack is a stack of symbol values.
555
+ # DO NOT MODIFY this object.
556
+ #
557
+ # This method raises ParseError by default.
558
+ #
559
+ # If this method returns, parsers enter "error recovering mode".
560
+ def on_error(t, val, vstack)
561
+ raise ParseError, sprintf("\nparse error on value %s (%s)",
562
+ val.inspect, token_to_str(t) || '?')
563
+ end
564
+
565
+ # Enter error recovering mode.
566
+ # This method does not call #on_error.
567
+ def yyerror
568
+ throw :racc_jump, 1
569
+ end
570
+
571
+ # Exit parser.
572
+ # Return value is +Symbol_Value_Stack[0]+.
573
+ def yyaccept
574
+ throw :racc_jump, 2
575
+ end
576
+
577
+ # Leave error recovering mode.
578
+ def yyerrok
579
+ @racc_error_status = 0
580
+ end
581
+
582
+ # For debugging output
583
+ def racc_read_token(t, tok, val)
584
+ @racc_debug_out.print 'read '
585
+ @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
586
+ @racc_debug_out.puts val.inspect
587
+ @racc_debug_out.puts
588
+ end
589
+
590
+ def racc_shift(tok, tstack, vstack)
591
+ @racc_debug_out.puts "shift #{racc_token2str tok}"
592
+ racc_print_stacks tstack, vstack
593
+ @racc_debug_out.puts
594
+ end
595
+
596
+ def racc_reduce(toks, sim, tstack, vstack)
597
+ out = @racc_debug_out
598
+ out.print 'reduce '
599
+ if toks.empty?
600
+ out.print ' <none>'
601
+ else
602
+ toks.each {|t| out.print ' ', racc_token2str(t) }
603
+ end
604
+ out.puts " --> #{racc_token2str(sim)}"
605
+ racc_print_stacks tstack, vstack
606
+ @racc_debug_out.puts
607
+ end
608
+
609
+ def racc_accept
610
+ @racc_debug_out.puts 'accept'
611
+ @racc_debug_out.puts
612
+ end
613
+
614
+ def racc_e_pop(state, tstack, vstack)
615
+ @racc_debug_out.puts 'error recovering mode: pop token'
616
+ racc_print_states state
617
+ racc_print_stacks tstack, vstack
618
+ @racc_debug_out.puts
619
+ end
620
+
621
+ def racc_next_state(curstate, state)
622
+ @racc_debug_out.puts "goto #{curstate}"
623
+ racc_print_states state
624
+ @racc_debug_out.puts
625
+ end
626
+
627
+ def racc_print_stacks(t, v)
628
+ out = @racc_debug_out
629
+ out.print ' ['
630
+ t.each_index do |i|
631
+ out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
632
+ end
633
+ out.puts ' ]'
634
+ end
635
+
636
+ def racc_print_states(s)
637
+ out = @racc_debug_out
638
+ out.print ' ['
639
+ s.each {|st| out.print ' ', st }
640
+ out.puts ' ]'
641
+ end
642
+
643
+ def racc_token2str(tok)
644
+ self.class::Racc_token_to_s_table[tok] or
645
+ raise "[Racc Bug] can't convert token #{tok} to string"
646
+ end
647
+
648
+ # Convert internal ID of token symbol to the string.
649
+ def token_to_str(t)
650
+ self.class::Racc_token_to_s_table[t]
651
+ end
652
+
653
+ end
654
+
655
+ end
656
+
657
+ __end_of_file__
658
+ end