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,212 @@
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
+ module Racc
14
+
15
+ class LogFileGenerator
16
+
17
+ def initialize(states, debug_flags = DebugFlags.new)
18
+ @states = states
19
+ @grammar = states.grammar
20
+ @debug_flags = debug_flags
21
+ end
22
+
23
+ def output(out)
24
+ output_conflict out; out.puts
25
+ output_useless out; out.puts
26
+ output_rule out; out.puts
27
+ output_token out; out.puts
28
+ output_state out
29
+ end
30
+
31
+ #
32
+ # Warnings
33
+ #
34
+
35
+ def output_conflict(out)
36
+ @states.each do |state|
37
+ if state.srconf
38
+ out.printf "state %d contains %d shift/reduce conflicts\n",
39
+ state.stateid, state.srconf.size
40
+ end
41
+ if state.rrconf
42
+ out.printf "state %d contains %d reduce/reduce conflicts\n",
43
+ state.stateid, state.rrconf.size
44
+ end
45
+ end
46
+ end
47
+
48
+ def output_useless(out)
49
+ @grammar.each do |rl|
50
+ if rl.useless?
51
+ out.printf "rule %d (%s) never reduced\n",
52
+ rl.ident, rl.target.to_s
53
+ end
54
+ end
55
+ @grammar.each_nonterminal do |t|
56
+ if t.useless?
57
+ out.printf "useless nonterminal %s\n", t.to_s
58
+ end
59
+ end
60
+ end
61
+
62
+ #
63
+ # States
64
+ #
65
+
66
+ def output_state(out)
67
+ out << "--------- State ---------\n"
68
+
69
+ showall = @debug_flags.la || @debug_flags.state
70
+ @states.each do |state|
71
+ out << "\nstate #{state.ident}\n\n"
72
+
73
+ (showall ? state.closure : state.core).each do |ptr|
74
+ pointer_out(out, ptr) if ptr.rule.ident != 0 or showall
75
+ end
76
+ out << "\n"
77
+
78
+ action_out out, state
79
+ end
80
+ end
81
+
82
+ def pointer_out(out, ptr)
83
+ buf = sprintf("%4d) %s :", ptr.rule.ident, ptr.rule.target.to_s)
84
+ ptr.rule.symbols.each_with_index do |tok, idx|
85
+ buf << ' _' if idx == ptr.index
86
+ buf << ' ' << tok.to_s
87
+ end
88
+ buf << ' _' if ptr.reduce?
89
+ out.puts buf
90
+ end
91
+
92
+ def action_out(f, state)
93
+ sr = state.srconf && state.srconf.dup
94
+ rr = state.rrconf && state.rrconf.dup
95
+ acts = state.action
96
+ keys = acts.keys
97
+ keys.sort! {|a,b| a.ident <=> b.ident }
98
+
99
+ [ Shift, Reduce, Error, Accept ].each do |klass|
100
+ keys.delete_if do |tok|
101
+ act = acts[tok]
102
+ if act.kind_of?(klass)
103
+ outact f, tok, act
104
+ if sr and c = sr.delete(tok)
105
+ outsrconf f, c
106
+ end
107
+ if rr and c = rr.delete(tok)
108
+ outrrconf f, c
109
+ end
110
+
111
+ true
112
+ else
113
+ false
114
+ end
115
+ end
116
+ end
117
+ sr.each {|tok, c| outsrconf f, c } if sr
118
+ rr.each {|tok, c| outrrconf f, c } if rr
119
+
120
+ act = state.defact
121
+ if not act.kind_of?(Error) or @debug_flags.any?
122
+ outact f, '$default', act
123
+ end
124
+
125
+ f.puts
126
+ state.goto_table.each do |t, st|
127
+ if t.nonterminal?
128
+ f.printf " %-12s go to state %d\n", t.to_s, st.ident
129
+ end
130
+ end
131
+ end
132
+
133
+ def outact(f, t, act)
134
+ case act
135
+ when Shift
136
+ f.printf " %-12s shift, and go to state %d\n",
137
+ t.to_s, act.goto_id
138
+ when Reduce
139
+ f.printf " %-12s reduce using rule %d (%s)\n",
140
+ t.to_s, act.ruleid, act.rule.target.to_s
141
+ when Accept
142
+ f.printf " %-12s accept\n", t.to_s
143
+ when Error
144
+ f.printf " %-12s error\n", t.to_s
145
+ else
146
+ raise "racc: fatal: wrong act for outact: act=#{act}(#{act.class})"
147
+ end
148
+ end
149
+
150
+ def outsrconf(f, confs)
151
+ confs.each do |c|
152
+ r = c.reduce
153
+ f.printf " %-12s [reduce using rule %d (%s)]\n",
154
+ c.shift.to_s, r.ident, r.target.to_s
155
+ end
156
+ end
157
+
158
+ def outrrconf(f, confs)
159
+ confs.each do |c|
160
+ r = c.low_prec
161
+ f.printf " %-12s [reduce using rule %d (%s)]\n",
162
+ c.token.to_s, r.ident, r.target.to_s
163
+ end
164
+ end
165
+
166
+ #
167
+ # Rules
168
+ #
169
+
170
+ def output_rule(out)
171
+ out.print "-------- Grammar --------\n\n"
172
+ @grammar.each do |rl|
173
+ if @debug_flags.any? or rl.ident != 0
174
+ out.printf "rule %d %s: %s\n",
175
+ rl.ident, rl.target.to_s, rl.symbols.join(' ')
176
+ end
177
+ end
178
+ end
179
+
180
+ #
181
+ # Tokens
182
+ #
183
+
184
+ def output_token(out)
185
+ out.print "------- Symbols -------\n\n"
186
+
187
+ out.print "**Nonterminals, with rules where they appear\n\n"
188
+ @grammar.each_nonterminal do |t|
189
+ tmp = <<SRC
190
+ %s (%d)
191
+ on right: %s
192
+ on left : %s
193
+ SRC
194
+ out.printf tmp, t.to_s, t.ident,
195
+ symbol_locations(t.locate).join(' '),
196
+ symbol_locations(t.heads).join(' ')
197
+ end
198
+
199
+ out.print "\n**Terminals, with rules where they appear\n\n"
200
+ @grammar.each_terminal do |t|
201
+ out.printf " %s (%d) %s\n",
202
+ t.to_s, t.ident, symbol_locations(t.locate).join(' ')
203
+ end
204
+ end
205
+
206
+ def symbol_locations(locs)
207
+ locs.map {|loc| loc.rule.ident }.reject {|n| n == 0 }.uniq
208
+ end
209
+
210
+ end
211
+
212
+ end # module Racc