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