super-quick-rb 0.0.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 +7 -0
- data/rdoc-8.0.0/CONTRIBUTING.md +195 -0
- data/rdoc-8.0.0/CVE-2013-0256.rdoc +49 -0
- data/rdoc-8.0.0/History.rdoc +1668 -0
- data/rdoc-8.0.0/LEGAL.rdoc +56 -0
- data/rdoc-8.0.0/LICENSE.rdoc +63 -0
- data/rdoc-8.0.0/README.md +236 -0
- data/rdoc-8.0.0/RI.md +842 -0
- data/rdoc-8.0.0/TODO.rdoc +60 -0
- data/rdoc-8.0.0/doc/markup_reference/markdown.md +659 -0
- data/rdoc-8.0.0/doc/markup_reference/rdoc.rdoc +1169 -0
- data/rdoc-8.0.0/exe/rdoc +43 -0
- data/rdoc-8.0.0/exe/ri +12 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/alias.rb +98 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/any_method.rb +387 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/attr.rb +178 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/class_module.rb +969 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/constant.rb +221 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context/section.rb +182 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context.rb +1238 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/extend.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/include.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/method_attr.rb +417 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/mixin.rb +123 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_class.rb +92 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_module.rb +73 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/require.rb +51 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/single_class.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/top_level.rb +286 -0
- data/rdoc-8.0.0/lib/rdoc/code_object.rb +393 -0
- data/rdoc-8.0.0/lib/rdoc/code_objects.rb +5 -0
- data/rdoc-8.0.0/lib/rdoc/comment.rb +353 -0
- data/rdoc-8.0.0/lib/rdoc/cross_reference.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/encoding.rb +120 -0
- data/rdoc-8.0.0/lib/rdoc/erb_partial.rb +18 -0
- data/rdoc-8.0.0/lib/rdoc/erbio.rb +37 -0
- data/rdoc-8.0.0/lib/rdoc/generator/aliki.rb +200 -0
- data/rdoc-8.0.0/lib/rdoc/generator/darkfish.rb +824 -0
- data/rdoc-8.0.0/lib/rdoc/generator/json_index.rb +284 -0
- data/rdoc-8.0.0/lib/rdoc/generator/markup.rb +196 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/message_extractor.rb +68 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po_entry.rb +141 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot.rb +94 -0
- data/rdoc-8.0.0/lib/rdoc/generator/ri.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/DESIGN.md +536 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_head.rhtml +163 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_icons.rhtml +208 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +41 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +67 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/class.rhtml +230 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/css/rdoc.css +2181 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/index.rhtml +22 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/aliki.js +513 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_controller.js +129 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/page.rhtml +18 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_head.rhtml +43 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/class.rhtml +220 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/rdoc.css +701 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/index.rhtml +24 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/darkfish.js +140 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/search.js +120 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/page.rhtml +19 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +72 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/searcher.js +271 -0
- data/rdoc-8.0.0/lib/rdoc/generator.rb +52 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/locale.rb +102 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/text.rb +126 -0
- data/rdoc-8.0.0/lib/rdoc/i18n.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc/known_classes.rb +74 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/entities.rb +2131 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.kpeg +21 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.rb +454 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.kpeg +1315 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.rb +16865 -0
- data/rdoc-8.0.0/lib/rdoc/markup/blank_line.rb +29 -0
- data/rdoc-8.0.0/lib/rdoc/markup/block_quote.rb +14 -0
- data/rdoc-8.0.0/lib/rdoc/markup/document.rb +164 -0
- data/rdoc-8.0.0/lib/rdoc/markup/element.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/markup/formatter.rb +285 -0
- data/rdoc-8.0.0/lib/rdoc/markup/hard_break.rb +34 -0
- data/rdoc-8.0.0/lib/rdoc/markup/heading.rb +170 -0
- data/rdoc-8.0.0/lib/rdoc/markup/include.rb +42 -0
- data/rdoc-8.0.0/lib/rdoc/markup/indented_paragraph.rb +47 -0
- data/rdoc-8.0.0/lib/rdoc/markup/inline_parser.rb +312 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list.rb +101 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list_item.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/markup/paragraph.rb +28 -0
- data/rdoc-8.0.0/lib/rdoc/markup/parser.rb +585 -0
- data/rdoc-8.0.0/lib/rdoc/markup/pre_process.rb +317 -0
- data/rdoc-8.0.0/lib/rdoc/markup/raw.rb +66 -0
- data/rdoc-8.0.0/lib/rdoc/markup/rule.rb +20 -0
- data/rdoc-8.0.0/lib/rdoc/markup/table.rb +64 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_ansi.rb +144 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_bs.rb +86 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html.rb +682 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_crossref.rb +261 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_snippet.rb +287 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_joined_paragraph.rb +41 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_label.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_markdown.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_rdoc.rb +421 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_table_of_contents.rb +88 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_test.rb +77 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_tt_only.rb +107 -0
- data/rdoc-8.0.0/lib/rdoc/markup/verbatim.rb +83 -0
- data/rdoc-8.0.0/lib/rdoc/markup.rb +219 -0
- data/rdoc-8.0.0/lib/rdoc/options.rb +1412 -0
- data/rdoc-8.0.0/lib/rdoc/parser/c.rb +1227 -0
- data/rdoc-8.0.0/lib/rdoc/parser/changelog.rb +379 -0
- data/rdoc-8.0.0/lib/rdoc/parser/markdown.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rbs.rb +275 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rd.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby.rb +1266 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby_colorizer.rb +253 -0
- data/rdoc-8.0.0/lib/rdoc/parser/simple.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/parser/text.rb +11 -0
- data/rdoc-8.0.0/lib/rdoc/parser.rb +298 -0
- data/rdoc-8.0.0/lib/rdoc/rbs_helper.rb +186 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.rb +1706 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.ry +643 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.rb +1854 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.ry +593 -0
- data/rdoc-8.0.0/lib/rdoc/rd.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/rdoc.rb +724 -0
- data/rdoc-8.0.0/lib/rdoc/ri/driver.rb +1572 -0
- data/rdoc-8.0.0/lib/rdoc/ri/formatter.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/paths.rb +171 -0
- data/rdoc-8.0.0/lib/rdoc/ri/servlet.rb +452 -0
- data/rdoc-8.0.0/lib/rdoc/ri/store.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/task.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/ri.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/rubygems_hook.rb +327 -0
- data/rdoc-8.0.0/lib/rdoc/server.rb +460 -0
- data/rdoc-8.0.0/lib/rdoc/stats/normal.rb +58 -0
- data/rdoc-8.0.0/lib/rdoc/stats/quiet.rb +59 -0
- data/rdoc-8.0.0/lib/rdoc/stats/verbose.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/stats.rb +484 -0
- data/rdoc-8.0.0/lib/rdoc/store.rb +1205 -0
- data/rdoc-8.0.0/lib/rdoc/task.rb +355 -0
- data/rdoc-8.0.0/lib/rdoc/text.rb +244 -0
- data/rdoc-8.0.0/lib/rdoc/token_stream.rb +104 -0
- data/rdoc-8.0.0/lib/rdoc/tom_doc.rb +257 -0
- data/rdoc-8.0.0/lib/rdoc/version.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc.rb +239 -0
- data/rdoc-8.0.0/lib/rubygems_plugin.rb +14 -0
- data/rdoc-8.0.0/man/ri.1 +249 -0
- data/rdoc-8.0.0/rdoc-logo.svg +43 -0
- data/rdoc-8.0.0/rdoc.gemspec +74 -0
- data/super-quick-rb.gemspec +12 -0
- metadata +257 -0
|
@@ -0,0 +1,1854 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# DO NOT MODIFY!!!!
|
|
4
|
+
# This file is automatically generated by Racc 1.8.1
|
|
5
|
+
# from Racc grammar file "inline_parser.ry".
|
|
6
|
+
#
|
|
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
|
|
653
|
+
|
|
654
|
+
require 'strscan'
|
|
655
|
+
|
|
656
|
+
class RDoc::RD
|
|
657
|
+
|
|
658
|
+
##
|
|
659
|
+
# RD format parser for inline markup such as emphasis, links, footnotes, etc.
|
|
660
|
+
|
|
661
|
+
class InlineParser < Racc::Parser
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
# :stopdoc:
|
|
665
|
+
|
|
666
|
+
EM_OPEN = '((*'
|
|
667
|
+
EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/
|
|
668
|
+
EM_CLOSE = '*))'
|
|
669
|
+
EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/
|
|
670
|
+
CODE_OPEN = '(({'
|
|
671
|
+
CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/
|
|
672
|
+
CODE_CLOSE = '}))'
|
|
673
|
+
CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/
|
|
674
|
+
VAR_OPEN = '((|'
|
|
675
|
+
VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/
|
|
676
|
+
VAR_CLOSE = '|))'
|
|
677
|
+
VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/
|
|
678
|
+
KBD_OPEN = '((%'
|
|
679
|
+
KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/
|
|
680
|
+
KBD_CLOSE = '%))'
|
|
681
|
+
KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/
|
|
682
|
+
INDEX_OPEN = '((:'
|
|
683
|
+
INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/
|
|
684
|
+
INDEX_CLOSE = ':))'
|
|
685
|
+
INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/
|
|
686
|
+
REF_OPEN = '((<'
|
|
687
|
+
REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/
|
|
688
|
+
REF_CLOSE = '>))'
|
|
689
|
+
REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/
|
|
690
|
+
FOOTNOTE_OPEN = '((-'
|
|
691
|
+
FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/
|
|
692
|
+
FOOTNOTE_CLOSE = '-))'
|
|
693
|
+
FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/
|
|
694
|
+
VERB_OPEN = "(('"
|
|
695
|
+
VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/
|
|
696
|
+
VERB_CLOSE = "'))"
|
|
697
|
+
VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/
|
|
698
|
+
|
|
699
|
+
BAR = "|"
|
|
700
|
+
BAR_RE = /\A#{Regexp.quote(BAR)}/
|
|
701
|
+
QUOTE = '"'
|
|
702
|
+
QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/
|
|
703
|
+
SLASH = "/"
|
|
704
|
+
SLASH_RE = /\A#{Regexp.quote(SLASH)}/
|
|
705
|
+
BACK_SLASH = "\\"
|
|
706
|
+
BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/
|
|
707
|
+
URL = "URL:"
|
|
708
|
+
URL_RE = /\A#{Regexp.quote(URL)}/
|
|
709
|
+
|
|
710
|
+
other_re_mode = Regexp::EXTENDED
|
|
711
|
+
other_re_mode |= Regexp::MULTILINE
|
|
712
|
+
|
|
713
|
+
OTHER_RE = Regexp.new(
|
|
714
|
+
"\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}|
|
|
715
|
+
#{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}|
|
|
716
|
+
#{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}|
|
|
717
|
+
#{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}|
|
|
718
|
+
#{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}|
|
|
719
|
+
#{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}|
|
|
720
|
+
#{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}|
|
|
721
|
+
#{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}|
|
|
722
|
+
#{Regexp.quote(BAR)}|
|
|
723
|
+
#{Regexp.quote(QUOTE)}|
|
|
724
|
+
#{Regexp.quote(SLASH)}|
|
|
725
|
+
#{Regexp.quote(BACK_SLASH)}|
|
|
726
|
+
#{Regexp.quote(URL)})", other_re_mode)
|
|
727
|
+
|
|
728
|
+
# :startdoc:
|
|
729
|
+
|
|
730
|
+
##
|
|
731
|
+
# Creates a new parser for inline markup in the rd format. The +block_parser+
|
|
732
|
+
# is used to for footnotes and labels in the inline text.
|
|
733
|
+
|
|
734
|
+
def initialize block_parser
|
|
735
|
+
@block_parser = block_parser
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
##
|
|
739
|
+
# Parses the +inline+ text from RD format into RDoc format.
|
|
740
|
+
|
|
741
|
+
def parse inline
|
|
742
|
+
@inline = inline
|
|
743
|
+
@src = StringScanner.new inline
|
|
744
|
+
@pre = "".dup
|
|
745
|
+
@yydebug = true
|
|
746
|
+
do_parse.to_s
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
##
|
|
750
|
+
# Returns the next token from the inline text
|
|
751
|
+
|
|
752
|
+
def next_token
|
|
753
|
+
return [false, false] if @src.eos?
|
|
754
|
+
# p @src.rest if @yydebug
|
|
755
|
+
if ret = @src.scan(EM_OPEN_RE)
|
|
756
|
+
@pre << ret
|
|
757
|
+
[:EM_OPEN, ret]
|
|
758
|
+
elsif ret = @src.scan(EM_CLOSE_RE)
|
|
759
|
+
@pre << ret
|
|
760
|
+
[:EM_CLOSE, ret]
|
|
761
|
+
elsif ret = @src.scan(CODE_OPEN_RE)
|
|
762
|
+
@pre << ret
|
|
763
|
+
[:CODE_OPEN, ret]
|
|
764
|
+
elsif ret = @src.scan(CODE_CLOSE_RE)
|
|
765
|
+
@pre << ret
|
|
766
|
+
[:CODE_CLOSE, ret]
|
|
767
|
+
elsif ret = @src.scan(VAR_OPEN_RE)
|
|
768
|
+
@pre << ret
|
|
769
|
+
[:VAR_OPEN, ret]
|
|
770
|
+
elsif ret = @src.scan(VAR_CLOSE_RE)
|
|
771
|
+
@pre << ret
|
|
772
|
+
[:VAR_CLOSE, ret]
|
|
773
|
+
elsif ret = @src.scan(KBD_OPEN_RE)
|
|
774
|
+
@pre << ret
|
|
775
|
+
[:KBD_OPEN, ret]
|
|
776
|
+
elsif ret = @src.scan(KBD_CLOSE_RE)
|
|
777
|
+
@pre << ret
|
|
778
|
+
[:KBD_CLOSE, ret]
|
|
779
|
+
elsif ret = @src.scan(INDEX_OPEN_RE)
|
|
780
|
+
@pre << ret
|
|
781
|
+
[:INDEX_OPEN, ret]
|
|
782
|
+
elsif ret = @src.scan(INDEX_CLOSE_RE)
|
|
783
|
+
@pre << ret
|
|
784
|
+
[:INDEX_CLOSE, ret]
|
|
785
|
+
elsif ret = @src.scan(REF_OPEN_RE)
|
|
786
|
+
@pre << ret
|
|
787
|
+
[:REF_OPEN, ret]
|
|
788
|
+
elsif ret = @src.scan(REF_CLOSE_RE)
|
|
789
|
+
@pre << ret
|
|
790
|
+
[:REF_CLOSE, ret]
|
|
791
|
+
elsif ret = @src.scan(FOOTNOTE_OPEN_RE)
|
|
792
|
+
@pre << ret
|
|
793
|
+
[:FOOTNOTE_OPEN, ret]
|
|
794
|
+
elsif ret = @src.scan(FOOTNOTE_CLOSE_RE)
|
|
795
|
+
@pre << ret
|
|
796
|
+
[:FOOTNOTE_CLOSE, ret]
|
|
797
|
+
elsif ret = @src.scan(VERB_OPEN_RE)
|
|
798
|
+
@pre << ret
|
|
799
|
+
[:VERB_OPEN, ret]
|
|
800
|
+
elsif ret = @src.scan(VERB_CLOSE_RE)
|
|
801
|
+
@pre << ret
|
|
802
|
+
[:VERB_CLOSE, ret]
|
|
803
|
+
elsif ret = @src.scan(BAR_RE)
|
|
804
|
+
@pre << ret
|
|
805
|
+
[:BAR, ret]
|
|
806
|
+
elsif ret = @src.scan(QUOTE_RE)
|
|
807
|
+
@pre << ret
|
|
808
|
+
[:QUOTE, ret]
|
|
809
|
+
elsif ret = @src.scan(SLASH_RE)
|
|
810
|
+
@pre << ret
|
|
811
|
+
[:SLASH, ret]
|
|
812
|
+
elsif ret = @src.scan(BACK_SLASH_RE)
|
|
813
|
+
@pre << ret
|
|
814
|
+
[:BACK_SLASH, ret]
|
|
815
|
+
elsif ret = @src.scan(URL_RE)
|
|
816
|
+
@pre << ret
|
|
817
|
+
[:URL, ret]
|
|
818
|
+
elsif ret = @src.scan(OTHER_RE)
|
|
819
|
+
@pre << ret
|
|
820
|
+
[:OTHER, ret]
|
|
821
|
+
else
|
|
822
|
+
ret = @src.rest
|
|
823
|
+
@pre << ret
|
|
824
|
+
@src.terminate
|
|
825
|
+
[:OTHER, ret]
|
|
826
|
+
end
|
|
827
|
+
end
|
|
828
|
+
|
|
829
|
+
##
|
|
830
|
+
# Raises a ParseError when invalid formatting is found
|
|
831
|
+
|
|
832
|
+
def on_error(et, ev, values)
|
|
833
|
+
lines_of_rest = @src.rest.lines.to_a.length
|
|
834
|
+
prev_words = prev_words_on_error(ev)
|
|
835
|
+
at = 4 + prev_words.length
|
|
836
|
+
|
|
837
|
+
message = <<-MSG
|
|
838
|
+
RD syntax error: line #{@block_parser.line_index - lines_of_rest}:
|
|
839
|
+
...#{prev_words} #{(ev||'')} #{next_words_on_error()} ...
|
|
840
|
+
MSG
|
|
841
|
+
|
|
842
|
+
message << " " * at + "^" * (ev ? ev.length : 0) + "\n"
|
|
843
|
+
raise ParseError, message
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
##
|
|
847
|
+
# Returns words before the error
|
|
848
|
+
|
|
849
|
+
def prev_words_on_error(ev)
|
|
850
|
+
pre = @pre
|
|
851
|
+
if ev and /#{Regexp.quote(ev)}$/ =~ pre
|
|
852
|
+
pre = $`
|
|
853
|
+
end
|
|
854
|
+
last_line(pre)
|
|
855
|
+
end
|
|
856
|
+
|
|
857
|
+
##
|
|
858
|
+
# Returns the last line of +src+
|
|
859
|
+
|
|
860
|
+
def last_line(src)
|
|
861
|
+
if n = src.rindex("\n")
|
|
862
|
+
src[(n+1) .. -1]
|
|
863
|
+
else
|
|
864
|
+
src
|
|
865
|
+
end
|
|
866
|
+
end
|
|
867
|
+
private :last_line
|
|
868
|
+
|
|
869
|
+
##
|
|
870
|
+
# Returns words following an error
|
|
871
|
+
|
|
872
|
+
def next_words_on_error
|
|
873
|
+
if n = @src.rest.index("\n")
|
|
874
|
+
@src.rest[0 .. (n-1)]
|
|
875
|
+
else
|
|
876
|
+
@src.rest
|
|
877
|
+
end
|
|
878
|
+
end
|
|
879
|
+
|
|
880
|
+
##
|
|
881
|
+
# Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+
|
|
882
|
+
|
|
883
|
+
def inline rdoc, reference = rdoc
|
|
884
|
+
RDoc::RD::Inline.new rdoc, reference
|
|
885
|
+
end
|
|
886
|
+
|
|
887
|
+
# :stopdoc:
|
|
888
|
+
##### State transition tables begin ###
|
|
889
|
+
|
|
890
|
+
racc_action_table = [
|
|
891
|
+
104, 103, 102, 100, 101, 99, 115, 116, 117, 29,
|
|
892
|
+
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
|
|
893
|
+
84, 118, 119, 63, 64, 65, 61, 81, 62, 76,
|
|
894
|
+
78, 79, 85, 66, 67, 68, 69, 70, 71, 72,
|
|
895
|
+
73, 74, 75, 77, 80, 149, 63, 64, 65, 153,
|
|
896
|
+
81, 62, 76, 78, 79, 86, 66, 67, 68, 69,
|
|
897
|
+
70, 71, 72, 73, 74, 75, 77, 80, 152, 104,
|
|
898
|
+
103, 102, 100, 101, 99, 115, 116, 117, 87, 105,
|
|
899
|
+
106, 107, 108, 109, 110, 111, 112, 113, 114, 88,
|
|
900
|
+
118, 119, 104, 103, 102, 100, 101, 99, 115, 116,
|
|
901
|
+
117, 89, 105, 106, 107, 108, 109, 110, 111, 112,
|
|
902
|
+
113, 114, 96, 118, 119, 104, 103, 102, 100, 101,
|
|
903
|
+
99, 115, 116, 117, 124, 105, 106, 107, 108, 109,
|
|
904
|
+
110, 111, 112, 113, 114, 137, 118, 119, 22, 23,
|
|
905
|
+
24, 25, 26, 21, 18, 19, 176, 177, 13, 148,
|
|
906
|
+
14, 154, 15, 137, 16, 161, 17, 164, 173, 20,
|
|
907
|
+
22, 23, 24, 25, 26, 21, 18, 19, 175, 177,
|
|
908
|
+
13, nil, 14, nil, 15, nil, 16, nil, 17, nil,
|
|
909
|
+
nil, 20, 22, 23, 24, 25, 26, 21, 18, 19,
|
|
910
|
+
nil, nil, 13, nil, 14, nil, 15, nil, 16, nil,
|
|
911
|
+
17, nil, nil, 20, 22, 23, 24, 25, 26, 21,
|
|
912
|
+
18, 19, nil, nil, 13, nil, 14, nil, 15, nil,
|
|
913
|
+
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
|
|
914
|
+
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
|
|
915
|
+
15, nil, 16, nil, 17, nil, nil, 20, 22, 23,
|
|
916
|
+
24, 25, 26, 21, 18, 19, nil, nil, 13, nil,
|
|
917
|
+
14, nil, 15, nil, 16, nil, 17, nil, nil, 20,
|
|
918
|
+
22, 23, 24, 25, 26, 21, 18, 19, nil, nil,
|
|
919
|
+
13, nil, 14, nil, 15, nil, 16, nil, 17, 42,
|
|
920
|
+
nil, 20, 54, 38, 53, 55, 56, 57, nil, 13,
|
|
921
|
+
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
|
|
922
|
+
20, 22, 23, 24, 25, 26, 21, 18, 19, nil,
|
|
923
|
+
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
|
|
924
|
+
nil, nil, 20, 63, 64, 65, 61, 81, 62, 76,
|
|
925
|
+
78, 79, nil, 66, 67, 68, 69, 70, 71, 72,
|
|
926
|
+
73, 74, 75, 77, 80, 122, nil, nil, 54, nil,
|
|
927
|
+
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
|
|
928
|
+
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
|
|
929
|
+
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
|
930
|
+
16, nil, 17, 145, nil, 20, 54, 133, 53, 55,
|
|
931
|
+
56, 57, nil, 13, nil, 14, nil, 15, nil, 16,
|
|
932
|
+
nil, 17, 145, nil, 20, 54, 133, 53, 55, 56,
|
|
933
|
+
57, nil, 13, nil, 14, nil, 15, nil, 16, nil,
|
|
934
|
+
17, 145, nil, 20, 54, 133, 53, 55, 56, 57,
|
|
935
|
+
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
|
|
936
|
+
nil, nil, 20, 135, 136, 54, 133, 53, 55, 56,
|
|
937
|
+
57, nil, 13, nil, 14, nil, 15, nil, 16, nil,
|
|
938
|
+
17, nil, nil, 20, 135, 136, 54, 133, 53, 55,
|
|
939
|
+
56, 57, nil, 13, nil, 14, nil, 15, nil, 16,
|
|
940
|
+
nil, 17, nil, nil, 20, 135, 136, 54, 133, 53,
|
|
941
|
+
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
|
942
|
+
16, nil, 17, 95, nil, 20, 54, 91, 53, 55,
|
|
943
|
+
56, 57, 145, nil, nil, 54, 133, 53, 55, 56,
|
|
944
|
+
57, 158, nil, nil, 54, nil, 53, 55, 56, 57,
|
|
945
|
+
165, 135, 136, 54, 133, 53, 55, 56, 57, 145,
|
|
946
|
+
nil, nil, 54, 133, 53, 55, 56, 57, 172, 135,
|
|
947
|
+
136, 54, 133, 53, 55, 56, 57, 174, 135, 136,
|
|
948
|
+
54, 133, 53, 55, 56, 57, 178, 135, 136, 54,
|
|
949
|
+
133, 53, 55, 56, 57, 135, 136, 54, 133, 53,
|
|
950
|
+
55, 56, 57, 135, 136, 54, 133, 53, 55, 56,
|
|
951
|
+
57, 135, 136, 54, 133, 53, 55, 56, 57, 22,
|
|
952
|
+
23, 24, 25, 26, 21 ]
|
|
953
|
+
|
|
954
|
+
racc_action_check = [
|
|
955
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 1,
|
|
956
|
+
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
|
957
|
+
29, 38, 38, 59, 59, 59, 59, 59, 59, 59,
|
|
958
|
+
59, 59, 31, 59, 59, 59, 59, 59, 59, 59,
|
|
959
|
+
59, 59, 59, 59, 59, 59, 61, 61, 61, 61,
|
|
960
|
+
61, 61, 61, 61, 61, 32, 61, 61, 61, 61,
|
|
961
|
+
61, 61, 61, 61, 61, 61, 61, 61, 61, 91,
|
|
962
|
+
91, 91, 91, 91, 91, 91, 91, 91, 33, 91,
|
|
963
|
+
91, 91, 91, 91, 91, 91, 91, 91, 91, 34,
|
|
964
|
+
91, 91, 97, 97, 97, 97, 97, 97, 97, 97,
|
|
965
|
+
97, 35, 97, 97, 97, 97, 97, 97, 97, 97,
|
|
966
|
+
97, 97, 37, 97, 97, 155, 155, 155, 155, 155,
|
|
967
|
+
155, 155, 155, 155, 41, 155, 155, 155, 155, 155,
|
|
968
|
+
155, 155, 155, 155, 155, 43, 155, 155, 0, 0,
|
|
969
|
+
0, 0, 0, 0, 0, 0, 165, 165, 0, 58,
|
|
970
|
+
0, 90, 0, 94, 0, 100, 0, 125, 162, 0,
|
|
971
|
+
2, 2, 2, 2, 2, 2, 2, 2, 164, 172,
|
|
972
|
+
2, nil, 2, nil, 2, nil, 2, nil, 2, nil,
|
|
973
|
+
nil, 2, 13, 13, 13, 13, 13, 13, 13, 13,
|
|
974
|
+
nil, nil, 13, nil, 13, nil, 13, nil, 13, nil,
|
|
975
|
+
13, nil, nil, 13, 14, 14, 14, 14, 14, 14,
|
|
976
|
+
14, 14, nil, nil, 14, nil, 14, nil, 14, nil,
|
|
977
|
+
14, nil, 14, nil, nil, 14, 15, 15, 15, 15,
|
|
978
|
+
15, 15, 15, 15, nil, nil, 15, nil, 15, nil,
|
|
979
|
+
15, nil, 15, nil, 15, nil, nil, 15, 16, 16,
|
|
980
|
+
16, 16, 16, 16, 16, 16, nil, nil, 16, nil,
|
|
981
|
+
16, nil, 16, nil, 16, nil, 16, nil, nil, 16,
|
|
982
|
+
17, 17, 17, 17, 17, 17, 17, 17, nil, nil,
|
|
983
|
+
17, nil, 17, nil, 17, nil, 17, nil, 17, 18,
|
|
984
|
+
nil, 17, 18, 18, 18, 18, 18, 18, nil, 18,
|
|
985
|
+
nil, 18, nil, 18, nil, 18, nil, 18, nil, nil,
|
|
986
|
+
18, 19, 19, 19, 19, 19, 19, 19, 19, nil,
|
|
987
|
+
nil, 19, nil, 19, nil, 19, nil, 19, nil, 19,
|
|
988
|
+
nil, nil, 19, 20, 20, 20, 20, 20, 20, 20,
|
|
989
|
+
20, 20, nil, 20, 20, 20, 20, 20, 20, 20,
|
|
990
|
+
20, 20, 20, 20, 20, 39, nil, nil, 39, nil,
|
|
991
|
+
39, 39, 39, 39, nil, 39, nil, 39, nil, 39,
|
|
992
|
+
nil, 39, nil, 39, 44, nil, 39, 44, 44, 44,
|
|
993
|
+
44, 44, 44, nil, 44, nil, 44, nil, 44, nil,
|
|
994
|
+
44, nil, 44, 45, nil, 44, 45, 45, 45, 45,
|
|
995
|
+
45, 45, nil, 45, nil, 45, nil, 45, nil, 45,
|
|
996
|
+
nil, 45, 138, nil, 45, 138, 138, 138, 138, 138,
|
|
997
|
+
138, nil, 138, nil, 138, nil, 138, nil, 138, nil,
|
|
998
|
+
138, 146, nil, 138, 146, 146, 146, 146, 146, 146,
|
|
999
|
+
nil, 146, nil, 146, nil, 146, nil, 146, nil, 146,
|
|
1000
|
+
nil, nil, 146, 42, 42, 42, 42, 42, 42, 42,
|
|
1001
|
+
42, nil, 42, nil, 42, nil, 42, nil, 42, nil,
|
|
1002
|
+
42, nil, nil, 42, 122, 122, 122, 122, 122, 122,
|
|
1003
|
+
122, 122, nil, 122, nil, 122, nil, 122, nil, 122,
|
|
1004
|
+
nil, 122, nil, nil, 122, 127, 127, 127, 127, 127,
|
|
1005
|
+
127, 127, 127, nil, 127, nil, 127, nil, 127, nil,
|
|
1006
|
+
127, nil, 127, 36, nil, 127, 36, 36, 36, 36,
|
|
1007
|
+
36, 36, 52, nil, nil, 52, 52, 52, 52, 52,
|
|
1008
|
+
52, 92, nil, nil, 92, nil, 92, 92, 92, 92,
|
|
1009
|
+
126, 126, 126, 126, 126, 126, 126, 126, 126, 142,
|
|
1010
|
+
nil, nil, 142, 142, 142, 142, 142, 142, 159, 159,
|
|
1011
|
+
159, 159, 159, 159, 159, 159, 159, 163, 163, 163,
|
|
1012
|
+
163, 163, 163, 163, 163, 163, 171, 171, 171, 171,
|
|
1013
|
+
171, 171, 171, 171, 171, 95, 95, 95, 95, 95,
|
|
1014
|
+
95, 95, 95, 158, 158, 158, 158, 158, 158, 158,
|
|
1015
|
+
158, 168, 168, 168, 168, 168, 168, 168, 168, 27,
|
|
1016
|
+
27, 27, 27, 27, 27 ]
|
|
1017
|
+
|
|
1018
|
+
racc_action_pointer = [
|
|
1019
|
+
135, 9, 157, nil, nil, nil, nil, nil, nil, nil,
|
|
1020
|
+
nil, nil, nil, 179, 201, 223, 245, 267, 286, 308,
|
|
1021
|
+
330, nil, nil, nil, nil, nil, nil, 606, nil, 20,
|
|
1022
|
+
nil, 18, 39, 60, 69, 79, 510, 89, -3, 352,
|
|
1023
|
+
nil, 120, 449, 130, 371, 390, nil, nil, nil, nil,
|
|
1024
|
+
nil, nil, 519, nil, nil, nil, nil, nil, 138, 20,
|
|
1025
|
+
nil, 43, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
1026
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
1027
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
1028
|
+
128, 66, 528, nil, 148, 581, nil, 89, nil, nil,
|
|
1029
|
+
149, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
1030
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
|
1031
|
+
nil, nil, 470, nil, nil, 154, 537, 491, nil, nil,
|
|
1032
|
+
nil, nil, nil, nil, nil, nil, nil, nil, 409, nil,
|
|
1033
|
+
nil, nil, 546, nil, nil, nil, 428, nil, nil, nil,
|
|
1034
|
+
nil, nil, nil, nil, nil, 112, nil, nil, 589, 555,
|
|
1035
|
+
nil, nil, 155, 564, 164, 142, nil, nil, 597, nil,
|
|
1036
|
+
nil, 573, 164, nil, nil, nil, nil, nil, nil ]
|
|
1037
|
+
|
|
1038
|
+
racc_action_default = [
|
|
1039
|
+
-138, -138, -1, -3, -4, -5, -6, -7, -8, -9,
|
|
1040
|
+
-10, -11, -12, -138, -138, -138, -138, -138, -138, -138,
|
|
1041
|
+
-138, -103, -104, -105, -106, -107, -108, -111, -110, -138,
|
|
1042
|
+
-2, -138, -138, -138, -138, -138, -138, -138, -138, -27,
|
|
1043
|
+
-26, -35, -138, -58, -41, -40, -47, -48, -49, -50,
|
|
1044
|
+
-51, -52, -63, -66, -67, -68, -69, -70, -138, -138,
|
|
1045
|
+
-112, -138, -116, -117, -118, -119, -120, -121, -122, -123,
|
|
1046
|
+
-124, -125, -126, -127, -128, -129, -130, -131, -132, -133,
|
|
1047
|
+
-134, -135, -137, -109, 179, -13, -14, -15, -16, -17,
|
|
1048
|
+
-138, -138, -23, -22, -33, -138, -19, -24, -79, -80,
|
|
1049
|
+
-138, -82, -83, -84, -85, -86, -87, -88, -89, -90,
|
|
1050
|
+
-91, -92, -93, -94, -95, -96, -97, -98, -99, -100,
|
|
1051
|
+
-25, -35, -138, -58, -28, -138, -59, -42, -46, -55,
|
|
1052
|
+
-56, -65, -71, -72, -75, -76, -77, -31, -38, -44,
|
|
1053
|
+
-53, -54, -57, -61, -73, -74, -39, -62, -101, -102,
|
|
1054
|
+
-136, -113, -114, -115, -18, -20, -21, -33, -138, -138,
|
|
1055
|
+
-78, -81, -138, -59, -36, -37, -64, -45, -59, -43,
|
|
1056
|
+
-60, -138, -34, -36, -37, -29, -30, -32, -34 ]
|
|
1057
|
+
|
|
1058
|
+
racc_goto_table = [
|
|
1059
|
+
126, 44, 125, 43, 144, 144, 160, 93, 97, 52,
|
|
1060
|
+
166, 82, 144, 40, 41, 39, 138, 146, 169, 30,
|
|
1061
|
+
36, 94, 44, 1, 123, 129, 169, 52, 90, 37,
|
|
1062
|
+
52, 167, 147, 92, 120, 121, 31, 32, 33, 34,
|
|
1063
|
+
35, 170, 58, 166, 59, 83, 170, 166, 151, nil,
|
|
1064
|
+
150, nil, 166, 159, 4, 166, 4, nil, nil, nil,
|
|
1065
|
+
nil, 155, nil, 156, 160, nil, nil, 4, 4, 4,
|
|
1066
|
+
4, 4, nil, 4, 5, nil, 5, 157, nil, nil,
|
|
1067
|
+
163, nil, 162, 52, nil, 168, nil, 5, 5, 5,
|
|
1068
|
+
5, 5, nil, 5, nil, nil, nil, nil, 144, nil,
|
|
1069
|
+
nil, nil, 144, nil, nil, 129, 144, 144, nil, 6,
|
|
1070
|
+
129, 6, nil, nil, nil, nil, 171, 7, nil, 7,
|
|
1071
|
+
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
|
|
1072
|
+
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
|
|
1073
|
+
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
|
|
1074
|
+
11, 11, 11, nil, 11 ]
|
|
1075
|
+
|
|
1076
|
+
racc_goto_check = [
|
|
1077
|
+
22, 24, 21, 23, 36, 36, 37, 18, 16, 34,
|
|
1078
|
+
35, 41, 36, 19, 20, 17, 25, 25, 28, 3,
|
|
1079
|
+
13, 23, 24, 1, 23, 24, 28, 34, 14, 15,
|
|
1080
|
+
34, 29, 32, 17, 19, 20, 1, 1, 1, 1,
|
|
1081
|
+
1, 33, 1, 35, 38, 39, 33, 35, 42, nil,
|
|
1082
|
+
41, nil, 35, 22, 4, 35, 4, nil, nil, nil,
|
|
1083
|
+
nil, 16, nil, 18, 37, nil, nil, 4, 4, 4,
|
|
1084
|
+
4, 4, nil, 4, 5, nil, 5, 23, nil, nil,
|
|
1085
|
+
22, nil, 21, 34, nil, 22, nil, 5, 5, 5,
|
|
1086
|
+
5, 5, nil, 5, nil, nil, nil, nil, 36, nil,
|
|
1087
|
+
nil, nil, 36, nil, nil, 24, 36, 36, nil, 6,
|
|
1088
|
+
24, 6, nil, nil, nil, nil, 22, 7, nil, 7,
|
|
1089
|
+
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
|
|
1090
|
+
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
|
|
1091
|
+
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
|
|
1092
|
+
11, 11, 11, nil, 11 ]
|
|
1093
|
+
|
|
1094
|
+
racc_goto_pointer = [
|
|
1095
|
+
nil, 23, nil, 17, 54, 74, 109, 117, 127, nil,
|
|
1096
|
+
nil, 135, nil, 2, -8, 11, -30, -3, -29, -5,
|
|
1097
|
+
-4, -40, -42, -15, -17, -28, nil, nil, -120, -96,
|
|
1098
|
+
nil, nil, -20, -101, -9, -116, -40, -91, 24, 18,
|
|
1099
|
+
nil, -9, -13 ]
|
|
1100
|
+
|
|
1101
|
+
racc_goto_default = [
|
|
1102
|
+
nil, nil, 2, 3, 46, 47, 48, 49, 50, 9,
|
|
1103
|
+
10, 51, 12, nil, nil, nil, nil, nil, nil, nil,
|
|
1104
|
+
nil, nil, nil, nil, 140, nil, 45, 127, 139, 128,
|
|
1105
|
+
141, 130, 142, 143, 132, 131, 134, 98, nil, 28,
|
|
1106
|
+
27, nil, 60 ]
|
|
1107
|
+
|
|
1108
|
+
racc_reduce_table = [
|
|
1109
|
+
0, 0, :racc_error,
|
|
1110
|
+
1, 27, :_reduce_none,
|
|
1111
|
+
2, 28, :_reduce_2,
|
|
1112
|
+
1, 28, :_reduce_3,
|
|
1113
|
+
1, 29, :_reduce_none,
|
|
1114
|
+
1, 29, :_reduce_none,
|
|
1115
|
+
1, 29, :_reduce_none,
|
|
1116
|
+
1, 29, :_reduce_none,
|
|
1117
|
+
1, 29, :_reduce_none,
|
|
1118
|
+
1, 29, :_reduce_none,
|
|
1119
|
+
1, 29, :_reduce_none,
|
|
1120
|
+
1, 29, :_reduce_none,
|
|
1121
|
+
1, 29, :_reduce_none,
|
|
1122
|
+
3, 30, :_reduce_13,
|
|
1123
|
+
3, 31, :_reduce_14,
|
|
1124
|
+
3, 32, :_reduce_15,
|
|
1125
|
+
3, 33, :_reduce_16,
|
|
1126
|
+
3, 34, :_reduce_17,
|
|
1127
|
+
4, 35, :_reduce_18,
|
|
1128
|
+
3, 35, :_reduce_19,
|
|
1129
|
+
2, 40, :_reduce_20,
|
|
1130
|
+
2, 40, :_reduce_21,
|
|
1131
|
+
1, 40, :_reduce_22,
|
|
1132
|
+
1, 40, :_reduce_23,
|
|
1133
|
+
2, 41, :_reduce_24,
|
|
1134
|
+
2, 41, :_reduce_25,
|
|
1135
|
+
1, 41, :_reduce_26,
|
|
1136
|
+
1, 41, :_reduce_27,
|
|
1137
|
+
2, 39, :_reduce_none,
|
|
1138
|
+
4, 39, :_reduce_29,
|
|
1139
|
+
4, 39, :_reduce_30,
|
|
1140
|
+
2, 43, :_reduce_31,
|
|
1141
|
+
4, 43, :_reduce_32,
|
|
1142
|
+
1, 44, :_reduce_33,
|
|
1143
|
+
3, 44, :_reduce_34,
|
|
1144
|
+
1, 45, :_reduce_none,
|
|
1145
|
+
3, 45, :_reduce_36,
|
|
1146
|
+
3, 45, :_reduce_37,
|
|
1147
|
+
2, 46, :_reduce_38,
|
|
1148
|
+
2, 46, :_reduce_39,
|
|
1149
|
+
1, 46, :_reduce_40,
|
|
1150
|
+
1, 46, :_reduce_41,
|
|
1151
|
+
1, 47, :_reduce_none,
|
|
1152
|
+
2, 51, :_reduce_43,
|
|
1153
|
+
1, 51, :_reduce_44,
|
|
1154
|
+
2, 53, :_reduce_45,
|
|
1155
|
+
1, 53, :_reduce_46,
|
|
1156
|
+
1, 50, :_reduce_none,
|
|
1157
|
+
1, 50, :_reduce_none,
|
|
1158
|
+
1, 50, :_reduce_none,
|
|
1159
|
+
1, 50, :_reduce_none,
|
|
1160
|
+
1, 50, :_reduce_none,
|
|
1161
|
+
1, 50, :_reduce_none,
|
|
1162
|
+
1, 54, :_reduce_none,
|
|
1163
|
+
1, 54, :_reduce_none,
|
|
1164
|
+
1, 55, :_reduce_none,
|
|
1165
|
+
1, 55, :_reduce_none,
|
|
1166
|
+
1, 56, :_reduce_57,
|
|
1167
|
+
1, 52, :_reduce_58,
|
|
1168
|
+
1, 57, :_reduce_59,
|
|
1169
|
+
2, 58, :_reduce_60,
|
|
1170
|
+
1, 58, :_reduce_none,
|
|
1171
|
+
2, 49, :_reduce_62,
|
|
1172
|
+
1, 49, :_reduce_none,
|
|
1173
|
+
2, 48, :_reduce_64,
|
|
1174
|
+
1, 48, :_reduce_none,
|
|
1175
|
+
1, 60, :_reduce_none,
|
|
1176
|
+
1, 60, :_reduce_none,
|
|
1177
|
+
1, 60, :_reduce_none,
|
|
1178
|
+
1, 60, :_reduce_none,
|
|
1179
|
+
1, 60, :_reduce_none,
|
|
1180
|
+
1, 62, :_reduce_none,
|
|
1181
|
+
1, 62, :_reduce_none,
|
|
1182
|
+
1, 59, :_reduce_none,
|
|
1183
|
+
1, 59, :_reduce_none,
|
|
1184
|
+
1, 61, :_reduce_none,
|
|
1185
|
+
1, 61, :_reduce_none,
|
|
1186
|
+
1, 61, :_reduce_none,
|
|
1187
|
+
2, 42, :_reduce_78,
|
|
1188
|
+
1, 42, :_reduce_none,
|
|
1189
|
+
1, 63, :_reduce_none,
|
|
1190
|
+
2, 63, :_reduce_none,
|
|
1191
|
+
1, 63, :_reduce_none,
|
|
1192
|
+
1, 63, :_reduce_none,
|
|
1193
|
+
1, 63, :_reduce_none,
|
|
1194
|
+
1, 63, :_reduce_none,
|
|
1195
|
+
1, 63, :_reduce_none,
|
|
1196
|
+
1, 63, :_reduce_none,
|
|
1197
|
+
1, 63, :_reduce_none,
|
|
1198
|
+
1, 63, :_reduce_none,
|
|
1199
|
+
1, 63, :_reduce_none,
|
|
1200
|
+
1, 63, :_reduce_none,
|
|
1201
|
+
1, 63, :_reduce_none,
|
|
1202
|
+
1, 63, :_reduce_none,
|
|
1203
|
+
1, 63, :_reduce_none,
|
|
1204
|
+
1, 63, :_reduce_none,
|
|
1205
|
+
1, 63, :_reduce_none,
|
|
1206
|
+
1, 63, :_reduce_none,
|
|
1207
|
+
1, 63, :_reduce_none,
|
|
1208
|
+
1, 63, :_reduce_none,
|
|
1209
|
+
1, 63, :_reduce_none,
|
|
1210
|
+
3, 36, :_reduce_101,
|
|
1211
|
+
3, 37, :_reduce_102,
|
|
1212
|
+
1, 65, :_reduce_none,
|
|
1213
|
+
1, 65, :_reduce_none,
|
|
1214
|
+
1, 65, :_reduce_none,
|
|
1215
|
+
1, 65, :_reduce_none,
|
|
1216
|
+
1, 65, :_reduce_none,
|
|
1217
|
+
1, 65, :_reduce_none,
|
|
1218
|
+
2, 66, :_reduce_109,
|
|
1219
|
+
1, 66, :_reduce_none,
|
|
1220
|
+
1, 38, :_reduce_111,
|
|
1221
|
+
1, 67, :_reduce_none,
|
|
1222
|
+
2, 67, :_reduce_113,
|
|
1223
|
+
2, 67, :_reduce_114,
|
|
1224
|
+
2, 67, :_reduce_115,
|
|
1225
|
+
1, 68, :_reduce_none,
|
|
1226
|
+
1, 68, :_reduce_none,
|
|
1227
|
+
1, 68, :_reduce_none,
|
|
1228
|
+
1, 68, :_reduce_none,
|
|
1229
|
+
1, 68, :_reduce_none,
|
|
1230
|
+
1, 68, :_reduce_none,
|
|
1231
|
+
1, 68, :_reduce_none,
|
|
1232
|
+
1, 68, :_reduce_none,
|
|
1233
|
+
1, 68, :_reduce_none,
|
|
1234
|
+
1, 68, :_reduce_none,
|
|
1235
|
+
1, 68, :_reduce_none,
|
|
1236
|
+
1, 68, :_reduce_none,
|
|
1237
|
+
1, 68, :_reduce_none,
|
|
1238
|
+
1, 68, :_reduce_none,
|
|
1239
|
+
1, 68, :_reduce_none,
|
|
1240
|
+
1, 68, :_reduce_none,
|
|
1241
|
+
1, 68, :_reduce_none,
|
|
1242
|
+
1, 68, :_reduce_none,
|
|
1243
|
+
1, 68, :_reduce_none,
|
|
1244
|
+
1, 68, :_reduce_none,
|
|
1245
|
+
2, 64, :_reduce_136,
|
|
1246
|
+
1, 64, :_reduce_none ]
|
|
1247
|
+
|
|
1248
|
+
racc_reduce_n = 138
|
|
1249
|
+
|
|
1250
|
+
racc_shift_n = 179
|
|
1251
|
+
|
|
1252
|
+
racc_token_table = {
|
|
1253
|
+
false => 0,
|
|
1254
|
+
:error => 1,
|
|
1255
|
+
:EX_LOW => 2,
|
|
1256
|
+
:QUOTE => 3,
|
|
1257
|
+
:BAR => 4,
|
|
1258
|
+
:SLASH => 5,
|
|
1259
|
+
:BACK_SLASH => 6,
|
|
1260
|
+
:URL => 7,
|
|
1261
|
+
:OTHER => 8,
|
|
1262
|
+
:REF_OPEN => 9,
|
|
1263
|
+
:FOOTNOTE_OPEN => 10,
|
|
1264
|
+
:FOOTNOTE_CLOSE => 11,
|
|
1265
|
+
:EX_HIGH => 12,
|
|
1266
|
+
:EM_OPEN => 13,
|
|
1267
|
+
:EM_CLOSE => 14,
|
|
1268
|
+
:CODE_OPEN => 15,
|
|
1269
|
+
:CODE_CLOSE => 16,
|
|
1270
|
+
:VAR_OPEN => 17,
|
|
1271
|
+
:VAR_CLOSE => 18,
|
|
1272
|
+
:KBD_OPEN => 19,
|
|
1273
|
+
:KBD_CLOSE => 20,
|
|
1274
|
+
:INDEX_OPEN => 21,
|
|
1275
|
+
:INDEX_CLOSE => 22,
|
|
1276
|
+
:REF_CLOSE => 23,
|
|
1277
|
+
:VERB_OPEN => 24,
|
|
1278
|
+
:VERB_CLOSE => 25 }
|
|
1279
|
+
|
|
1280
|
+
racc_nt_base = 26
|
|
1281
|
+
|
|
1282
|
+
racc_use_result_var = true
|
|
1283
|
+
|
|
1284
|
+
Racc_arg = [
|
|
1285
|
+
racc_action_table,
|
|
1286
|
+
racc_action_check,
|
|
1287
|
+
racc_action_default,
|
|
1288
|
+
racc_action_pointer,
|
|
1289
|
+
racc_goto_table,
|
|
1290
|
+
racc_goto_check,
|
|
1291
|
+
racc_goto_default,
|
|
1292
|
+
racc_goto_pointer,
|
|
1293
|
+
racc_nt_base,
|
|
1294
|
+
racc_reduce_table,
|
|
1295
|
+
racc_token_table,
|
|
1296
|
+
racc_shift_n,
|
|
1297
|
+
racc_reduce_n,
|
|
1298
|
+
racc_use_result_var ]
|
|
1299
|
+
Ractor.make_shareable(Racc_arg) if defined?(Ractor)
|
|
1300
|
+
|
|
1301
|
+
Racc_token_to_s_table = [
|
|
1302
|
+
"$end",
|
|
1303
|
+
"error",
|
|
1304
|
+
"EX_LOW",
|
|
1305
|
+
"QUOTE",
|
|
1306
|
+
"BAR",
|
|
1307
|
+
"SLASH",
|
|
1308
|
+
"BACK_SLASH",
|
|
1309
|
+
"URL",
|
|
1310
|
+
"OTHER",
|
|
1311
|
+
"REF_OPEN",
|
|
1312
|
+
"FOOTNOTE_OPEN",
|
|
1313
|
+
"FOOTNOTE_CLOSE",
|
|
1314
|
+
"EX_HIGH",
|
|
1315
|
+
"EM_OPEN",
|
|
1316
|
+
"EM_CLOSE",
|
|
1317
|
+
"CODE_OPEN",
|
|
1318
|
+
"CODE_CLOSE",
|
|
1319
|
+
"VAR_OPEN",
|
|
1320
|
+
"VAR_CLOSE",
|
|
1321
|
+
"KBD_OPEN",
|
|
1322
|
+
"KBD_CLOSE",
|
|
1323
|
+
"INDEX_OPEN",
|
|
1324
|
+
"INDEX_CLOSE",
|
|
1325
|
+
"REF_CLOSE",
|
|
1326
|
+
"VERB_OPEN",
|
|
1327
|
+
"VERB_CLOSE",
|
|
1328
|
+
"$start",
|
|
1329
|
+
"content",
|
|
1330
|
+
"elements",
|
|
1331
|
+
"element",
|
|
1332
|
+
"emphasis",
|
|
1333
|
+
"code",
|
|
1334
|
+
"var",
|
|
1335
|
+
"keyboard",
|
|
1336
|
+
"index",
|
|
1337
|
+
"reference",
|
|
1338
|
+
"footnote",
|
|
1339
|
+
"verb",
|
|
1340
|
+
"normal_str_ele",
|
|
1341
|
+
"substitute",
|
|
1342
|
+
"ref_label",
|
|
1343
|
+
"ref_label2",
|
|
1344
|
+
"ref_url_strings",
|
|
1345
|
+
"filename",
|
|
1346
|
+
"element_label",
|
|
1347
|
+
"element_label2",
|
|
1348
|
+
"ref_subst_content",
|
|
1349
|
+
"ref_subst_content_q",
|
|
1350
|
+
"ref_subst_strings_q",
|
|
1351
|
+
"ref_subst_strings_first",
|
|
1352
|
+
"ref_subst_ele2",
|
|
1353
|
+
"ref_subst_eles",
|
|
1354
|
+
"ref_subst_str_ele_first",
|
|
1355
|
+
"ref_subst_eles_q",
|
|
1356
|
+
"ref_subst_ele",
|
|
1357
|
+
"ref_subst_ele_q",
|
|
1358
|
+
"ref_subst_str_ele",
|
|
1359
|
+
"ref_subst_str_ele_q",
|
|
1360
|
+
"ref_subst_strings",
|
|
1361
|
+
"ref_subst_string3",
|
|
1362
|
+
"ref_subst_string",
|
|
1363
|
+
"ref_subst_string_q",
|
|
1364
|
+
"ref_subst_string2",
|
|
1365
|
+
"ref_url_string",
|
|
1366
|
+
"verb_strings",
|
|
1367
|
+
"normal_string",
|
|
1368
|
+
"normal_strings",
|
|
1369
|
+
"verb_string",
|
|
1370
|
+
"verb_normal_string" ]
|
|
1371
|
+
Ractor.make_shareable(Racc_token_to_s_table) if defined?(Ractor)
|
|
1372
|
+
|
|
1373
|
+
Racc_debug_parser = false
|
|
1374
|
+
|
|
1375
|
+
##### State transition tables end #####
|
|
1376
|
+
|
|
1377
|
+
# reduce 0 omitted
|
|
1378
|
+
|
|
1379
|
+
# reduce 1 omitted
|
|
1380
|
+
|
|
1381
|
+
def _reduce_2(val, _values, result)
|
|
1382
|
+
result.append val[1]
|
|
1383
|
+
result
|
|
1384
|
+
end
|
|
1385
|
+
|
|
1386
|
+
def _reduce_3(val, _values, result)
|
|
1387
|
+
result = val[0]
|
|
1388
|
+
result
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1391
|
+
# reduce 4 omitted
|
|
1392
|
+
|
|
1393
|
+
# reduce 5 omitted
|
|
1394
|
+
|
|
1395
|
+
# reduce 6 omitted
|
|
1396
|
+
|
|
1397
|
+
# reduce 7 omitted
|
|
1398
|
+
|
|
1399
|
+
# reduce 8 omitted
|
|
1400
|
+
|
|
1401
|
+
# reduce 9 omitted
|
|
1402
|
+
|
|
1403
|
+
# reduce 10 omitted
|
|
1404
|
+
|
|
1405
|
+
# reduce 11 omitted
|
|
1406
|
+
|
|
1407
|
+
# reduce 12 omitted
|
|
1408
|
+
|
|
1409
|
+
def _reduce_13(val, _values, result)
|
|
1410
|
+
content = val[1]
|
|
1411
|
+
result = inline "<em>#{content}</em>", content
|
|
1412
|
+
|
|
1413
|
+
result
|
|
1414
|
+
end
|
|
1415
|
+
|
|
1416
|
+
def _reduce_14(val, _values, result)
|
|
1417
|
+
content = val[1]
|
|
1418
|
+
result = inline "<code>#{content}</code>", content
|
|
1419
|
+
|
|
1420
|
+
result
|
|
1421
|
+
end
|
|
1422
|
+
|
|
1423
|
+
def _reduce_15(val, _values, result)
|
|
1424
|
+
content = val[1]
|
|
1425
|
+
result = inline "+#{content}+", content
|
|
1426
|
+
|
|
1427
|
+
result
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1430
|
+
def _reduce_16(val, _values, result)
|
|
1431
|
+
content = val[1]
|
|
1432
|
+
result = inline "<tt>#{content}</tt>", content
|
|
1433
|
+
|
|
1434
|
+
result
|
|
1435
|
+
end
|
|
1436
|
+
|
|
1437
|
+
def _reduce_17(val, _values, result)
|
|
1438
|
+
label = val[1]
|
|
1439
|
+
@block_parser.add_label label.reference
|
|
1440
|
+
result = "<span id=\"label-#{label}\">#{label}</span>"
|
|
1441
|
+
|
|
1442
|
+
result
|
|
1443
|
+
end
|
|
1444
|
+
|
|
1445
|
+
def _reduce_18(val, _values, result)
|
|
1446
|
+
result = "{#{val[1]}}[#{val[2].join}]"
|
|
1447
|
+
|
|
1448
|
+
result
|
|
1449
|
+
end
|
|
1450
|
+
|
|
1451
|
+
def _reduce_19(val, _values, result)
|
|
1452
|
+
scheme, inline = val[1]
|
|
1453
|
+
|
|
1454
|
+
result = "{#{inline}}[#{scheme}#{inline.reference}]"
|
|
1455
|
+
|
|
1456
|
+
result
|
|
1457
|
+
end
|
|
1458
|
+
|
|
1459
|
+
def _reduce_20(val, _values, result)
|
|
1460
|
+
result = [nil, inline(val[1])]
|
|
1461
|
+
|
|
1462
|
+
result
|
|
1463
|
+
end
|
|
1464
|
+
|
|
1465
|
+
def _reduce_21(val, _values, result)
|
|
1466
|
+
result = [
|
|
1467
|
+
'rdoc-label:',
|
|
1468
|
+
inline("#{val[0].reference}/#{val[1].reference}")
|
|
1469
|
+
]
|
|
1470
|
+
|
|
1471
|
+
result
|
|
1472
|
+
end
|
|
1473
|
+
|
|
1474
|
+
def _reduce_22(val, _values, result)
|
|
1475
|
+
result = ['rdoc-label:', val[0].reference]
|
|
1476
|
+
|
|
1477
|
+
result
|
|
1478
|
+
end
|
|
1479
|
+
|
|
1480
|
+
def _reduce_23(val, _values, result)
|
|
1481
|
+
result = ['rdoc-label:', "#{val[0].reference}/"]
|
|
1482
|
+
|
|
1483
|
+
result
|
|
1484
|
+
end
|
|
1485
|
+
|
|
1486
|
+
def _reduce_24(val, _values, result)
|
|
1487
|
+
result = [nil, inline(val[1])]
|
|
1488
|
+
|
|
1489
|
+
result
|
|
1490
|
+
end
|
|
1491
|
+
|
|
1492
|
+
def _reduce_25(val, _values, result)
|
|
1493
|
+
result = [
|
|
1494
|
+
'rdoc-label:',
|
|
1495
|
+
inline("#{val[0].reference}/#{val[1].reference}")
|
|
1496
|
+
]
|
|
1497
|
+
|
|
1498
|
+
result
|
|
1499
|
+
end
|
|
1500
|
+
|
|
1501
|
+
def _reduce_26(val, _values, result)
|
|
1502
|
+
result = ['rdoc-label:', val[0]]
|
|
1503
|
+
|
|
1504
|
+
result
|
|
1505
|
+
end
|
|
1506
|
+
|
|
1507
|
+
def _reduce_27(val, _values, result)
|
|
1508
|
+
ref = val[0].reference
|
|
1509
|
+
result = ['rdoc-label:', inline(ref, "#{ref}/")]
|
|
1510
|
+
|
|
1511
|
+
result
|
|
1512
|
+
end
|
|
1513
|
+
|
|
1514
|
+
# reduce 28 omitted
|
|
1515
|
+
|
|
1516
|
+
def _reduce_29(val, _values, result)
|
|
1517
|
+
result = val[1]
|
|
1518
|
+
result
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
def _reduce_30(val, _values, result)
|
|
1522
|
+
result = val[1]
|
|
1523
|
+
result
|
|
1524
|
+
end
|
|
1525
|
+
|
|
1526
|
+
def _reduce_31(val, _values, result)
|
|
1527
|
+
result = inline val[0]
|
|
1528
|
+
|
|
1529
|
+
result
|
|
1530
|
+
end
|
|
1531
|
+
|
|
1532
|
+
def _reduce_32(val, _values, result)
|
|
1533
|
+
result = inline "\"#{val[1]}\""
|
|
1534
|
+
|
|
1535
|
+
result
|
|
1536
|
+
end
|
|
1537
|
+
|
|
1538
|
+
def _reduce_33(val, _values, result)
|
|
1539
|
+
result = inline val[0]
|
|
1540
|
+
|
|
1541
|
+
result
|
|
1542
|
+
end
|
|
1543
|
+
|
|
1544
|
+
def _reduce_34(val, _values, result)
|
|
1545
|
+
result = inline "\"#{val[1]}\""
|
|
1546
|
+
|
|
1547
|
+
result
|
|
1548
|
+
end
|
|
1549
|
+
|
|
1550
|
+
# reduce 35 omitted
|
|
1551
|
+
|
|
1552
|
+
def _reduce_36(val, _values, result)
|
|
1553
|
+
result = val[1]
|
|
1554
|
+
result
|
|
1555
|
+
end
|
|
1556
|
+
|
|
1557
|
+
def _reduce_37(val, _values, result)
|
|
1558
|
+
result = inline val[1]
|
|
1559
|
+
result
|
|
1560
|
+
end
|
|
1561
|
+
|
|
1562
|
+
def _reduce_38(val, _values, result)
|
|
1563
|
+
result = val[0].append val[1]
|
|
1564
|
+
|
|
1565
|
+
result
|
|
1566
|
+
end
|
|
1567
|
+
|
|
1568
|
+
def _reduce_39(val, _values, result)
|
|
1569
|
+
result = val[0].append val[1]
|
|
1570
|
+
|
|
1571
|
+
result
|
|
1572
|
+
end
|
|
1573
|
+
|
|
1574
|
+
def _reduce_40(val, _values, result)
|
|
1575
|
+
result = val[0]
|
|
1576
|
+
|
|
1577
|
+
result
|
|
1578
|
+
end
|
|
1579
|
+
|
|
1580
|
+
def _reduce_41(val, _values, result)
|
|
1581
|
+
result = inline val[0]
|
|
1582
|
+
|
|
1583
|
+
result
|
|
1584
|
+
end
|
|
1585
|
+
|
|
1586
|
+
# reduce 42 omitted
|
|
1587
|
+
|
|
1588
|
+
def _reduce_43(val, _values, result)
|
|
1589
|
+
result = val[0].append val[1]
|
|
1590
|
+
|
|
1591
|
+
result
|
|
1592
|
+
end
|
|
1593
|
+
|
|
1594
|
+
def _reduce_44(val, _values, result)
|
|
1595
|
+
result = inline val[0]
|
|
1596
|
+
|
|
1597
|
+
result
|
|
1598
|
+
end
|
|
1599
|
+
|
|
1600
|
+
def _reduce_45(val, _values, result)
|
|
1601
|
+
result = val[0].append val[1]
|
|
1602
|
+
|
|
1603
|
+
result
|
|
1604
|
+
end
|
|
1605
|
+
|
|
1606
|
+
def _reduce_46(val, _values, result)
|
|
1607
|
+
result = val[0]
|
|
1608
|
+
|
|
1609
|
+
result
|
|
1610
|
+
end
|
|
1611
|
+
|
|
1612
|
+
# reduce 47 omitted
|
|
1613
|
+
|
|
1614
|
+
# reduce 48 omitted
|
|
1615
|
+
|
|
1616
|
+
# reduce 49 omitted
|
|
1617
|
+
|
|
1618
|
+
# reduce 50 omitted
|
|
1619
|
+
|
|
1620
|
+
# reduce 51 omitted
|
|
1621
|
+
|
|
1622
|
+
# reduce 52 omitted
|
|
1623
|
+
|
|
1624
|
+
# reduce 53 omitted
|
|
1625
|
+
|
|
1626
|
+
# reduce 54 omitted
|
|
1627
|
+
|
|
1628
|
+
# reduce 55 omitted
|
|
1629
|
+
|
|
1630
|
+
# reduce 56 omitted
|
|
1631
|
+
|
|
1632
|
+
def _reduce_57(val, _values, result)
|
|
1633
|
+
result = val[0]
|
|
1634
|
+
|
|
1635
|
+
result
|
|
1636
|
+
end
|
|
1637
|
+
|
|
1638
|
+
def _reduce_58(val, _values, result)
|
|
1639
|
+
result = inline val[0]
|
|
1640
|
+
|
|
1641
|
+
result
|
|
1642
|
+
end
|
|
1643
|
+
|
|
1644
|
+
def _reduce_59(val, _values, result)
|
|
1645
|
+
result = inline val[0]
|
|
1646
|
+
|
|
1647
|
+
result
|
|
1648
|
+
end
|
|
1649
|
+
|
|
1650
|
+
def _reduce_60(val, _values, result)
|
|
1651
|
+
result << val[1]
|
|
1652
|
+
result
|
|
1653
|
+
end
|
|
1654
|
+
|
|
1655
|
+
# reduce 61 omitted
|
|
1656
|
+
|
|
1657
|
+
def _reduce_62(val, _values, result)
|
|
1658
|
+
result << val[1]
|
|
1659
|
+
|
|
1660
|
+
result
|
|
1661
|
+
end
|
|
1662
|
+
|
|
1663
|
+
# reduce 63 omitted
|
|
1664
|
+
|
|
1665
|
+
def _reduce_64(val, _values, result)
|
|
1666
|
+
result << val[1]
|
|
1667
|
+
|
|
1668
|
+
result
|
|
1669
|
+
end
|
|
1670
|
+
|
|
1671
|
+
# reduce 65 omitted
|
|
1672
|
+
|
|
1673
|
+
# reduce 66 omitted
|
|
1674
|
+
|
|
1675
|
+
# reduce 67 omitted
|
|
1676
|
+
|
|
1677
|
+
# reduce 68 omitted
|
|
1678
|
+
|
|
1679
|
+
# reduce 69 omitted
|
|
1680
|
+
|
|
1681
|
+
# reduce 70 omitted
|
|
1682
|
+
|
|
1683
|
+
# reduce 71 omitted
|
|
1684
|
+
|
|
1685
|
+
# reduce 72 omitted
|
|
1686
|
+
|
|
1687
|
+
# reduce 73 omitted
|
|
1688
|
+
|
|
1689
|
+
# reduce 74 omitted
|
|
1690
|
+
|
|
1691
|
+
# reduce 75 omitted
|
|
1692
|
+
|
|
1693
|
+
# reduce 76 omitted
|
|
1694
|
+
|
|
1695
|
+
# reduce 77 omitted
|
|
1696
|
+
|
|
1697
|
+
def _reduce_78(val, _values, result)
|
|
1698
|
+
result << val[1]
|
|
1699
|
+
result
|
|
1700
|
+
end
|
|
1701
|
+
|
|
1702
|
+
# reduce 79 omitted
|
|
1703
|
+
|
|
1704
|
+
# reduce 80 omitted
|
|
1705
|
+
|
|
1706
|
+
# reduce 81 omitted
|
|
1707
|
+
|
|
1708
|
+
# reduce 82 omitted
|
|
1709
|
+
|
|
1710
|
+
# reduce 83 omitted
|
|
1711
|
+
|
|
1712
|
+
# reduce 84 omitted
|
|
1713
|
+
|
|
1714
|
+
# reduce 85 omitted
|
|
1715
|
+
|
|
1716
|
+
# reduce 86 omitted
|
|
1717
|
+
|
|
1718
|
+
# reduce 87 omitted
|
|
1719
|
+
|
|
1720
|
+
# reduce 88 omitted
|
|
1721
|
+
|
|
1722
|
+
# reduce 89 omitted
|
|
1723
|
+
|
|
1724
|
+
# reduce 90 omitted
|
|
1725
|
+
|
|
1726
|
+
# reduce 91 omitted
|
|
1727
|
+
|
|
1728
|
+
# reduce 92 omitted
|
|
1729
|
+
|
|
1730
|
+
# reduce 93 omitted
|
|
1731
|
+
|
|
1732
|
+
# reduce 94 omitted
|
|
1733
|
+
|
|
1734
|
+
# reduce 95 omitted
|
|
1735
|
+
|
|
1736
|
+
# reduce 96 omitted
|
|
1737
|
+
|
|
1738
|
+
# reduce 97 omitted
|
|
1739
|
+
|
|
1740
|
+
# reduce 98 omitted
|
|
1741
|
+
|
|
1742
|
+
# reduce 99 omitted
|
|
1743
|
+
|
|
1744
|
+
# reduce 100 omitted
|
|
1745
|
+
|
|
1746
|
+
def _reduce_101(val, _values, result)
|
|
1747
|
+
index = @block_parser.add_footnote val[1].rdoc
|
|
1748
|
+
result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]"
|
|
1749
|
+
|
|
1750
|
+
result
|
|
1751
|
+
end
|
|
1752
|
+
|
|
1753
|
+
def _reduce_102(val, _values, result)
|
|
1754
|
+
result = inline "<tt>#{val[1]}</tt>", val[1]
|
|
1755
|
+
|
|
1756
|
+
result
|
|
1757
|
+
end
|
|
1758
|
+
|
|
1759
|
+
# reduce 103 omitted
|
|
1760
|
+
|
|
1761
|
+
# reduce 104 omitted
|
|
1762
|
+
|
|
1763
|
+
# reduce 105 omitted
|
|
1764
|
+
|
|
1765
|
+
# reduce 106 omitted
|
|
1766
|
+
|
|
1767
|
+
# reduce 107 omitted
|
|
1768
|
+
|
|
1769
|
+
# reduce 108 omitted
|
|
1770
|
+
|
|
1771
|
+
def _reduce_109(val, _values, result)
|
|
1772
|
+
result << val[1]
|
|
1773
|
+
result
|
|
1774
|
+
end
|
|
1775
|
+
|
|
1776
|
+
# reduce 110 omitted
|
|
1777
|
+
|
|
1778
|
+
def _reduce_111(val, _values, result)
|
|
1779
|
+
result = inline val[0]
|
|
1780
|
+
|
|
1781
|
+
result
|
|
1782
|
+
end
|
|
1783
|
+
|
|
1784
|
+
# reduce 112 omitted
|
|
1785
|
+
|
|
1786
|
+
def _reduce_113(val, _values, result)
|
|
1787
|
+
result = val[1]
|
|
1788
|
+
result
|
|
1789
|
+
end
|
|
1790
|
+
|
|
1791
|
+
def _reduce_114(val, _values, result)
|
|
1792
|
+
result = val[1]
|
|
1793
|
+
result
|
|
1794
|
+
end
|
|
1795
|
+
|
|
1796
|
+
def _reduce_115(val, _values, result)
|
|
1797
|
+
result = val[1]
|
|
1798
|
+
result
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1801
|
+
# reduce 116 omitted
|
|
1802
|
+
|
|
1803
|
+
# reduce 117 omitted
|
|
1804
|
+
|
|
1805
|
+
# reduce 118 omitted
|
|
1806
|
+
|
|
1807
|
+
# reduce 119 omitted
|
|
1808
|
+
|
|
1809
|
+
# reduce 120 omitted
|
|
1810
|
+
|
|
1811
|
+
# reduce 121 omitted
|
|
1812
|
+
|
|
1813
|
+
# reduce 122 omitted
|
|
1814
|
+
|
|
1815
|
+
# reduce 123 omitted
|
|
1816
|
+
|
|
1817
|
+
# reduce 124 omitted
|
|
1818
|
+
|
|
1819
|
+
# reduce 125 omitted
|
|
1820
|
+
|
|
1821
|
+
# reduce 126 omitted
|
|
1822
|
+
|
|
1823
|
+
# reduce 127 omitted
|
|
1824
|
+
|
|
1825
|
+
# reduce 128 omitted
|
|
1826
|
+
|
|
1827
|
+
# reduce 129 omitted
|
|
1828
|
+
|
|
1829
|
+
# reduce 130 omitted
|
|
1830
|
+
|
|
1831
|
+
# reduce 131 omitted
|
|
1832
|
+
|
|
1833
|
+
# reduce 132 omitted
|
|
1834
|
+
|
|
1835
|
+
# reduce 133 omitted
|
|
1836
|
+
|
|
1837
|
+
# reduce 134 omitted
|
|
1838
|
+
|
|
1839
|
+
# reduce 135 omitted
|
|
1840
|
+
|
|
1841
|
+
def _reduce_136(val, _values, result)
|
|
1842
|
+
result << val[1]
|
|
1843
|
+
result
|
|
1844
|
+
end
|
|
1845
|
+
|
|
1846
|
+
# reduce 137 omitted
|
|
1847
|
+
|
|
1848
|
+
def _reduce_none(val, _values, result)
|
|
1849
|
+
val[0]
|
|
1850
|
+
end
|
|
1851
|
+
|
|
1852
|
+
end # class InlineParser
|
|
1853
|
+
|
|
1854
|
+
end
|