rdoc 5.1.0 → 6.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CONTRIBUTING.rdoc +5 -6
- data/ExampleMarkdown.md +2 -0
- data/ExampleRDoc.rdoc +2 -0
- data/History.rdoc +68 -66
- data/LEGAL.rdoc +1 -1
- data/LICENSE.rdoc +2 -0
- data/README.rdoc +18 -6
- data/RI.md +842 -0
- data/TODO.rdoc +8 -7
- data/exe/rdoc +0 -1
- data/lib/rdoc/{alias.rb → code_object/alias.rb} +4 -12
- data/lib/rdoc/{anon_class.rb → code_object/anon_class.rb} +1 -2
- data/lib/rdoc/{any_method.rb → code_object/any_method.rb} +83 -26
- data/lib/rdoc/{attr.rb → code_object/attr.rb} +5 -9
- data/lib/rdoc/{class_module.rb → code_object/class_module.rb} +112 -24
- data/lib/rdoc/{constant.rb → code_object/constant.rb} +4 -5
- data/lib/rdoc/{context → code_object/context}/section.rb +13 -83
- data/lib/rdoc/{context.rb → code_object/context.rb} +69 -70
- data/lib/rdoc/{extend.rb → code_object/extend.rb} +1 -2
- data/lib/rdoc/{ghost_method.rb → code_object/ghost_method.rb} +1 -2
- data/lib/rdoc/{include.rb → code_object/include.rb} +1 -2
- data/lib/rdoc/{meta_method.rb → code_object/meta_method.rb} +1 -2
- data/lib/rdoc/{method_attr.rb → code_object/method_attr.rb} +22 -31
- data/lib/rdoc/{mixin.rb → code_object/mixin.rb} +1 -2
- data/lib/rdoc/{normal_class.rb → code_object/normal_class.rb} +4 -5
- data/lib/rdoc/{normal_module.rb → code_object/normal_module.rb} +2 -3
- data/lib/rdoc/{require.rb → code_object/require.rb} +2 -3
- data/lib/rdoc/{single_class.rb → code_object/single_class.rb} +6 -2
- data/lib/rdoc/{top_level.rb → code_object/top_level.rb} +22 -32
- data/lib/rdoc/code_object.rb +8 -41
- data/lib/rdoc/code_objects.rb +2 -3
- data/lib/rdoc/comment.rb +48 -41
- data/lib/rdoc/cross_reference.rb +77 -33
- data/lib/rdoc/encoding.rb +50 -38
- data/lib/rdoc/erb_partial.rb +2 -3
- data/lib/rdoc/erbio.rb +4 -5
- data/lib/rdoc/generator/darkfish.rb +178 -125
- data/lib/rdoc/generator/json_index.rb +9 -22
- data/lib/rdoc/generator/markup.rb +6 -17
- data/lib/rdoc/generator/pot/message_extractor.rb +4 -4
- data/lib/rdoc/generator/pot/po.rb +3 -3
- data/lib/rdoc/generator/pot/po_entry.rb +12 -12
- data/lib/rdoc/generator/pot.rb +4 -8
- data/lib/rdoc/generator/ri.rb +1 -2
- data/lib/rdoc/generator/template/darkfish/_footer.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +35 -12
- data/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +1 -5
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +7 -7
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +6 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +19 -10
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +26 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +4 -9
- data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +4 -4
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +27 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/lib/rdoc/generator/template/darkfish/class.rhtml +125 -78
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +430 -339
- data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- data/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- data/lib/rdoc/generator/template/darkfish/index.rhtml +13 -13
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +51 -92
- data/lib/rdoc/generator/template/darkfish/js/search.js +35 -34
- data/lib/rdoc/generator/template/darkfish/page.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +10 -8
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +20 -18
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +32 -20
- data/lib/rdoc/generator/template/json_index/js/navigation.js +12 -49
- data/lib/rdoc/generator/template/json_index/js/searcher.js +6 -6
- data/lib/rdoc/generator.rb +6 -6
- data/lib/rdoc/i18n/locale.rb +1 -1
- data/lib/rdoc/i18n/text.rb +5 -5
- data/lib/rdoc/i18n.rb +4 -4
- data/lib/rdoc/known_classes.rb +6 -5
- data/lib/rdoc/markdown/entities.rb +1 -2
- data/lib/rdoc/markdown/literals.kpeg +1 -2
- data/lib/rdoc/markdown/literals.rb +99 -50
- data/lib/rdoc/markdown.kpeg +115 -58
- data/lib/rdoc/markdown.rb +1584 -902
- data/lib/rdoc/markup/attr_changer.rb +1 -2
- data/lib/rdoc/markup/attr_span.rb +9 -4
- data/lib/rdoc/markup/attribute_manager.rb +118 -57
- data/lib/rdoc/markup/attributes.rb +7 -8
- data/lib/rdoc/markup/blank_line.rb +1 -2
- data/lib/rdoc/markup/block_quote.rb +1 -2
- data/lib/rdoc/markup/document.rb +1 -2
- data/lib/rdoc/markup/formatter.rb +44 -37
- data/lib/rdoc/markup/hard_break.rb +1 -2
- data/lib/rdoc/markup/heading.rb +11 -6
- data/lib/rdoc/markup/include.rb +1 -2
- data/lib/rdoc/markup/indented_paragraph.rb +1 -2
- data/lib/rdoc/markup/list.rb +1 -2
- data/lib/rdoc/markup/list_item.rb +1 -2
- data/lib/rdoc/markup/paragraph.rb +1 -2
- data/lib/rdoc/markup/parser.rb +90 -48
- data/lib/rdoc/markup/pre_process.rb +38 -11
- data/lib/rdoc/markup/raw.rb +1 -2
- data/lib/rdoc/markup/regexp_handling.rb +40 -0
- data/lib/rdoc/markup/rule.rb +1 -2
- data/lib/rdoc/markup/table.rb +56 -0
- data/lib/rdoc/markup/to_ansi.rb +1 -2
- data/lib/rdoc/markup/to_bs.rb +30 -5
- data/lib/rdoc/markup/to_html.rb +95 -40
- data/lib/rdoc/markup/to_html_crossref.rb +108 -43
- data/lib/rdoc/markup/to_html_snippet.rb +13 -11
- data/lib/rdoc/markup/to_joined_paragraph.rb +6 -32
- data/lib/rdoc/markup/to_label.rb +11 -12
- data/lib/rdoc/markup/to_markdown.rb +13 -14
- data/lib/rdoc/markup/to_rdoc.rb +49 -31
- data/lib/rdoc/markup/to_table_of_contents.rb +2 -2
- data/lib/rdoc/markup/to_test.rb +1 -2
- data/lib/rdoc/markup/to_tt_only.rb +3 -4
- data/lib/rdoc/markup/verbatim.rb +1 -2
- data/lib/rdoc/markup.rb +64 -694
- data/lib/rdoc/options.rb +226 -44
- data/lib/rdoc/parser/c.rb +231 -246
- data/lib/rdoc/parser/changelog.rb +169 -23
- data/lib/rdoc/parser/markdown.rb +1 -3
- data/lib/rdoc/parser/prism_ruby.rb +1092 -0
- data/lib/rdoc/parser/rd.rb +1 -2
- data/lib/rdoc/parser/ripper_state_lex.rb +302 -0
- data/lib/rdoc/parser/ruby.rb +695 -478
- data/lib/rdoc/parser/ruby_tools.rb +33 -36
- data/lib/rdoc/parser/simple.rb +4 -4
- data/lib/rdoc/parser/text.rb +1 -2
- data/lib/rdoc/parser.rb +37 -42
- data/lib/rdoc/rd/block_parser.rb +708 -57
- data/lib/rdoc/rd/block_parser.ry +15 -11
- data/lib/rdoc/rd/inline.rb +5 -6
- data/lib/rdoc/rd/inline_parser.rb +787 -140
- data/lib/rdoc/rd/inline_parser.ry +1 -1
- data/lib/rdoc/rd.rb +4 -5
- data/lib/rdoc/rdoc.rb +72 -87
- data/lib/rdoc/ri/driver.rb +236 -152
- data/lib/rdoc/ri/formatter.rb +1 -1
- data/lib/rdoc/ri/paths.rb +4 -18
- data/lib/rdoc/ri/store.rb +1 -2
- data/lib/rdoc/ri/task.rb +2 -2
- data/lib/rdoc/ri.rb +5 -6
- data/lib/rdoc/rubygems_hook.rb +98 -20
- data/lib/rdoc/servlet.rb +30 -20
- data/lib/rdoc/stats/normal.rb +24 -18
- data/lib/rdoc/stats/quiet.rb +1 -2
- data/lib/rdoc/stats/verbose.rb +1 -3
- data/lib/rdoc/stats.rb +6 -7
- data/lib/rdoc/store.rb +84 -55
- data/lib/rdoc/task.rb +35 -10
- data/lib/rdoc/text.rb +40 -27
- data/lib/rdoc/token_stream.rb +56 -34
- data/lib/rdoc/tom_doc.rb +18 -19
- data/lib/rdoc/version.rb +10 -0
- data/lib/rdoc.rb +80 -56
- data/lib/rubygems_plugin.rb +23 -0
- data/man/ri.1 +247 -0
- metadata +45 -99
- data/.document +0 -5
- data/.gitignore +0 -13
- data/.travis.yml +0 -24
- data/Gemfile +0 -3
- data/RI.rdoc +0 -57
- data/Rakefile +0 -133
- data/bin/console +0 -7
- data/bin/setup +0 -6
- data/lib/gauntlet_rdoc.rb +0 -82
- data/lib/rdoc/generator/template/darkfish/.document +0 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml +0 -19
- data/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml +0 -9
- data/lib/rdoc/generator/template/darkfish/js/jquery.js +0 -4
- data/lib/rdoc/generator/template/json_index/.document +0 -1
- data/lib/rdoc/markup/formatter_test_case.rb +0 -764
- data/lib/rdoc/markup/inline.rb +0 -2
- data/lib/rdoc/markup/special.rb +0 -41
- data/lib/rdoc/markup/text_formatter_test_case.rb +0 -115
- data/lib/rdoc/ruby_lex.rb +0 -1367
- data/lib/rdoc/ruby_token.rb +0 -461
- data/lib/rdoc/test_case.rb +0 -204
- data/rdoc.gemspec +0 -57
data/lib/rdoc/rd/block_parser.rb
CHANGED
@@ -1,10 +1,655 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
4
|
-
# from Racc grammar file "".
|
4
|
+
# This file is automatically generated by Racc 1.8.1
|
5
|
+
# from Racc grammar file "block_parser.ry".
|
5
6
|
#
|
6
7
|
|
7
|
-
|
8
|
+
###### racc/parser.rb begin
|
9
|
+
unless $".find {|p| p.end_with?('/racc/parser.rb')}
|
10
|
+
$".push "#{__dir__}/racc/parser.rb"
|
11
|
+
#--
|
12
|
+
# Copyright (c) 1999-2006 Minero Aoki
|
13
|
+
#
|
14
|
+
# This program is free software.
|
15
|
+
# You can distribute/modify this program under the same terms of ruby.
|
16
|
+
#
|
17
|
+
# As a special exception, when this code is copied by Racc
|
18
|
+
# into a Racc output file, you may use that output file
|
19
|
+
# without restriction.
|
20
|
+
#++
|
21
|
+
|
22
|
+
unless $".find {|p| p.end_with?('/racc/info.rb')}
|
23
|
+
$".push "#{__dir__}/racc/info.rb"
|
24
|
+
|
25
|
+
module Racc
|
26
|
+
VERSION = '1.8.1'
|
27
|
+
Version = VERSION
|
28
|
+
Copyright = 'Copyright (c) 1999-2006 Minero Aoki'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
module Racc
|
35
|
+
class ParseError < StandardError; end
|
36
|
+
end
|
37
|
+
unless defined?(::ParseError)
|
38
|
+
ParseError = Racc::ParseError # :nodoc:
|
39
|
+
end
|
40
|
+
|
41
|
+
# Racc is an LALR(1) parser generator.
|
42
|
+
# It is written in Ruby itself, and generates Ruby programs.
|
43
|
+
#
|
44
|
+
# == Command-line Reference
|
45
|
+
#
|
46
|
+
# racc [-o<var>filename</var>] [--output-file=<var>filename</var>]
|
47
|
+
# [-e<var>rubypath</var>] [--executable=<var>rubypath</var>]
|
48
|
+
# [-v] [--verbose]
|
49
|
+
# [-O<var>filename</var>] [--log-file=<var>filename</var>]
|
50
|
+
# [-g] [--debug]
|
51
|
+
# [-E] [--embedded]
|
52
|
+
# [-l] [--no-line-convert]
|
53
|
+
# [-c] [--line-convert-all]
|
54
|
+
# [-a] [--no-omit-actions]
|
55
|
+
# [-C] [--check-only]
|
56
|
+
# [-S] [--output-status]
|
57
|
+
# [--version] [--copyright] [--help] <var>grammarfile</var>
|
58
|
+
#
|
59
|
+
# [+grammarfile+]
|
60
|
+
# Racc grammar file. Any extension is permitted.
|
61
|
+
# [-o+outfile+, --output-file=+outfile+]
|
62
|
+
# A filename for output. default is <+filename+>.tab.rb
|
63
|
+
# [-O+filename+, --log-file=+filename+]
|
64
|
+
# Place logging output in file +filename+.
|
65
|
+
# Default log file name is <+filename+>.output.
|
66
|
+
# [-e+rubypath+, --executable=+rubypath+]
|
67
|
+
# output executable file(mode 755). where +path+ is the Ruby interpreter.
|
68
|
+
# [-v, --verbose]
|
69
|
+
# verbose mode. create +filename+.output file, like yacc's y.output file.
|
70
|
+
# [-g, --debug]
|
71
|
+
# add debug code to parser class. To display debugging information,
|
72
|
+
# use this '-g' option and set @yydebug true in parser class.
|
73
|
+
# [-E, --embedded]
|
74
|
+
# Output parser which doesn't need runtime files (racc/parser.rb).
|
75
|
+
# [-F, --frozen]
|
76
|
+
# Output parser which declares frozen_string_literals: true
|
77
|
+
# [-C, --check-only]
|
78
|
+
# Check syntax of racc grammar file and quit.
|
79
|
+
# [-S, --output-status]
|
80
|
+
# Print messages time to time while compiling.
|
81
|
+
# [-l, --no-line-convert]
|
82
|
+
# turns off line number converting.
|
83
|
+
# [-c, --line-convert-all]
|
84
|
+
# Convert line number of actions, inner, header and footer.
|
85
|
+
# [-a, --no-omit-actions]
|
86
|
+
# Call all actions, even if an action is empty.
|
87
|
+
# [--version]
|
88
|
+
# print Racc version and quit.
|
89
|
+
# [--copyright]
|
90
|
+
# Print copyright and quit.
|
91
|
+
# [--help]
|
92
|
+
# Print usage and quit.
|
93
|
+
#
|
94
|
+
# == Generating Parser Using Racc
|
95
|
+
#
|
96
|
+
# To compile Racc grammar file, simply type:
|
97
|
+
#
|
98
|
+
# $ racc parse.y
|
99
|
+
#
|
100
|
+
# This creates Ruby script file "parse.tab.y". The -o option can change the output filename.
|
101
|
+
#
|
102
|
+
# == Writing A Racc Grammar File
|
103
|
+
#
|
104
|
+
# If you want your own parser, you have to write a grammar file.
|
105
|
+
# A grammar file contains the name of your parser class, grammar for the parser,
|
106
|
+
# user code, and anything else.
|
107
|
+
# When writing a grammar file, yacc's knowledge is helpful.
|
108
|
+
# If you have not used yacc before, Racc is not too difficult.
|
109
|
+
#
|
110
|
+
# Here's an example Racc grammar file.
|
111
|
+
#
|
112
|
+
# class Calcparser
|
113
|
+
# rule
|
114
|
+
# target: exp { print val[0] }
|
115
|
+
#
|
116
|
+
# exp: exp '+' exp
|
117
|
+
# | exp '*' exp
|
118
|
+
# | '(' exp ')'
|
119
|
+
# | NUMBER
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# Racc grammar files resemble yacc files.
|
123
|
+
# But (of course), this is Ruby code.
|
124
|
+
# yacc's $$ is the 'result', $0, $1... is
|
125
|
+
# an array called 'val', and $-1, $-2... is an array called '_values'.
|
126
|
+
#
|
127
|
+
# See the {Grammar File Reference}[rdoc-ref:lib/racc/rdoc/grammar.en.rdoc] for
|
128
|
+
# more information on grammar files.
|
129
|
+
#
|
130
|
+
# == Parser
|
131
|
+
#
|
132
|
+
# Then you must prepare the parse entry method. There are two types of
|
133
|
+
# parse methods in Racc, Racc::Parser#do_parse and Racc::Parser#yyparse
|
134
|
+
#
|
135
|
+
# Racc::Parser#do_parse is simple.
|
136
|
+
#
|
137
|
+
# It's yyparse() of yacc, and Racc::Parser#next_token is yylex().
|
138
|
+
# This method must returns an array like [TOKENSYMBOL, ITS_VALUE].
|
139
|
+
# EOF is [false, false].
|
140
|
+
# (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default.
|
141
|
+
# If you want to change this, see the grammar reference.
|
142
|
+
#
|
143
|
+
# Racc::Parser#yyparse is little complicated, but useful.
|
144
|
+
# It does not use Racc::Parser#next_token, instead it gets tokens from any iterator.
|
145
|
+
#
|
146
|
+
# For example, <code>yyparse(obj, :scan)</code> causes
|
147
|
+
# calling +obj#scan+, and you can return tokens by yielding them from +obj#scan+.
|
148
|
+
#
|
149
|
+
# == Debugging
|
150
|
+
#
|
151
|
+
# When debugging, "-v" or/and the "-g" option is helpful.
|
152
|
+
#
|
153
|
+
# "-v" creates verbose log file (.output).
|
154
|
+
# "-g" creates a "Verbose Parser".
|
155
|
+
# Verbose Parser prints the internal status when parsing.
|
156
|
+
# But it's _not_ automatic.
|
157
|
+
# You must use -g option and set +@yydebug+ to +true+ in order to get output.
|
158
|
+
# -g option only creates the verbose parser.
|
159
|
+
#
|
160
|
+
# === Racc reported syntax error.
|
161
|
+
#
|
162
|
+
# Isn't there too many "end"?
|
163
|
+
# grammar of racc file is changed in v0.10.
|
164
|
+
#
|
165
|
+
# Racc does not use '%' mark, while yacc uses huge number of '%' marks..
|
166
|
+
#
|
167
|
+
# === Racc reported "XXXX conflicts".
|
168
|
+
#
|
169
|
+
# Try "racc -v xxxx.y".
|
170
|
+
# It causes producing racc's internal log file, xxxx.output.
|
171
|
+
#
|
172
|
+
# === Generated parsers does not work correctly
|
173
|
+
#
|
174
|
+
# Try "racc -g xxxx.y".
|
175
|
+
# This command let racc generate "debugging parser".
|
176
|
+
# Then set @yydebug=true in your parser.
|
177
|
+
# It produces a working log of your parser.
|
178
|
+
#
|
179
|
+
# == Re-distributing Racc runtime
|
180
|
+
#
|
181
|
+
# A parser, which is created by Racc, requires the Racc runtime module;
|
182
|
+
# racc/parser.rb.
|
183
|
+
#
|
184
|
+
# Ruby 1.8.x comes with Racc runtime module,
|
185
|
+
# you need NOT distribute Racc runtime files.
|
186
|
+
#
|
187
|
+
# If you want to include the Racc runtime module with your parser.
|
188
|
+
# This can be done by using '-E' option:
|
189
|
+
#
|
190
|
+
# $ racc -E -omyparser.rb myparser.y
|
191
|
+
#
|
192
|
+
# This command creates myparser.rb which `includes' Racc runtime.
|
193
|
+
# Only you must do is to distribute your parser file (myparser.rb).
|
194
|
+
#
|
195
|
+
# Note: parser.rb is ruby license, but your parser is not.
|
196
|
+
# Your own parser is completely yours.
|
197
|
+
module Racc
|
198
|
+
|
199
|
+
unless defined?(Racc_No_Extensions)
|
200
|
+
Racc_No_Extensions = false # :nodoc:
|
201
|
+
end
|
202
|
+
|
203
|
+
class Parser
|
204
|
+
|
205
|
+
Racc_Runtime_Version = ::Racc::VERSION
|
206
|
+
Racc_Runtime_Core_Version_R = ::Racc::VERSION
|
207
|
+
|
208
|
+
begin
|
209
|
+
if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
|
210
|
+
require 'jruby'
|
211
|
+
require 'racc/cparse-jruby.jar'
|
212
|
+
com.headius.racc.Cparse.new.load(JRuby.runtime, false)
|
213
|
+
else
|
214
|
+
require 'racc/cparse'
|
215
|
+
end
|
216
|
+
|
217
|
+
unless new.respond_to?(:_racc_do_parse_c, true)
|
218
|
+
raise LoadError, 'old cparse.so'
|
219
|
+
end
|
220
|
+
if Racc_No_Extensions
|
221
|
+
raise LoadError, 'selecting ruby version of racc runtime core'
|
222
|
+
end
|
223
|
+
|
224
|
+
Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc:
|
225
|
+
Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc:
|
226
|
+
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc:
|
227
|
+
Racc_Runtime_Type = 'c' # :nodoc:
|
228
|
+
rescue LoadError
|
229
|
+
Racc_Main_Parsing_Routine = :_racc_do_parse_rb
|
230
|
+
Racc_YY_Parse_Method = :_racc_yyparse_rb
|
231
|
+
Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R
|
232
|
+
Racc_Runtime_Type = 'ruby'
|
233
|
+
end
|
234
|
+
|
235
|
+
def Parser.racc_runtime_type # :nodoc:
|
236
|
+
Racc_Runtime_Type
|
237
|
+
end
|
238
|
+
|
239
|
+
def _racc_setup
|
240
|
+
@yydebug = false unless self.class::Racc_debug_parser
|
241
|
+
@yydebug = false unless defined?(@yydebug)
|
242
|
+
if @yydebug
|
243
|
+
@racc_debug_out = $stderr unless defined?(@racc_debug_out)
|
244
|
+
@racc_debug_out ||= $stderr
|
245
|
+
end
|
246
|
+
arg = self.class::Racc_arg
|
247
|
+
arg[13] = true if arg.size < 14
|
248
|
+
arg
|
249
|
+
end
|
250
|
+
|
251
|
+
def _racc_init_sysvars
|
252
|
+
@racc_state = [0]
|
253
|
+
@racc_tstack = []
|
254
|
+
@racc_vstack = []
|
255
|
+
|
256
|
+
@racc_t = nil
|
257
|
+
@racc_val = nil
|
258
|
+
|
259
|
+
@racc_read_next = true
|
260
|
+
|
261
|
+
@racc_user_yyerror = false
|
262
|
+
@racc_error_status = 0
|
263
|
+
end
|
264
|
+
|
265
|
+
# The entry point of the parser. This method is used with #next_token.
|
266
|
+
# If Racc wants to get token (and its value), calls next_token.
|
267
|
+
#
|
268
|
+
# Example:
|
269
|
+
# def parse
|
270
|
+
# @q = [[1,1],
|
271
|
+
# [2,2],
|
272
|
+
# [3,3],
|
273
|
+
# [false, '$']]
|
274
|
+
# do_parse
|
275
|
+
# end
|
276
|
+
#
|
277
|
+
# def next_token
|
278
|
+
# @q.shift
|
279
|
+
# end
|
280
|
+
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
281
|
+
def do_parse
|
282
|
+
#{Racc_Main_Parsing_Routine}(_racc_setup(), false)
|
283
|
+
end
|
284
|
+
RUBY
|
285
|
+
|
286
|
+
# The method to fetch next token.
|
287
|
+
# If you use #do_parse method, you must implement #next_token.
|
288
|
+
#
|
289
|
+
# The format of return value is [TOKEN_SYMBOL, VALUE].
|
290
|
+
# +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT
|
291
|
+
# for 'IDENT'. ";" (String) for ';'.
|
292
|
+
#
|
293
|
+
# The final symbol (End of file) must be false.
|
294
|
+
def next_token
|
295
|
+
raise NotImplementedError, "#{self.class}\#next_token is not defined"
|
296
|
+
end
|
297
|
+
|
298
|
+
def _racc_do_parse_rb(arg, in_debug)
|
299
|
+
action_table, action_check, action_default, action_pointer,
|
300
|
+
_, _, _, _,
|
301
|
+
_, _, token_table, * = arg
|
302
|
+
|
303
|
+
_racc_init_sysvars
|
304
|
+
tok = act = i = nil
|
305
|
+
|
306
|
+
catch(:racc_end_parse) {
|
307
|
+
while true
|
308
|
+
if i = action_pointer[@racc_state[-1]]
|
309
|
+
if @racc_read_next
|
310
|
+
if @racc_t != 0 # not EOF
|
311
|
+
tok, @racc_val = next_token()
|
312
|
+
unless tok # EOF
|
313
|
+
@racc_t = 0
|
314
|
+
else
|
315
|
+
@racc_t = (token_table[tok] or 1) # error token
|
316
|
+
end
|
317
|
+
racc_read_token(@racc_t, tok, @racc_val) if @yydebug
|
318
|
+
@racc_read_next = false
|
319
|
+
end
|
320
|
+
end
|
321
|
+
i += @racc_t
|
322
|
+
unless i >= 0 and
|
323
|
+
act = action_table[i] and
|
324
|
+
action_check[i] == @racc_state[-1]
|
325
|
+
act = action_default[@racc_state[-1]]
|
326
|
+
end
|
327
|
+
else
|
328
|
+
act = action_default[@racc_state[-1]]
|
329
|
+
end
|
330
|
+
while act = _racc_evalact(act, arg)
|
331
|
+
;
|
332
|
+
end
|
333
|
+
end
|
334
|
+
}
|
335
|
+
end
|
336
|
+
|
337
|
+
# Another entry point for the parser.
|
338
|
+
# If you use this method, you must implement RECEIVER#METHOD_ID method.
|
339
|
+
#
|
340
|
+
# RECEIVER#METHOD_ID is a method to get next token.
|
341
|
+
# It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
|
342
|
+
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
343
|
+
def yyparse(recv, mid)
|
344
|
+
#{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
|
345
|
+
end
|
346
|
+
RUBY
|
347
|
+
|
348
|
+
def _racc_yyparse_rb(recv, mid, arg, c_debug)
|
349
|
+
action_table, action_check, action_default, action_pointer,
|
350
|
+
_, _, _, _,
|
351
|
+
_, _, token_table, * = arg
|
352
|
+
|
353
|
+
_racc_init_sysvars
|
354
|
+
|
355
|
+
catch(:racc_end_parse) {
|
356
|
+
until i = action_pointer[@racc_state[-1]]
|
357
|
+
while act = _racc_evalact(action_default[@racc_state[-1]], arg)
|
358
|
+
;
|
359
|
+
end
|
360
|
+
end
|
361
|
+
recv.__send__(mid) do |tok, val|
|
362
|
+
unless tok
|
363
|
+
@racc_t = 0
|
364
|
+
else
|
365
|
+
@racc_t = (token_table[tok] or 1) # error token
|
366
|
+
end
|
367
|
+
@racc_val = val
|
368
|
+
@racc_read_next = false
|
369
|
+
|
370
|
+
i += @racc_t
|
371
|
+
unless i >= 0 and
|
372
|
+
act = action_table[i] and
|
373
|
+
action_check[i] == @racc_state[-1]
|
374
|
+
act = action_default[@racc_state[-1]]
|
375
|
+
end
|
376
|
+
while act = _racc_evalact(act, arg)
|
377
|
+
;
|
378
|
+
end
|
379
|
+
|
380
|
+
while !(i = action_pointer[@racc_state[-1]]) ||
|
381
|
+
! @racc_read_next ||
|
382
|
+
@racc_t == 0 # $
|
383
|
+
unless i and i += @racc_t and
|
384
|
+
i >= 0 and
|
385
|
+
act = action_table[i] and
|
386
|
+
action_check[i] == @racc_state[-1]
|
387
|
+
act = action_default[@racc_state[-1]]
|
388
|
+
end
|
389
|
+
while act = _racc_evalact(act, arg)
|
390
|
+
;
|
391
|
+
end
|
392
|
+
end
|
393
|
+
end
|
394
|
+
}
|
395
|
+
end
|
396
|
+
|
397
|
+
###
|
398
|
+
### common
|
399
|
+
###
|
400
|
+
|
401
|
+
def _racc_evalact(act, arg)
|
402
|
+
action_table, action_check, _, action_pointer,
|
403
|
+
_, _, _, _,
|
404
|
+
_, _, _, shift_n,
|
405
|
+
reduce_n, * = arg
|
406
|
+
nerr = 0 # tmp
|
407
|
+
|
408
|
+
if act > 0 and act < shift_n
|
409
|
+
#
|
410
|
+
# shift
|
411
|
+
#
|
412
|
+
if @racc_error_status > 0
|
413
|
+
@racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF
|
414
|
+
end
|
415
|
+
@racc_vstack.push @racc_val
|
416
|
+
@racc_state.push act
|
417
|
+
@racc_read_next = true
|
418
|
+
if @yydebug
|
419
|
+
@racc_tstack.push @racc_t
|
420
|
+
racc_shift @racc_t, @racc_tstack, @racc_vstack
|
421
|
+
end
|
422
|
+
|
423
|
+
elsif act < 0 and act > -reduce_n
|
424
|
+
#
|
425
|
+
# reduce
|
426
|
+
#
|
427
|
+
code = catch(:racc_jump) {
|
428
|
+
@racc_state.push _racc_do_reduce(arg, act)
|
429
|
+
false
|
430
|
+
}
|
431
|
+
if code
|
432
|
+
case code
|
433
|
+
when 1 # yyerror
|
434
|
+
@racc_user_yyerror = true # user_yyerror
|
435
|
+
return -reduce_n
|
436
|
+
when 2 # yyaccept
|
437
|
+
return shift_n
|
438
|
+
else
|
439
|
+
raise '[Racc Bug] unknown jump code'
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
elsif act == shift_n
|
444
|
+
#
|
445
|
+
# accept
|
446
|
+
#
|
447
|
+
racc_accept if @yydebug
|
448
|
+
throw :racc_end_parse, @racc_vstack[0]
|
449
|
+
|
450
|
+
elsif act == -reduce_n
|
451
|
+
#
|
452
|
+
# error
|
453
|
+
#
|
454
|
+
case @racc_error_status
|
455
|
+
when 0
|
456
|
+
unless arg[21] # user_yyerror
|
457
|
+
nerr += 1
|
458
|
+
on_error @racc_t, @racc_val, @racc_vstack
|
459
|
+
end
|
460
|
+
when 3
|
461
|
+
if @racc_t == 0 # is $
|
462
|
+
# We're at EOF, and another error occurred immediately after
|
463
|
+
# attempting auto-recovery
|
464
|
+
throw :racc_end_parse, nil
|
465
|
+
end
|
466
|
+
@racc_read_next = true
|
467
|
+
end
|
468
|
+
@racc_user_yyerror = false
|
469
|
+
@racc_error_status = 3
|
470
|
+
while true
|
471
|
+
if i = action_pointer[@racc_state[-1]]
|
472
|
+
i += 1 # error token
|
473
|
+
if i >= 0 and
|
474
|
+
(act = action_table[i]) and
|
475
|
+
action_check[i] == @racc_state[-1]
|
476
|
+
break
|
477
|
+
end
|
478
|
+
end
|
479
|
+
throw :racc_end_parse, nil if @racc_state.size <= 1
|
480
|
+
@racc_state.pop
|
481
|
+
@racc_vstack.pop
|
482
|
+
if @yydebug
|
483
|
+
@racc_tstack.pop
|
484
|
+
racc_e_pop @racc_state, @racc_tstack, @racc_vstack
|
485
|
+
end
|
486
|
+
end
|
487
|
+
return act
|
488
|
+
|
489
|
+
else
|
490
|
+
raise "[Racc Bug] unknown action #{act.inspect}"
|
491
|
+
end
|
492
|
+
|
493
|
+
racc_next_state(@racc_state[-1], @racc_state) if @yydebug
|
494
|
+
|
495
|
+
nil
|
496
|
+
end
|
497
|
+
|
498
|
+
def _racc_do_reduce(arg, act)
|
499
|
+
_, _, _, _,
|
500
|
+
goto_table, goto_check, goto_default, goto_pointer,
|
501
|
+
nt_base, reduce_table, _, _,
|
502
|
+
_, use_result, * = arg
|
503
|
+
|
504
|
+
state = @racc_state
|
505
|
+
vstack = @racc_vstack
|
506
|
+
tstack = @racc_tstack
|
507
|
+
|
508
|
+
i = act * -3
|
509
|
+
len = reduce_table[i]
|
510
|
+
reduce_to = reduce_table[i+1]
|
511
|
+
method_id = reduce_table[i+2]
|
512
|
+
void_array = []
|
513
|
+
|
514
|
+
tmp_t = tstack[-len, len] if @yydebug
|
515
|
+
tmp_v = vstack[-len, len]
|
516
|
+
tstack[-len, len] = void_array if @yydebug
|
517
|
+
vstack[-len, len] = void_array
|
518
|
+
state[-len, len] = void_array
|
519
|
+
|
520
|
+
# tstack must be updated AFTER method call
|
521
|
+
if use_result
|
522
|
+
vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
|
523
|
+
else
|
524
|
+
vstack.push __send__(method_id, tmp_v, vstack)
|
525
|
+
end
|
526
|
+
tstack.push reduce_to
|
527
|
+
|
528
|
+
racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug
|
529
|
+
|
530
|
+
k1 = reduce_to - nt_base
|
531
|
+
if i = goto_pointer[k1]
|
532
|
+
i += state[-1]
|
533
|
+
if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1
|
534
|
+
return curstate
|
535
|
+
end
|
536
|
+
end
|
537
|
+
goto_default[k1]
|
538
|
+
end
|
539
|
+
|
540
|
+
# This method is called when a parse error is found.
|
541
|
+
#
|
542
|
+
# ERROR_TOKEN_ID is an internal ID of token which caused error.
|
543
|
+
# You can get string representation of this ID by calling
|
544
|
+
# #token_to_str.
|
545
|
+
#
|
546
|
+
# ERROR_VALUE is a value of error token.
|
547
|
+
#
|
548
|
+
# value_stack is a stack of symbol values.
|
549
|
+
# DO NOT MODIFY this object.
|
550
|
+
#
|
551
|
+
# This method raises ParseError by default.
|
552
|
+
#
|
553
|
+
# If this method returns, parsers enter "error recovering mode".
|
554
|
+
def on_error(t, val, vstack)
|
555
|
+
raise ParseError, sprintf("parse error on value %s (%s)",
|
556
|
+
val.inspect, token_to_str(t) || '?')
|
557
|
+
end
|
558
|
+
|
559
|
+
# Enter error recovering mode.
|
560
|
+
# This method does not call #on_error.
|
561
|
+
def yyerror
|
562
|
+
throw :racc_jump, 1
|
563
|
+
end
|
564
|
+
|
565
|
+
# Exit parser.
|
566
|
+
# Return value is +Symbol_Value_Stack[0]+.
|
567
|
+
def yyaccept
|
568
|
+
throw :racc_jump, 2
|
569
|
+
end
|
570
|
+
|
571
|
+
# Leave error recovering mode.
|
572
|
+
def yyerrok
|
573
|
+
@racc_error_status = 0
|
574
|
+
end
|
575
|
+
|
576
|
+
# For debugging output
|
577
|
+
def racc_read_token(t, tok, val)
|
578
|
+
@racc_debug_out.print 'read '
|
579
|
+
@racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
|
580
|
+
@racc_debug_out.puts val.inspect
|
581
|
+
@racc_debug_out.puts
|
582
|
+
end
|
583
|
+
|
584
|
+
def racc_shift(tok, tstack, vstack)
|
585
|
+
@racc_debug_out.puts "shift #{racc_token2str tok}"
|
586
|
+
racc_print_stacks tstack, vstack
|
587
|
+
@racc_debug_out.puts
|
588
|
+
end
|
589
|
+
|
590
|
+
def racc_reduce(toks, sim, tstack, vstack)
|
591
|
+
out = @racc_debug_out
|
592
|
+
out.print 'reduce '
|
593
|
+
if toks.empty?
|
594
|
+
out.print ' <none>'
|
595
|
+
else
|
596
|
+
toks.each {|t| out.print ' ', racc_token2str(t) }
|
597
|
+
end
|
598
|
+
out.puts " --> #{racc_token2str(sim)}"
|
599
|
+
racc_print_stacks tstack, vstack
|
600
|
+
@racc_debug_out.puts
|
601
|
+
end
|
602
|
+
|
603
|
+
def racc_accept
|
604
|
+
@racc_debug_out.puts 'accept'
|
605
|
+
@racc_debug_out.puts
|
606
|
+
end
|
607
|
+
|
608
|
+
def racc_e_pop(state, tstack, vstack)
|
609
|
+
@racc_debug_out.puts 'error recovering mode: pop token'
|
610
|
+
racc_print_states state
|
611
|
+
racc_print_stacks tstack, vstack
|
612
|
+
@racc_debug_out.puts
|
613
|
+
end
|
614
|
+
|
615
|
+
def racc_next_state(curstate, state)
|
616
|
+
@racc_debug_out.puts "goto #{curstate}"
|
617
|
+
racc_print_states state
|
618
|
+
@racc_debug_out.puts
|
619
|
+
end
|
620
|
+
|
621
|
+
def racc_print_stacks(t, v)
|
622
|
+
out = @racc_debug_out
|
623
|
+
out.print ' ['
|
624
|
+
t.each_index do |i|
|
625
|
+
out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
|
626
|
+
end
|
627
|
+
out.puts ' ]'
|
628
|
+
end
|
629
|
+
|
630
|
+
def racc_print_states(s)
|
631
|
+
out = @racc_debug_out
|
632
|
+
out.print ' ['
|
633
|
+
s.each {|st| out.print ' ', st }
|
634
|
+
out.puts ' ]'
|
635
|
+
end
|
636
|
+
|
637
|
+
def racc_token2str(tok)
|
638
|
+
self.class::Racc_token_to_s_table[tok] or
|
639
|
+
raise "[Racc Bug] can't convert token #{tok} to string"
|
640
|
+
end
|
641
|
+
|
642
|
+
# Convert internal ID of token symbol to the string.
|
643
|
+
def token_to_str(t)
|
644
|
+
self.class::Racc_token_to_s_table[t]
|
645
|
+
end
|
646
|
+
|
647
|
+
end
|
648
|
+
|
649
|
+
end
|
650
|
+
|
651
|
+
end
|
652
|
+
###### racc/parser.rb end
|
8
653
|
|
9
654
|
class RDoc::RD
|
10
655
|
|
@@ -17,8 +662,6 @@ class BlockParser < Racc::Parser
|
|
17
662
|
|
18
663
|
# :stopdoc:
|
19
664
|
|
20
|
-
TMPFILE = ["rdtmp", $$, 0]
|
21
|
-
|
22
665
|
MARK_TO_LEVEL = {
|
23
666
|
'=' => 1,
|
24
667
|
'==' => 2,
|
@@ -128,15 +771,19 @@ def next_token # :nodoc:
|
|
128
771
|
# non-RD part begin
|
129
772
|
when /^=begin\s+(\w+)/
|
130
773
|
part = $1
|
774
|
+
=begin # not imported to RDoc
|
131
775
|
if @in_part # if in non-RD part
|
132
776
|
@part_content.push(line)
|
133
777
|
else
|
134
778
|
@in_part = part if @tree.filter[part] # if filter exists
|
135
779
|
# p "BEGIN_PART: #{@in_part}" # DEBUG
|
136
780
|
end
|
781
|
+
=end
|
782
|
+
@in_part = part
|
137
783
|
# non-RD part end
|
138
|
-
when /^=end/
|
784
|
+
when /^=end(?:$|[\s\0\C-d\C-z])/
|
139
785
|
if @in_part # if in non-RD part
|
786
|
+
=begin # not imported to RDoc
|
140
787
|
# p "END_PART: #{@in_part}" # DEBUG
|
141
788
|
# make Part-in object
|
142
789
|
part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
|
@@ -147,20 +794,22 @@ def next_token # :nodoc:
|
|
147
794
|
if @tree.filter[@in_part].mode == :rd # if output is RD formatted
|
148
795
|
subtree = parse_subtree(part_out.to_a)
|
149
796
|
else # if output is target formatted
|
150
|
-
basename =
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
tmpfile.close
|
797
|
+
basename = Tempfile.create(["rdtmp", ".#{@in_part}"], @tree.tmp_dir) do |tmpfile|
|
798
|
+
tmpfile.print(part_out)
|
799
|
+
File.basename(tmpfile.path)
|
800
|
+
end
|
155
801
|
subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"])
|
156
802
|
end
|
157
803
|
@in_part = nil
|
158
804
|
return [:SUBTREE, subtree]
|
805
|
+
=end
|
159
806
|
end
|
160
807
|
else
|
808
|
+
=begin # not imported to RDoc
|
161
809
|
if @in_part # if in non-RD part
|
162
810
|
@part_content.push(line)
|
163
811
|
end
|
812
|
+
=end
|
164
813
|
end
|
165
814
|
end
|
166
815
|
|
@@ -207,7 +856,7 @@ def next_token # :nodoc:
|
|
207
856
|
if @in_verbatim
|
208
857
|
[:STRINGLINE, line]
|
209
858
|
else
|
210
|
-
@indent_stack.push("\s"
|
859
|
+
@indent_stack.push("\s" + newIndent)
|
211
860
|
[:ITEMLISTLINE, rest]
|
212
861
|
end
|
213
862
|
end
|
@@ -219,7 +868,7 @@ def next_token # :nodoc:
|
|
219
868
|
if @in_verbatim
|
220
869
|
[:STRINGLINE, line]
|
221
870
|
else
|
222
|
-
@indent_stack.push("\s" * mark.size
|
871
|
+
@indent_stack.push("\s" * mark.size + newIndent)
|
223
872
|
[:ENUMLISTLINE, rest]
|
224
873
|
end
|
225
874
|
end
|
@@ -355,7 +1004,7 @@ def get_included(file)
|
|
355
1004
|
file_name = File.join dir, file
|
356
1005
|
|
357
1006
|
if File.exist? file_name then
|
358
|
-
included =
|
1007
|
+
included = File.readlines file_name
|
359
1008
|
break
|
360
1009
|
end
|
361
1010
|
end
|
@@ -419,52 +1068,52 @@ end
|
|
419
1068
|
|
420
1069
|
racc_action_table = [
|
421
1070
|
34, 35, 30, 33, 40, 34, 35, 30, 33, 40,
|
422
|
-
65, 34, 35, 30, 33, 14, 73,
|
423
|
-
15, 88, 34, 35, 30, 33, 14,
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
1071
|
+
65, 34, 35, 30, 33, 14, 73, 36, 38, 34,
|
1072
|
+
15, 88, 34, 35, 30, 33, 14, 9, 10, 11,
|
1073
|
+
12, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
1074
|
+
12, 15, 34, 35, 30, 33, 35, 47, 30, 54,
|
1075
|
+
33, 15, 34, 35, 30, 33, 54, 47, 14, 14,
|
1076
|
+
59, 15, 34, 35, 30, 33, 14, 73, 67, 76,
|
1077
|
+
77, 15, 34, 35, 30, 33, 14, 73, 54, 81,
|
1078
|
+
38, 15, 34, 35, 30, 33, 14, 73, 38, 40,
|
1079
|
+
83, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
1080
|
+
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
430
1081
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
431
|
-
nil, 15, 34, 35, 30, 33, nil, 47, nil, nil,
|
432
1082
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
433
1083
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
434
|
-
nil, 15, 34, 35, 30, 33, 14,
|
435
|
-
12, 15, 34, 35, 30, 33, 14, 73, 61, 63,
|
1084
|
+
nil, 15, 34, 35, 30, 33, 14, 73, 61, 63,
|
436
1085
|
nil, 15, 14, 62, 60, 61, 63, 79, 61, 63,
|
437
1086
|
62, 87, nil, 62, 34, 35, 30, 33 ]
|
438
1087
|
|
439
1088
|
racc_action_check = [
|
440
1089
|
41, 41, 41, 41, 41, 15, 15, 15, 15, 15,
|
441
|
-
41, 86, 86, 86, 86, 86, 86,
|
442
|
-
86, 86,
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
nil,
|
451
|
-
nil,
|
452
|
-
nil,
|
453
|
-
nil,
|
454
|
-
|
455
|
-
nil,
|
1090
|
+
41, 86, 86, 86, 86, 86, 86, 1, 13, 22,
|
1091
|
+
86, 86, 0, 0, 0, 0, 0, 0, 0, 0,
|
1092
|
+
0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
|
1093
|
+
2, 2, 24, 24, 24, 24, 25, 24, 28, 30,
|
1094
|
+
31, 24, 27, 27, 27, 27, 33, 27, 34, 35,
|
1095
|
+
36, 27, 45, 45, 45, 45, 45, 45, 44, 49,
|
1096
|
+
51, 45, 46, 46, 46, 46, 46, 46, 54, 56,
|
1097
|
+
57, 46, 47, 47, 47, 47, 47, 47, 58, 62,
|
1098
|
+
66, 47, 68, 68, 68, 68, 68, 68, nil, nil,
|
1099
|
+
nil, 68, 74, 74, 74, 74, 74, 74, nil, nil,
|
1100
|
+
nil, 74, 75, 75, 75, 75, 75, 75, nil, nil,
|
1101
|
+
nil, 75, 78, 78, 78, 78, 78, 78, nil, nil,
|
1102
|
+
nil, 78, 79, 79, 79, 79, 79, 79, nil, nil,
|
1103
|
+
nil, 79, 85, 85, 85, 85, 85, 85, 39, 39,
|
1104
|
+
nil, 85, 52, 39, 39, 82, 82, 52, 64, 64,
|
456
1105
|
82, 82, nil, 64, 20, 20, 20, 20 ]
|
457
1106
|
|
458
1107
|
racc_action_pointer = [
|
459
|
-
|
460
|
-
nil, nil, nil,
|
461
|
-
161, nil,
|
462
|
-
|
463
|
-
nil, -3, nil, nil,
|
464
|
-
nil,
|
465
|
-
nil, nil,
|
466
|
-
nil, nil, nil, nil, 109,
|
467
|
-
nil, nil, 148, nil, nil,
|
1108
|
+
19, 17, 29, nil, nil, nil, nil, nil, nil, nil,
|
1109
|
+
nil, nil, nil, 11, nil, 2, nil, nil, nil, nil,
|
1110
|
+
161, nil, 16, nil, 39, 42, nil, 49, 43, nil,
|
1111
|
+
41, 44, nil, 48, 51, 52, 60, nil, nil, 141,
|
1112
|
+
nil, -3, nil, nil, 55, 59, 69, 79, nil, 56,
|
1113
|
+
nil, 57, 145, nil, 70, nil, 66, 73, 81, nil,
|
1114
|
+
nil, nil, 82, nil, 151, nil, 77, nil, 89, nil,
|
1115
|
+
nil, nil, nil, nil, 99, 109, nil, nil, 119, 129,
|
1116
|
+
nil, nil, 148, nil, nil, 139, 8, nil, nil ]
|
468
1117
|
|
469
1118
|
racc_action_default = [
|
470
1119
|
-2, -73, -1, -4, -5, -6, -7, -8, -9, -10,
|
@@ -478,26 +1127,26 @@ racc_action_default = [
|
|
478
1127
|
-60, -47, -73, -29, -52, -48, -73, -20, -50 ]
|
479
1128
|
|
480
1129
|
racc_goto_table = [
|
481
|
-
4, 39, 4, 68, 74, 75, 6, 5, 6,
|
482
|
-
44, 42, 51, 49, 3, 56, 37, 57, 58,
|
1130
|
+
4, 39, 4, 68, 74, 75, 5, 6, 5, 6,
|
1131
|
+
44, 42, 51, 49, 3, 56, 37, 57, 58, 1,
|
483
1132
|
2, 66, 84, 41, 43, 48, 50, 64, 84, 84,
|
484
|
-
|
1133
|
+
45, 46, 42, 45, 46, 55, 85, 86, 80, 84,
|
485
1134
|
84, nil, nil, nil, nil, nil, nil, nil, 82, nil,
|
486
1135
|
nil, nil, 78 ]
|
487
1136
|
|
488
1137
|
racc_goto_check = [
|
489
|
-
4, 10, 4, 31, 31, 31, 6, 5, 6,
|
490
|
-
21, 12, 27, 21, 3, 27, 3, 9, 9,
|
1138
|
+
4, 10, 4, 31, 31, 31, 5, 6, 5, 6,
|
1139
|
+
21, 12, 27, 21, 3, 27, 3, 9, 9, 1,
|
491
1140
|
2, 11, 32, 17, 19, 23, 26, 10, 32, 32,
|
492
|
-
|
1141
|
+
5, 6, 12, 5, 6, 29, 31, 31, 33, 32,
|
493
1142
|
32, nil, nil, nil, nil, nil, nil, nil, 10, nil,
|
494
1143
|
nil, nil, 4 ]
|
495
1144
|
|
496
1145
|
racc_goto_pointer = [
|
497
|
-
nil,
|
1146
|
+
nil, 19, 20, 14, 0, 6, 7, nil, nil, -17,
|
498
1147
|
-14, -20, -9, nil, nil, nil, nil, 8, nil, 2,
|
499
1148
|
nil, -14, nil, 0, nil, nil, -2, -18, nil, 4,
|
500
|
-
nil, -42, -46, -
|
1149
|
+
nil, -42, -46, -16 ]
|
501
1150
|
|
502
1151
|
racc_goto_default = [
|
503
1152
|
nil, nil, nil, nil, 70, 71, 72, 7, 8, 13,
|
@@ -619,6 +1268,7 @@ Racc_arg = [
|
|
619
1268
|
racc_shift_n,
|
620
1269
|
racc_reduce_n,
|
621
1270
|
racc_use_result_var ]
|
1271
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
622
1272
|
|
623
1273
|
Racc_token_to_s_table = [
|
624
1274
|
"$end",
|
@@ -669,6 +1319,7 @@ Racc_token_to_s_table = [
|
|
669
1319
|
"blocks_in_list",
|
670
1320
|
"block_in_list",
|
671
1321
|
"whitelines2" ]
|
1322
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
672
1323
|
|
673
1324
|
Racc_debug_parser = false
|
674
1325
|
|