mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016-- https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0d715e1b75
commit
23863ff75d
27 changed files with 667 additions and 421 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Sep 5 19:35:22 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/rdoc/*, test/rdoc/*: Update rdoc/rdoc master(f191513)
|
||||||
|
https://github.com/rdoc/rdoc/blob/master/History.rdoc#423--2016--
|
||||||
|
https://github.com/rdoc/rdoc/blob/master/History.rdoc#422--2016-02-09
|
||||||
|
|
||||||
Sun Sep 4 00:17:55 2016 Sho Hashimoto <sho-h@ruby-lang.org>
|
Sun Sep 4 00:17:55 2016 Sho Hashimoto <sho-h@ruby-lang.org>
|
||||||
|
|
||||||
* proc.c: [DOC] fix Object#define_singleton_method and
|
* proc.c: [DOC] fix Object#define_singleton_method and
|
||||||
|
|
|
@ -65,7 +65,7 @@ module RDoc
|
||||||
##
|
##
|
||||||
# RDoc version you are using
|
# RDoc version you are using
|
||||||
|
|
||||||
VERSION = '4.2.1'
|
VERSION = '4.2.3'
|
||||||
|
|
||||||
##
|
##
|
||||||
# Method visibilities
|
# Method visibilities
|
||||||
|
|
|
@ -789,7 +789,9 @@ class RDoc::Context < RDoc::CodeObject
|
||||||
# Finds a constant with +name+ in this context
|
# Finds a constant with +name+ in this context
|
||||||
|
|
||||||
def find_constant_named(name)
|
def find_constant_named(name)
|
||||||
@constants.find {|m| m.name == name}
|
@constants.find do |m|
|
||||||
|
m.name == name || m.full_name == name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -58,6 +58,8 @@ class RDoc::Context::Section
|
||||||
self.class === other and @title == other.title
|
self.class === other and @title == other.title
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias eql? ==
|
||||||
|
|
||||||
##
|
##
|
||||||
# Adds +comment+ to this section
|
# Adds +comment+ to this section
|
||||||
|
|
||||||
|
@ -128,6 +130,10 @@ class RDoc::Context::Section
|
||||||
"#<%s:0x%x %p>" % [self.class, object_id, title]
|
"#<%s:0x%x %p>" % [self.class, object_id, title]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def hash # :nodoc:
|
||||||
|
@title.hash
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# The files comments in this section come from
|
# The files comments in this section come from
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,21 @@ module RDoc::Encoding
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.remove_frozen_string_literal string
|
||||||
|
string =~ /\A(?:#!.*\n)?(.*\n)/
|
||||||
|
first_line = $1
|
||||||
|
|
||||||
|
if first_line =~ /\A# +frozen[-_]string[-_]literal[=:].+$/i
|
||||||
|
string.sub! first_line, ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Sets the encoding of +string+ based on the magic comment
|
# Sets the encoding of +string+ based on the magic comment
|
||||||
|
|
||||||
def self.set_encoding string
|
def self.set_encoding string
|
||||||
|
remove_frozen_string_literal string
|
||||||
|
|
||||||
string =~ /\A(?:#!.*\n)?(.*\n)/
|
string =~ /\A(?:#!.*\n)?(.*\n)/
|
||||||
|
|
||||||
first_line = $1
|
first_line = $1
|
||||||
|
@ -90,6 +101,8 @@ module RDoc::Encoding
|
||||||
|
|
||||||
string.sub! first_line, ''
|
string.sub! first_line, ''
|
||||||
|
|
||||||
|
remove_frozen_string_literal string
|
||||||
|
|
||||||
return unless Object.const_defined? :Encoding
|
return unless Object.const_defined? :Encoding
|
||||||
|
|
||||||
enc = Encoding.find name
|
enc = Encoding.find name
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
<title><%= h @title %></title>
|
<title><%= h @title %></title>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var rdoc_rel_prefix = "<%= rel_prefix %>/";
|
var rdoc_rel_prefix = "<%= asset_rel_prefix %>/";
|
||||||
|
var index_rel_prefix = "<%= rel_prefix %>/";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
|
<script src="<%= asset_rel_prefix %>/js/jquery.js"></script>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local("Source Code Pro"),
|
src: local("Source Code Pro"),
|
||||||
local("SourceCodePro-Regular"),
|
local("SourceCodePro-Regular"),
|
||||||
url("fonts/SourceCodePro-Regular.ttf") format("truetype");
|
url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local("Source Code Pro Bold"),
|
src: local("Source Code Pro Bold"),
|
||||||
local("SourceCodePro-Bold"),
|
local("SourceCodePro-Bold"),
|
||||||
url("fonts/SourceCodePro-Bold.ttf") format("truetype");
|
url("../fonts/SourceCodePro-Bold.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
src: local("Lato Light"),
|
src: local("Lato Light"),
|
||||||
local("Lato-Light"),
|
local("Lato-Light"),
|
||||||
url("fonts/Lato-Light.ttf") format("truetype");
|
url("../fonts/Lato-Light.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
src: local("Lato Light Italic"),
|
src: local("Lato Light Italic"),
|
||||||
local("Lato-LightItalic"),
|
local("Lato-LightItalic"),
|
||||||
url("fonts/Lato-LightItalic.ttf") format("truetype");
|
url("../fonts/Lato-LightItalic.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local("Lato Regular"),
|
src: local("Lato Regular"),
|
||||||
local("Lato-Regular"),
|
local("Lato-Regular"),
|
||||||
url("fonts/Lato-Regular.ttf") format("truetype");
|
url("../fonts/Lato-Regular.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local("Lato Italic"),
|
src: local("Lato Italic"),
|
||||||
local("Lato-Italic"),
|
local("Lato-Italic"),
|
||||||
url("fonts/Lato-RegularItalic.ttf") format("truetype");
|
url("../fonts/Lato-RegularItalic.ttf") format("truetype");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -59,7 +59,7 @@ function hookSearch() {
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
// TODO add relative path to <script> per-page
|
// TODO add relative path to <script> per-page
|
||||||
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
|
html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
|
||||||
if (result.params)
|
if (result.params)
|
||||||
html += '<span class="params">' + result.params + '</span>';
|
html += '<span class="params">' + result.params + '</span>';
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
|
@ -121,9 +121,9 @@ function highlightClickTarget( event ) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function loadAsync(path, success) {
|
function loadAsync(path, success, prefix) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: rdoc_rel_prefix + path,
|
url: prefix + path,
|
||||||
dataType: 'script',
|
dataType: 'script',
|
||||||
success: success,
|
success: success,
|
||||||
cache: true
|
cache: true
|
||||||
|
@ -154,8 +154,8 @@ $(document).ready( function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
|
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
|
||||||
loadAsync('js/search.js', search_success_function('search_loaded'));
|
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
|
||||||
loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
|
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
|
||||||
loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
|
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
|
||||||
});
|
});
|
||||||
|
|
|
@ -172,6 +172,7 @@ Searcher.prototype = new function() {
|
||||||
result.path = info[2];
|
result.path = info[2];
|
||||||
result.params = info[3];
|
result.params = info[3];
|
||||||
result.snippet = info[4];
|
result.snippet = info[4];
|
||||||
|
result.badge = info[6];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# coding: UTF-8
|
# coding: UTF-8
|
||||||
# frozen_string_literal: false
|
|
||||||
# :markup: markdown
|
# :markup: markdown
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -15,7 +14,7 @@
|
||||||
#
|
#
|
||||||
# data = File.read("README.md")
|
# data = File.read("README.md")
|
||||||
# formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
|
# formatter = RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
|
||||||
# html = RDoc::Markdown.parse(data).accept(@formatter)
|
# html = RDoc::Markdown.parse(data).accept(formatter)
|
||||||
#
|
#
|
||||||
# # do something with html
|
# # do something with html
|
||||||
#
|
#
|
||||||
|
@ -447,8 +446,6 @@ class RDoc::Markdown
|
||||||
else
|
else
|
||||||
return ans
|
return ans
|
||||||
end
|
end
|
||||||
|
|
||||||
return ans
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -481,8 +478,6 @@ class RDoc::Markdown
|
||||||
else
|
else
|
||||||
return ans
|
return ans
|
||||||
end
|
end
|
||||||
|
|
||||||
return ans
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -15290,7 +15285,7 @@ class RDoc::Markdown
|
||||||
self.pos = _save
|
self.pos = _save
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@result = begin;
|
@result = begin;
|
||||||
ref = [:inline, @note_order.length]
|
ref = [:inline, @note_order.length]
|
||||||
@footnotes[ref] = paragraph a
|
@footnotes[ref] = paragraph a
|
||||||
|
|
||||||
|
|
|
@ -606,18 +606,46 @@ class RDoc::Parser::C < RDoc::Parser
|
||||||
RDoc::Comment.new comment, @top_level
|
RDoc::Comment.new comment, @top_level
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Generate a Ruby-method table
|
||||||
|
|
||||||
|
def gen_body_table file_content
|
||||||
|
table = {}
|
||||||
|
file_content.scan(%r{
|
||||||
|
((?>/\*.*?\*/\s*)?)
|
||||||
|
((?:(?:\w+)\s+)?
|
||||||
|
(?:intern\s+)?VALUE\s+(\w+)
|
||||||
|
\s*(?:\([^)]*\))(?:[^;]|$))
|
||||||
|
| ((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+(\w+)\s+(\w+))
|
||||||
|
| ^\s*\#\s*define\s+(\w+)\s+(\w+)
|
||||||
|
}xm) do
|
||||||
|
case
|
||||||
|
when $1
|
||||||
|
table[$3] = [:func_def, $1, $2, $~.offset(2)] if !table[$3] || table[$3][0] != :func_def
|
||||||
|
when $4
|
||||||
|
table[$6] = [:macro_def, $4, $5, $~.offset(5), $7] if !table[$6] || table[$6][0] == :macro_alias
|
||||||
|
when $8
|
||||||
|
table[$8] ||= [:macro_alias, $9]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Find the C code corresponding to a Ruby method
|
# Find the C code corresponding to a Ruby method
|
||||||
|
|
||||||
def find_body class_name, meth_name, meth_obj, file_content, quiet = false
|
def find_body class_name, meth_name, meth_obj, file_content, quiet = false
|
||||||
case file_content
|
if file_content
|
||||||
when %r%((?>/\*.*?\*/\s*)?)
|
@body_table ||= {}
|
||||||
((?:(?:\w+)\s+)?
|
@body_table[file_content] ||= gen_body_table file_content
|
||||||
(?:intern\s+)?VALUE\s+#{meth_name}
|
type, *args = @body_table[file_content][meth_name]
|
||||||
\s*(\([^)]*\))([^;]|$))%xm then
|
end
|
||||||
comment = RDoc::Comment.new $1, @top_level
|
|
||||||
body = $2
|
case type
|
||||||
offset, = $~.offset(2)
|
when :func_def
|
||||||
|
comment = RDoc::Comment.new args[0], @top_level
|
||||||
|
body = args[1]
|
||||||
|
offset, = args[2]
|
||||||
|
|
||||||
comment.remove_private if comment
|
comment.remove_private if comment
|
||||||
|
|
||||||
|
@ -646,12 +674,12 @@ class RDoc::Parser::C < RDoc::Parser
|
||||||
meth_obj.line = file_content[0, offset].count("\n") + 1
|
meth_obj.line = file_content[0, offset].count("\n") + 1
|
||||||
|
|
||||||
body
|
body
|
||||||
when %r%((?>/\*.*?\*/\s*))^\s*(\#\s*define\s+#{meth_name}\s+(\w+))%m then
|
when :macro_def
|
||||||
comment = RDoc::Comment.new $1, @top_level
|
comment = RDoc::Comment.new args[0], @top_level
|
||||||
body = $2
|
body = args[1]
|
||||||
offset = $~.offset(2).first
|
offset, = args[2]
|
||||||
|
|
||||||
find_body class_name, $3, meth_obj, file_content, true
|
find_body class_name, args[3], meth_obj, file_content, true
|
||||||
|
|
||||||
comment.normalize
|
comment.normalize
|
||||||
find_modifiers comment, meth_obj
|
find_modifiers comment, meth_obj
|
||||||
|
@ -665,11 +693,11 @@ class RDoc::Parser::C < RDoc::Parser
|
||||||
meth_obj.line = file_content[0, offset].count("\n") + 1
|
meth_obj.line = file_content[0, offset].count("\n") + 1
|
||||||
|
|
||||||
body
|
body
|
||||||
when %r%^\s*\#\s*define\s+#{meth_name}\s+(\w+)%m then
|
when :macro_alias
|
||||||
# with no comment we hope the aliased definition has it and use it's
|
# with no comment we hope the aliased definition has it and use it's
|
||||||
# definition
|
# definition
|
||||||
|
|
||||||
body = find_body(class_name, $1, meth_obj, file_content, true)
|
body = find_body(class_name, args[0], meth_obj, file_content, true)
|
||||||
|
|
||||||
return body if body
|
return body if body
|
||||||
|
|
||||||
|
@ -764,28 +792,42 @@ class RDoc::Parser::C < RDoc::Parser
|
||||||
class_mod.add_comment comment, @top_level
|
class_mod.add_comment comment, @top_level
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Generate a const table
|
||||||
|
|
||||||
|
def gen_const_table file_content
|
||||||
|
table = {}
|
||||||
|
@content.scan(%r{
|
||||||
|
((?>^\s*/\*.*?\*/\s+))
|
||||||
|
rb_define_(\w+)\((?:\s*(?:\w+),)?\s*
|
||||||
|
"(\w+)"\s*,
|
||||||
|
.*?\)\s*;
|
||||||
|
| Document-(?:const|global|variable):\s
|
||||||
|
((?:\w+::)*\w+)
|
||||||
|
\s*?\n((?>.*?\*/))
|
||||||
|
}mxi) do
|
||||||
|
case
|
||||||
|
when $1 then table[[$2, $3]] = $1
|
||||||
|
when $4 then table[$4] = "/*\n" + $5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Finds a comment matching +type+ and +const_name+ either above the
|
# Finds a comment matching +type+ and +const_name+ either above the
|
||||||
# comment or in the matching Document- section.
|
# comment or in the matching Document- section.
|
||||||
|
|
||||||
def find_const_comment(type, const_name, class_name = nil)
|
def find_const_comment(type, const_name, class_name = nil)
|
||||||
comment = if @content =~ %r%((?>^\s*/\*.*?\*/\s+))
|
@const_table ||= {}
|
||||||
rb_define_#{type}\((?:\s*(\w+),)?\s*
|
@const_table[@content] ||= gen_const_table @content
|
||||||
"#{const_name}"\s*,
|
table = @const_table[@content]
|
||||||
.*?\)\s*;%xmi then
|
|
||||||
$1
|
comment =
|
||||||
elsif class_name and
|
table[[type, const_name]] ||
|
||||||
@content =~ %r%Document-(?:const|global|variable):\s
|
(class_name && table[class_name + "::" + const_name]) ||
|
||||||
#{class_name}::#{const_name}
|
table[const_name] ||
|
||||||
\s*?\n((?>.*?\*/))%xm then
|
''
|
||||||
"/*\n#{$1}"
|
|
||||||
elsif @content =~ %r%Document-(?:const|global|variable):
|
|
||||||
\s#{const_name}
|
|
||||||
\s*?\n((?>.*?\*/))%xm then
|
|
||||||
"/*\n#{$1}"
|
|
||||||
else
|
|
||||||
''
|
|
||||||
end
|
|
||||||
|
|
||||||
RDoc::Comment.new comment, @top_level
|
RDoc::Comment.new comment, @top_level
|
||||||
end
|
end
|
||||||
|
@ -841,7 +883,7 @@ class RDoc::Parser::C < RDoc::Parser
|
||||||
comment = find_attr_comment var_name, attr_name
|
comment = find_attr_comment var_name, attr_name
|
||||||
comment.normalize
|
comment.normalize
|
||||||
|
|
||||||
name = attr_name.gsub(/rb_intern\("([^"]+)"\)/, '\1')
|
name = attr_name.gsub(/rb_intern(?:_const)?\("([^"]+)"\)/, '\1')
|
||||||
|
|
||||||
attr = RDoc::Attr.new '', name, rw, comment
|
attr = RDoc::Attr.new '', name, rw, comment
|
||||||
|
|
||||||
|
|
|
@ -102,9 +102,11 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
||||||
# Groups +entries+ by date.
|
# Groups +entries+ by date.
|
||||||
|
|
||||||
def group_entries entries
|
def group_entries entries
|
||||||
|
@time_cache ||= {}
|
||||||
entries.group_by do |title, _|
|
entries.group_by do |title, _|
|
||||||
begin
|
begin
|
||||||
Time.parse(title).strftime '%Y-%m-%d'
|
time = @time_cache[title]
|
||||||
|
(time || Time.parse(title)).strftime '%Y-%m-%d'
|
||||||
rescue NoMethodError, ArgumentError
|
rescue NoMethodError, ArgumentError
|
||||||
time, = title.split ' ', 2
|
time, = title.split ' ', 2
|
||||||
Time.parse(time).strftime '%Y-%m-%d'
|
Time.parse(time).strftime '%Y-%m-%d'
|
||||||
|
@ -128,6 +130,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
||||||
# 'README.EXT.ja: ditto']]
|
# 'README.EXT.ja: ditto']]
|
||||||
|
|
||||||
def parse_entries
|
def parse_entries
|
||||||
|
@time_cache ||= {}
|
||||||
entries = []
|
entries = []
|
||||||
entry_name = nil
|
entry_name = nil
|
||||||
entry_body = []
|
entry_body = []
|
||||||
|
@ -143,6 +146,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
||||||
|
|
||||||
begin
|
begin
|
||||||
time = Time.parse entry_name
|
time = Time.parse entry_name
|
||||||
|
@time_cache[entry_name] = time
|
||||||
# HACK Ruby 1.8 does not raise ArgumentError for Time.parse "Other"
|
# HACK Ruby 1.8 does not raise ArgumentError for Time.parse "Other"
|
||||||
entry_name = nil unless entry_name =~ /#{time.year}/
|
entry_name = nil unless entry_name =~ /#{time.year}/
|
||||||
rescue NoMethodError
|
rescue NoMethodError
|
||||||
|
@ -185,6 +189,7 @@ class RDoc::Parser::ChangeLog < RDoc::Parser
|
||||||
# Converts the ChangeLog into an RDoc::Markup::Document
|
# Converts the ChangeLog into an RDoc::Markup::Document
|
||||||
|
|
||||||
def scan
|
def scan
|
||||||
|
@time_cache = {}
|
||||||
entries = parse_entries
|
entries = parse_entries
|
||||||
grouped_entries = group_entries entries
|
grouped_entries = group_entries entries
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# frozen_string_literal: false
|
|
||||||
#
|
#
|
||||||
# DO NOT MODIFY!!!!
|
# DO NOT MODIFY!!!!
|
||||||
# This file is automatically generated by Racc 1.4.12
|
# This file is automatically generated by Racc 1.4.14
|
||||||
# from Racc grammar file "".
|
# from Racc grammer file "".
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'racc/parser.rb'
|
require 'racc/parser.rb'
|
||||||
|
@ -419,53 +418,53 @@ end
|
||||||
##### State transition tables begin ###
|
##### State transition tables begin ###
|
||||||
|
|
||||||
racc_action_table = [
|
racc_action_table = [
|
||||||
34, 35, 30, 33, 14, 73, 38, 33, 76, 15,
|
34, 35, 30, 33, 40, 34, 35, 30, 33, 40,
|
||||||
88, 34, 35, 30, 33, 40, 34, 35, 30, 33,
|
65, 34, 35, 30, 33, 14, 73, 14, 54, 76,
|
||||||
40, 65, 34, 35, 30, 33, 14, 73, 77, 14,
|
15, 88, 34, 35, 30, 33, 14, 73, 77, 33,
|
||||||
54, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
54, 15, 34, 35, 30, 33, 14, 73, 81, 38,
|
||||||
12, 15, 34, 35, 30, 33, 14, 73, 81, 54,
|
38, 15, 34, 35, 30, 33, 14, 73, 40, 36,
|
||||||
38, 15, 34, 35, 30, 33, 14, 73, 40, 67,
|
83, 15, 34, 35, 30, 33, 54, 47, 30, 35,
|
||||||
83, 15, 34, 35, 30, 33, 14, 73, 54, 30,
|
34, 15, 34, 35, 30, 33, 14, 73, 38, 67,
|
||||||
35, 15, 34, 35, 30, 33, 34, 47, 36, 14,
|
59, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
||||||
59, 15, 34, 35, 30, 33, 14, 73, 38, nil,
|
12, 15, 34, 35, 30, 33, 14, 73, 14, nil,
|
||||||
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
||||||
nil, 15, 34, 35, 30, 33, nil, 47, nil, nil,
|
nil, 15, 34, 35, 30, 33, nil, 47, nil, nil,
|
||||||
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
||||||
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
||||||
nil, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
nil, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
||||||
12, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
12, 15, 34, 35, 30, 33, 14, 73, 61, 63,
|
||||||
nil, 15, 34, 35, 30, 33, 14, 73, 61, 63,
|
nil, 15, 14, 62, 60, 61, 63, 79, 61, 63,
|
||||||
nil, 15, nil, 62, 60, 61, 63, 61, 63, 14,
|
62, 87, nil, 62, 34, 35, 30, 33 ]
|
||||||
62, 87, 62, nil, 79, 34, 35, 30, 33 ]
|
|
||||||
|
|
||||||
racc_action_check = [
|
racc_action_check = [
|
||||||
86, 86, 86, 86, 86, 86, 57, 31, 49, 86,
|
41, 41, 41, 41, 41, 15, 15, 15, 15, 15,
|
||||||
86, 41, 41, 41, 41, 41, 15, 15, 15, 15,
|
41, 86, 86, 86, 86, 86, 86, 34, 33, 49,
|
||||||
15, 41, 45, 45, 45, 45, 45, 45, 51, 34,
|
86, 86, 85, 85, 85, 85, 85, 85, 51, 31,
|
||||||
54, 45, 0, 0, 0, 0, 0, 0, 0, 0,
|
54, 85, 79, 79, 79, 79, 79, 79, 56, 57,
|
||||||
0, 0, 85, 85, 85, 85, 85, 85, 56, 33,
|
58, 79, 78, 78, 78, 78, 78, 78, 62, 1,
|
||||||
58, 85, 79, 79, 79, 79, 79, 79, 62, 44,
|
66, 78, 24, 24, 24, 24, 30, 24, 28, 25,
|
||||||
66, 79, 78, 78, 78, 78, 78, 78, 30, 28,
|
22, 24, 75, 75, 75, 75, 75, 75, 13, 44,
|
||||||
25, 78, 24, 24, 24, 24, 22, 24, 1, 35,
|
36, 75, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
36, 24, 75, 75, 75, 75, 75, 75, 13, nil,
|
2, 2, 46, 46, 46, 46, 46, 46, 35, nil,
|
||||||
nil, 75, 27, 27, 27, 27, nil, 27, nil, nil,
|
nil, 46, 45, 45, 45, 45, 45, 45, nil, nil,
|
||||||
|
nil, 45, 27, 27, 27, 27, nil, 27, nil, nil,
|
||||||
nil, 27, 74, 74, 74, 74, 74, 74, nil, nil,
|
nil, 27, 74, 74, 74, 74, 74, 74, nil, nil,
|
||||||
nil, 74, 68, 68, 68, 68, 68, 68, nil, nil,
|
nil, 74, 68, 68, 68, 68, 68, 68, nil, nil,
|
||||||
nil, 68, 2, 2, 2, 2, 2, 2, 2, 2,
|
nil, 68, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
2, 2, 46, 46, 46, 46, 46, 46, nil, nil,
|
0, 0, 47, 47, 47, 47, 47, 47, 39, 39,
|
||||||
nil, 46, 47, 47, 47, 47, 47, 47, 39, 39,
|
nil, 47, 52, 39, 39, 82, 82, 52, 64, 64,
|
||||||
nil, 47, nil, 39, 39, 82, 82, 64, 64, 52,
|
82, 82, nil, 64, 20, 20, 20, 20 ]
|
||||||
82, 82, 64, nil, 52, 20, 20, 20, 20 ]
|
|
||||||
|
|
||||||
racc_action_pointer = [
|
racc_action_pointer = [
|
||||||
29, 78, 119, nil, nil, nil, nil, nil, nil, nil,
|
129, 49, 69, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, nil, 81, nil, 13, nil, nil, nil, nil,
|
nil, nil, nil, 61, nil, 2, nil, nil, nil, nil,
|
||||||
162, nil, 73, nil, 69, 66, nil, 89, 64, nil,
|
161, nil, 57, nil, 49, 55, nil, 99, 53, nil,
|
||||||
60, 1, nil, 41, 22, 72, 80, nil, nil, 141,
|
48, 23, nil, 10, 10, 81, 70, nil, nil, 141,
|
||||||
nil, 8, nil, nil, 46, 19, 129, 139, nil, -5,
|
nil, -3, nil, nil, 56, 89, 79, 139, nil, 6,
|
||||||
nil, 15, 152, nil, 22, nil, 35, -1, 43, nil,
|
nil, 15, 145, nil, 22, nil, 25, 32, 33, nil,
|
||||||
nil, nil, 51, nil, 150, nil, 47, nil, 109, nil,
|
nil, nil, 41, nil, 151, nil, 37, nil, 119, nil,
|
||||||
nil, nil, nil, nil, 99, 79, nil, nil, 59, 49,
|
nil, nil, nil, nil, 109, 59, nil, nil, 39, 29,
|
||||||
nil, nil, 148, nil, nil, 39, -3, nil, nil ]
|
nil, nil, 148, nil, nil, 19, 8, nil, nil ]
|
||||||
|
|
||||||
racc_action_default = [
|
racc_action_default = [
|
||||||
-2, -73, -1, -4, -5, -6, -7, -8, -9, -10,
|
-2, -73, -1, -4, -5, -6, -7, -8, -9, -10,
|
||||||
|
@ -479,26 +478,26 @@ racc_action_default = [
|
||||||
-60, -47, -73, -29, -52, -48, -73, -20, -50 ]
|
-60, -47, -73, -29, -52, -48, -73, -20, -50 ]
|
||||||
|
|
||||||
racc_goto_table = [
|
racc_goto_table = [
|
||||||
4, 39, 4, 68, 74, 75, 5, 6, 5, 6,
|
4, 39, 4, 68, 74, 75, 6, 5, 6, 5,
|
||||||
51, 42, 44, 56, 3, 49, 37, 57, 58, 41,
|
44, 42, 51, 49, 3, 56, 37, 57, 58, 80,
|
||||||
43, 48, 84, 50, 66, 55, 1, 64, 84, 84,
|
2, 66, 84, 41, 43, 48, 50, 64, 84, 84,
|
||||||
45, 46, 42, 45, 46, 2, 85, 86, 80, 84,
|
46, 45, 42, 46, 45, 55, 85, 86, 1, 84,
|
||||||
84, nil, nil, nil, nil, nil, nil, nil, 82, nil,
|
84, nil, nil, nil, nil, nil, nil, nil, 82, nil,
|
||||||
nil, nil, 78 ]
|
nil, nil, 78 ]
|
||||||
|
|
||||||
racc_goto_check = [
|
racc_goto_check = [
|
||||||
4, 10, 4, 31, 31, 31, 5, 6, 5, 6,
|
4, 10, 4, 31, 31, 31, 6, 5, 6, 5,
|
||||||
27, 12, 21, 27, 3, 21, 3, 9, 9, 17,
|
21, 12, 27, 21, 3, 27, 3, 9, 9, 33,
|
||||||
19, 23, 32, 26, 11, 29, 1, 10, 32, 32,
|
2, 11, 32, 17, 19, 23, 26, 10, 32, 32,
|
||||||
5, 6, 12, 5, 6, 2, 31, 31, 33, 32,
|
6, 5, 12, 6, 5, 29, 31, 31, 1, 32,
|
||||||
32, nil, nil, nil, nil, nil, nil, nil, 10, nil,
|
32, nil, nil, nil, nil, nil, nil, nil, 10, nil,
|
||||||
nil, nil, 4 ]
|
nil, nil, 4 ]
|
||||||
|
|
||||||
racc_goto_pointer = [
|
racc_goto_pointer = [
|
||||||
nil, 26, 35, 14, 0, 6, 7, nil, nil, -17,
|
nil, 38, 20, 14, 0, 7, 6, nil, nil, -17,
|
||||||
-14, -17, -9, nil, nil, nil, nil, 4, nil, -2,
|
-14, -20, -9, nil, nil, nil, nil, 8, nil, 2,
|
||||||
nil, -12, nil, -4, nil, nil, -5, -20, nil, -6,
|
nil, -14, nil, 0, nil, nil, -2, -18, nil, 4,
|
||||||
nil, -42, -46, -16 ]
|
nil, -42, -46, -35 ]
|
||||||
|
|
||||||
racc_goto_default = [
|
racc_goto_default = [
|
||||||
nil, nil, nil, nil, 70, 71, 72, 7, 8, 13,
|
nil, nil, nil, nil, 70, 71, 72, 7, 8, 13,
|
||||||
|
@ -678,54 +677,54 @@ Racc_debug_parser = false
|
||||||
# reduce 0 omitted
|
# reduce 0 omitted
|
||||||
|
|
||||||
def _reduce_1(val, _values, result)
|
def _reduce_1(val, _values, result)
|
||||||
result = RDoc::Markup::Document.new(*val[0])
|
result = RDoc::Markup::Document.new(*val[0])
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_2(val, _values, result)
|
def _reduce_2(val, _values, result)
|
||||||
raise ParseError, "file empty"
|
raise ParseError, "file empty"
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_3(val, _values, result)
|
def _reduce_3(val, _values, result)
|
||||||
result = val[0].concat val[1]
|
result = val[0].concat val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_4(val, _values, result)
|
def _reduce_4(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_5(val, _values, result)
|
def _reduce_5(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_6(val, _values, result)
|
def _reduce_6(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 7 omitted
|
# reduce 7 omitted
|
||||||
|
|
||||||
def _reduce_8(val, _values, result)
|
def _reduce_8(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_9(val, _values, result)
|
def _reduce_9(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_10(val, _values, result)
|
def _reduce_10(val, _values, result)
|
||||||
result = [RDoc::Markup::BlankLine.new]
|
result = [RDoc::Markup::BlankLine.new]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_11(val, _values, result)
|
def _reduce_11(val, _values, result)
|
||||||
result = val[0].parts
|
result = val[0].parts
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -733,30 +732,30 @@ def _reduce_12(val, _values, result)
|
||||||
# val[0] is like [level, title]
|
# val[0] is like [level, title]
|
||||||
title = @inline_parser.parse(val[0][1])
|
title = @inline_parser.parse(val[0][1])
|
||||||
result = RDoc::Markup::Heading.new(val[0][0], title)
|
result = RDoc::Markup::Heading.new(val[0][0], title)
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_13(val, _values, result)
|
def _reduce_13(val, _values, result)
|
||||||
result = RDoc::Markup::Include.new val[0], @include_path
|
result = RDoc::Markup::Include.new val[0], @include_path
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_14(val, _values, result)
|
def _reduce_14(val, _values, result)
|
||||||
# val[0] is Array of String
|
# val[0] is Array of String
|
||||||
result = paragraph val[0]
|
result = paragraph val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_15(val, _values, result)
|
def _reduce_15(val, _values, result)
|
||||||
result << val[1].rstrip
|
result << val[1].rstrip
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_16(val, _values, result)
|
def _reduce_16(val, _values, result)
|
||||||
result = [val[0].rstrip]
|
result = [val[0].rstrip]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -767,7 +766,7 @@ def _reduce_17(val, _values, result)
|
||||||
|
|
||||||
# imform to lexer.
|
# imform to lexer.
|
||||||
@in_verbatim = false
|
@in_verbatim = false
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -778,25 +777,25 @@ def _reduce_18(val, _values, result)
|
||||||
|
|
||||||
# imform to lexer.
|
# imform to lexer.
|
||||||
@in_verbatim = false
|
@in_verbatim = false
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_19(val, _values, result)
|
def _reduce_19(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_20(val, _values, result)
|
def _reduce_20(val, _values, result)
|
||||||
result.concat val[2]
|
result.concat val[2]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_21(val, _values, result)
|
def _reduce_21(val, _values, result)
|
||||||
result << "\n"
|
result << "\n"
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -804,7 +803,7 @@ def _reduce_22(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
# inform to lexer.
|
# inform to lexer.
|
||||||
@in_verbatim = true
|
@in_verbatim = true
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -818,89 +817,89 @@ end
|
||||||
|
|
||||||
def _reduce_27(val, _values, result)
|
def _reduce_27(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_28(val, _values, result)
|
def _reduce_28(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_29(val, _values, result)
|
def _reduce_29(val, _values, result)
|
||||||
result = val[1].push(val[2])
|
result = val[1].push(val[2])
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_30(val, _values, result)
|
def _reduce_30(val, _values, result)
|
||||||
result = val[0] << val[1]
|
result = val[0] << val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_31(val, _values, result)
|
def _reduce_31(val, _values, result)
|
||||||
result = [val[0]]
|
result = [val[0]]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_32(val, _values, result)
|
def _reduce_32(val, _values, result)
|
||||||
result = RDoc::Markup::List.new :BULLET, *val[0]
|
result = RDoc::Markup::List.new :BULLET, *val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_33(val, _values, result)
|
def _reduce_33(val, _values, result)
|
||||||
result.push(val[1])
|
result.push(val[1])
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_34(val, _values, result)
|
def _reduce_34(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_35(val, _values, result)
|
def _reduce_35(val, _values, result)
|
||||||
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_36(val, _values, result)
|
def _reduce_36(val, _values, result)
|
||||||
result = RDoc::Markup::List.new :NUMBER, *val[0]
|
result = RDoc::Markup::List.new :NUMBER, *val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_37(val, _values, result)
|
def _reduce_37(val, _values, result)
|
||||||
result.push(val[1])
|
result.push(val[1])
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_38(val, _values, result)
|
def _reduce_38(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_39(val, _values, result)
|
def _reduce_39(val, _values, result)
|
||||||
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_40(val, _values, result)
|
def _reduce_40(val, _values, result)
|
||||||
result = RDoc::Markup::List.new :NOTE, *val[0]
|
result = RDoc::Markup::List.new :NOTE, *val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_41(val, _values, result)
|
def _reduce_41(val, _values, result)
|
||||||
result.push(val[1])
|
result.push(val[1])
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_42(val, _values, result)
|
def _reduce_42(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -908,77 +907,77 @@ def _reduce_43(val, _values, result)
|
||||||
term = @inline_parser.parse val[0].strip
|
term = @inline_parser.parse val[0].strip
|
||||||
|
|
||||||
result = RDoc::Markup::ListItem.new term, *val[1]
|
result = RDoc::Markup::ListItem.new term, *val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_44(val, _values, result)
|
def _reduce_44(val, _values, result)
|
||||||
result = RDoc::Markup::List.new :LABEL, *val[0]
|
result = RDoc::Markup::List.new :LABEL, *val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_45(val, _values, result)
|
def _reduce_45(val, _values, result)
|
||||||
result.push(val[1])
|
result.push(val[1])
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_46(val, _values, result)
|
def _reduce_46(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_47(val, _values, result)
|
def _reduce_47(val, _values, result)
|
||||||
result = RDoc::Markup::ListItem.new "<tt>#{val[0].strip}</tt>", *val[1]
|
result = RDoc::Markup::ListItem.new "<tt>#{val[0].strip}</tt>", *val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_48(val, _values, result)
|
def _reduce_48(val, _values, result)
|
||||||
result = [val[1]].concat(val[2])
|
result = [val[1]].concat(val[2])
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_49(val, _values, result)
|
def _reduce_49(val, _values, result)
|
||||||
result = [val[1]]
|
result = [val[1]]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_50(val, _values, result)
|
def _reduce_50(val, _values, result)
|
||||||
result = val[2]
|
result = val[2]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_51(val, _values, result)
|
def _reduce_51(val, _values, result)
|
||||||
result = []
|
result = []
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_52(val, _values, result)
|
def _reduce_52(val, _values, result)
|
||||||
result.concat val[1]
|
result.concat val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 53 omitted
|
# reduce 53 omitted
|
||||||
|
|
||||||
def _reduce_54(val, _values, result)
|
def _reduce_54(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_55(val, _values, result)
|
def _reduce_55(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 56 omitted
|
# reduce 56 omitted
|
||||||
|
|
||||||
def _reduce_57(val, _values, result)
|
def _reduce_57(val, _values, result)
|
||||||
result = []
|
result = []
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -992,58 +991,58 @@ end
|
||||||
|
|
||||||
def _reduce_62(val, _values, result)
|
def _reduce_62(val, _values, result)
|
||||||
result = paragraph [val[0]].concat(val[1])
|
result = paragraph [val[0]].concat(val[1])
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_63(val, _values, result)
|
def _reduce_63(val, _values, result)
|
||||||
result = paragraph [val[0]]
|
result = paragraph [val[0]]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_64(val, _values, result)
|
def _reduce_64(val, _values, result)
|
||||||
result = paragraph [val[0]].concat(val[1])
|
result = paragraph [val[0]].concat(val[1])
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_65(val, _values, result)
|
def _reduce_65(val, _values, result)
|
||||||
result = paragraph [val[0]]
|
result = paragraph [val[0]]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_66(val, _values, result)
|
def _reduce_66(val, _values, result)
|
||||||
result = [val[0]].concat(val[1])
|
result = [val[0]].concat(val[1])
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_67(val, _values, result)
|
def _reduce_67(val, _values, result)
|
||||||
result.concat val[1]
|
result.concat val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_68(val, _values, result)
|
def _reduce_68(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_69(val, _values, result)
|
def _reduce_69(val, _values, result)
|
||||||
result = val
|
result = val
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 70 omitted
|
# reduce 70 omitted
|
||||||
|
|
||||||
def _reduce_71(val, _values, result)
|
def _reduce_71(val, _values, result)
|
||||||
result = []
|
result = []
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_72(val, _values, result)
|
def _reduce_72(val, _values, result)
|
||||||
result = []
|
result = []
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# frozen_string_literal: false
|
|
||||||
#
|
#
|
||||||
# DO NOT MODIFY!!!!
|
# DO NOT MODIFY!!!!
|
||||||
# This file is automatically generated by Racc 1.4.12
|
# This file is automatically generated by Racc 1.4.14
|
||||||
# from Racc grammar file "".
|
# from Racc grammer file "".
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'racc/parser.rb'
|
require 'racc/parser.rb'
|
||||||
|
@ -244,152 +243,152 @@ end
|
||||||
##### State transition tables begin ###
|
##### State transition tables begin ###
|
||||||
|
|
||||||
racc_action_table = [
|
racc_action_table = [
|
||||||
63, 64, 65, 153, 81, 62, 76, 78, 79, 87,
|
104, 103, 102, 100, 101, 99, 115, 116, 117, 86,
|
||||||
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
|
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
|
||||||
77, 80, 152, 63, 64, 65, 61, 81, 62, 76,
|
164, 118, 119, 104, 103, 102, 100, 101, 99, 115,
|
||||||
78, 79, 124, 66, 67, 68, 69, 70, 71, 72,
|
116, 117, 175, 105, 106, 107, 108, 109, 110, 111,
|
||||||
73, 74, 75, 77, 80, 149, 104, 103, 102, 100,
|
112, 113, 114, 85, 118, 119, 63, 64, 65, 61,
|
||||||
101, 99, 115, 116, 117, 164, 105, 106, 107, 108,
|
81, 62, 76, 78, 79, 84, 66, 67, 68, 69,
|
||||||
109, 110, 111, 112, 113, 114, 96, 118, 119, 104,
|
70, 71, 72, 73, 74, 75, 77, 80, 149, 104,
|
||||||
103, 102, 100, 101, 99, 115, 116, 117, 89, 105,
|
103, 102, 100, 101, 99, 115, 116, 117, 29, 105,
|
||||||
106, 107, 108, 109, 110, 111, 112, 113, 114, 88,
|
106, 107, 108, 109, 110, 111, 112, 113, 114, 173,
|
||||||
118, 119, 104, 103, 102, 100, 101, 99, 115, 116,
|
118, 119, 104, 103, 102, 100, 101, 99, 115, 116,
|
||||||
117, 161, 105, 106, 107, 108, 109, 110, 111, 112,
|
117, 137, 105, 106, 107, 108, 109, 110, 111, 112,
|
||||||
113, 114, 86, 118, 119, 104, 103, 102, 100, 101,
|
113, 114, 177, 118, 119, 63, 64, 65, 153, 81,
|
||||||
99, 115, 116, 117, 85, 105, 106, 107, 108, 109,
|
62, 76, 78, 79, 148, 66, 67, 68, 69, 70,
|
||||||
110, 111, 112, 113, 114, 137, 118, 119, 63, 64,
|
71, 72, 73, 74, 75, 77, 80, 152, 22, 23,
|
||||||
65, 61, 81, 62, 76, 78, 79, 84, 66, 67,
|
24, 25, 26, 21, 18, 19, 176, 177, 13, 124,
|
||||||
68, 69, 70, 71, 72, 73, 74, 75, 77, 80,
|
14, 96, 15, 89, 16, 154, 17, 88, 137, 20,
|
||||||
22, 23, 24, 25, 26, 21, 18, 19, 176, 177,
|
22, 23, 24, 25, 26, 21, 18, 19, 87, 161,
|
||||||
13, 173, 14, 154, 15, 175, 16, 137, 17, 42,
|
13, nil, 14, nil, 15, nil, 16, nil, 17, 42,
|
||||||
148, 20, 54, 38, 53, 55, 56, 57, 29, 13,
|
nil, 20, 54, 38, 53, 55, 56, 57, nil, 13,
|
||||||
177, 14, nil, 15, nil, 16, nil, 17, nil, nil,
|
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
|
||||||
20, 22, 23, 24, 25, 26, 21, 18, 19, nil,
|
20, 22, 23, 24, 25, 26, 21, 18, 19, nil,
|
||||||
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
|
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
|
||||||
nil, nil, 20, 22, 23, 24, 25, 26, 21, 18,
|
nil, nil, 20, 63, 64, 65, 61, 81, 62, 76,
|
||||||
19, nil, nil, 13, nil, 14, nil, 15, nil, 16,
|
78, 79, nil, 66, 67, 68, 69, 70, 71, 72,
|
||||||
nil, 17, nil, nil, 20, 22, 23, 24, 25, 26,
|
73, 74, 75, 77, 80, 145, nil, nil, 54, 133,
|
||||||
21, 18, 19, nil, nil, 13, nil, 14, nil, 15,
|
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
|
||||||
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
|
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
|
||||||
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
||||||
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
|
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
|
||||||
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
|
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
|
||||||
15, nil, 16, nil, 17, 145, nil, 20, 54, 133,
|
15, nil, 16, nil, 17, 145, nil, 20, 54, 133,
|
||||||
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
|
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
|
||||||
nil, 16, nil, 17, nil, nil, 20, 22, 23, 24,
|
nil, 16, nil, 17, 145, nil, 20, 54, 133, 53,
|
||||||
25, 26, 21, 18, 19, nil, nil, 13, nil, 14,
|
|
||||||
nil, 15, nil, 16, nil, 17, 145, nil, 20, 54,
|
|
||||||
133, 53, 55, 56, 57, nil, 13, nil, 14, nil,
|
|
||||||
15, nil, 16, nil, 17, 145, nil, 20, 54, 133,
|
|
||||||
53, 55, 56, 57, nil, 13, nil, 14, nil, 15,
|
|
||||||
nil, 16, nil, 17, nil, nil, 20, 22, 23, 24,
|
|
||||||
25, 26, 21, 18, 19, nil, nil, 13, nil, 14,
|
|
||||||
nil, 15, nil, 16, 122, 17, nil, 54, 20, 53,
|
|
||||||
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
55, 56, 57, nil, 13, nil, 14, nil, 15, nil,
|
||||||
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
|
16, nil, 17, nil, nil, 20, 22, 23, 24, 25,
|
||||||
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
|
26, 21, 18, 19, nil, nil, 13, nil, 14, nil,
|
||||||
15, nil, 16, nil, 17, nil, nil, 20, 135, 136,
|
15, nil, 16, nil, 17, nil, nil, 20, 22, 23,
|
||||||
54, 133, 53, 55, 56, 57, nil, 13, nil, 14,
|
24, 25, 26, 21, 18, 19, nil, nil, 13, nil,
|
||||||
nil, 15, nil, 16, nil, 17, nil, nil, 20, 135,
|
|
||||||
136, 54, 133, 53, 55, 56, 57, nil, 13, nil,
|
|
||||||
14, nil, 15, nil, 16, nil, 17, nil, nil, 20,
|
14, nil, 15, nil, 16, nil, 17, nil, nil, 20,
|
||||||
135, 136, 54, 133, 53, 55, 56, 57, nil, 13,
|
22, 23, 24, 25, 26, 21, 18, 19, nil, nil,
|
||||||
|
13, nil, 14, nil, 15, nil, 16, nil, 17, nil,
|
||||||
|
nil, 20, 22, 23, 24, 25, 26, 21, 18, 19,
|
||||||
|
nil, nil, 13, nil, 14, nil, 15, nil, 16, 122,
|
||||||
|
17, nil, 54, 20, 53, 55, 56, 57, nil, 13,
|
||||||
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
|
nil, 14, nil, 15, nil, 16, nil, 17, nil, nil,
|
||||||
20, 172, 135, 136, 54, 133, 53, 55, 56, 57,
|
20, 135, 136, 54, 133, 53, 55, 56, 57, nil,
|
||||||
165, 135, 136, 54, 133, 53, 55, 56, 57, 95,
|
13, nil, 14, nil, 15, nil, 16, nil, 17, nil,
|
||||||
nil, nil, 54, 91, 53, 55, 56, 57, 174, 135,
|
nil, 20, 135, 136, 54, 133, 53, 55, 56, 57,
|
||||||
136, 54, 133, 53, 55, 56, 57, 158, nil, nil,
|
nil, 13, nil, 14, nil, 15, nil, 16, nil, 17,
|
||||||
54, nil, 53, 55, 56, 57, 178, 135, 136, 54,
|
nil, nil, 20, 135, 136, 54, 133, 53, 55, 56,
|
||||||
|
57, nil, 13, nil, 14, nil, 15, nil, 16, 158,
|
||||||
|
17, nil, 54, 20, 53, 55, 56, 57, 95, nil,
|
||||||
|
nil, 54, 91, 53, 55, 56, 57, 145, nil, nil,
|
||||||
|
54, 133, 53, 55, 56, 57, 165, 135, 136, 54,
|
||||||
133, 53, 55, 56, 57, 145, nil, nil, 54, 133,
|
133, 53, 55, 56, 57, 145, nil, nil, 54, 133,
|
||||||
53, 55, 56, 57, 145, nil, nil, 54, 133, 53,
|
53, 55, 56, 57, 172, 135, 136, 54, 133, 53,
|
||||||
55, 56, 57, 135, 136, 54, 133, 53, 55, 56,
|
55, 56, 57, 174, 135, 136, 54, 133, 53, 55,
|
||||||
|
56, 57, 178, 135, 136, 54, 133, 53, 55, 56,
|
||||||
57, 135, 136, 54, 133, 53, 55, 56, 57, 135,
|
57, 135, 136, 54, 133, 53, 55, 56, 57, 135,
|
||||||
136, 54, 133, 53, 55, 56, 57, 22, 23, 24,
|
136, 54, 133, 53, 55, 56, 57, 135, 136, 54,
|
||||||
25, 26, 21 ]
|
133, 53, 55, 56, 57, 22, 23, 24, 25, 26,
|
||||||
|
21 ]
|
||||||
|
|
||||||
racc_action_check = [
|
racc_action_check = [
|
||||||
61, 61, 61, 61, 61, 61, 61, 61, 61, 33,
|
38, 38, 38, 38, 38, 38, 38, 38, 38, 32,
|
||||||
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
|
38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
|
||||||
61, 61, 61, 59, 59, 59, 59, 59, 59, 59,
|
125, 38, 38, 97, 97, 97, 97, 97, 97, 97,
|
||||||
59, 59, 41, 59, 59, 59, 59, 59, 59, 59,
|
97, 97, 164, 97, 97, 97, 97, 97, 97, 97,
|
||||||
59, 59, 59, 59, 59, 59, 97, 97, 97, 97,
|
97, 97, 97, 31, 97, 97, 59, 59, 59, 59,
|
||||||
97, 97, 97, 97, 97, 125, 97, 97, 97, 97,
|
59, 59, 59, 59, 59, 29, 59, 59, 59, 59,
|
||||||
97, 97, 97, 97, 97, 97, 37, 97, 97, 38,
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 91,
|
||||||
38, 38, 38, 38, 38, 38, 38, 38, 35, 38,
|
91, 91, 91, 91, 91, 91, 91, 91, 1, 91,
|
||||||
38, 38, 38, 38, 38, 38, 38, 38, 38, 34,
|
91, 91, 91, 91, 91, 91, 91, 91, 91, 162,
|
||||||
38, 38, 155, 155, 155, 155, 155, 155, 155, 155,
|
91, 91, 155, 155, 155, 155, 155, 155, 155, 155,
|
||||||
155, 100, 155, 155, 155, 155, 155, 155, 155, 155,
|
155, 43, 155, 155, 155, 155, 155, 155, 155, 155,
|
||||||
155, 155, 32, 155, 155, 91, 91, 91, 91, 91,
|
155, 155, 172, 155, 155, 61, 61, 61, 61, 61,
|
||||||
91, 91, 91, 91, 31, 91, 91, 91, 91, 91,
|
61, 61, 61, 61, 58, 61, 61, 61, 61, 61,
|
||||||
91, 91, 91, 91, 91, 43, 91, 91, 20, 20,
|
61, 61, 61, 61, 61, 61, 61, 61, 16, 16,
|
||||||
20, 20, 20, 20, 20, 20, 20, 29, 20, 20,
|
16, 16, 16, 16, 16, 16, 165, 165, 16, 41,
|
||||||
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
|
16, 37, 16, 35, 16, 90, 16, 34, 94, 16,
|
||||||
17, 17, 17, 17, 17, 17, 17, 17, 165, 165,
|
17, 17, 17, 17, 17, 17, 17, 17, 33, 100,
|
||||||
17, 162, 17, 90, 17, 164, 17, 94, 17, 18,
|
17, nil, 17, nil, 17, nil, 17, nil, 17, 18,
|
||||||
58, 17, 18, 18, 18, 18, 18, 18, 1, 18,
|
nil, 17, 18, 18, 18, 18, 18, 18, nil, 18,
|
||||||
172, 18, nil, 18, nil, 18, nil, 18, nil, nil,
|
nil, 18, nil, 18, nil, 18, nil, 18, nil, nil,
|
||||||
18, 19, 19, 19, 19, 19, 19, 19, 19, nil,
|
18, 19, 19, 19, 19, 19, 19, 19, 19, nil,
|
||||||
nil, 19, nil, 19, nil, 19, nil, 19, nil, 19,
|
nil, 19, nil, 19, nil, 19, nil, 19, nil, 19,
|
||||||
nil, nil, 19, 16, 16, 16, 16, 16, 16, 16,
|
nil, nil, 19, 20, 20, 20, 20, 20, 20, 20,
|
||||||
16, nil, nil, 16, nil, 16, nil, 16, nil, 16,
|
20, 20, nil, 20, 20, 20, 20, 20, 20, 20,
|
||||||
nil, 16, nil, nil, 16, 15, 15, 15, 15, 15,
|
20, 20, 20, 20, 20, 146, nil, nil, 146, 146,
|
||||||
15, 15, 15, nil, nil, 15, nil, 15, nil, 15,
|
|
||||||
nil, 15, nil, 15, 45, nil, 15, 45, 45, 45,
|
|
||||||
45, 45, 45, nil, 45, nil, 45, nil, 45, nil,
|
|
||||||
45, nil, 45, nil, nil, 45, 14, 14, 14, 14,
|
|
||||||
14, 14, 14, 14, nil, nil, 14, nil, 14, nil,
|
|
||||||
14, nil, 14, nil, 14, 146, nil, 14, 146, 146,
|
|
||||||
146, 146, 146, 146, nil, 146, nil, 146, nil, 146,
|
146, 146, 146, 146, nil, 146, nil, 146, nil, 146,
|
||||||
nil, 146, nil, 146, nil, nil, 146, 13, 13, 13,
|
nil, 146, nil, 146, 138, nil, 146, 138, 138, 138,
|
||||||
13, 13, 13, 13, 13, nil, nil, 13, nil, 13,
|
138, 138, 138, nil, 138, nil, 138, nil, 138, nil,
|
||||||
nil, 13, nil, 13, nil, 13, 138, nil, 13, 138,
|
138, nil, 138, nil, nil, 138, 0, 0, 0, 0,
|
||||||
138, 138, 138, 138, 138, nil, 138, nil, 138, nil,
|
|
||||||
138, nil, 138, nil, 138, 44, nil, 138, 44, 44,
|
|
||||||
44, 44, 44, 44, nil, 44, nil, 44, nil, 44,
|
|
||||||
nil, 44, nil, 44, nil, nil, 44, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, nil, nil, 2, nil, 2,
|
|
||||||
nil, 2, nil, 2, 39, 2, nil, 39, 2, 39,
|
|
||||||
39, 39, 39, nil, 39, nil, 39, nil, 39, nil,
|
|
||||||
39, nil, 39, nil, nil, 39, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, nil, nil, 0, nil, 0, nil,
|
0, 0, 0, 0, nil, nil, 0, nil, 0, nil,
|
||||||
0, nil, 0, nil, 0, nil, nil, 0, 122, 122,
|
0, nil, 0, nil, 0, 45, nil, 0, 45, 45,
|
||||||
122, 122, 122, 122, 122, 122, nil, 122, nil, 122,
|
45, 45, 45, 45, nil, 45, nil, 45, nil, 45,
|
||||||
nil, 122, nil, 122, nil, 122, nil, nil, 122, 127,
|
nil, 45, nil, 45, 44, nil, 45, 44, 44, 44,
|
||||||
127, 127, 127, 127, 127, 127, 127, nil, 127, nil,
|
44, 44, 44, nil, 44, nil, 44, nil, 44, nil,
|
||||||
127, nil, 127, nil, 127, nil, 127, nil, nil, 127,
|
44, nil, 44, nil, nil, 44, 2, 2, 2, 2,
|
||||||
42, 42, 42, 42, 42, 42, 42, 42, nil, 42,
|
2, 2, 2, 2, nil, nil, 2, nil, 2, nil,
|
||||||
nil, 42, nil, 42, nil, 42, nil, 42, nil, nil,
|
2, nil, 2, nil, 2, nil, nil, 2, 13, 13,
|
||||||
42, 159, 159, 159, 159, 159, 159, 159, 159, 159,
|
13, 13, 13, 13, 13, 13, nil, nil, 13, nil,
|
||||||
126, 126, 126, 126, 126, 126, 126, 126, 126, 36,
|
13, nil, 13, nil, 13, nil, 13, nil, nil, 13,
|
||||||
nil, nil, 36, 36, 36, 36, 36, 36, 163, 163,
|
14, 14, 14, 14, 14, 14, 14, 14, nil, nil,
|
||||||
163, 163, 163, 163, 163, 163, 163, 92, nil, nil,
|
14, nil, 14, nil, 14, nil, 14, nil, 14, nil,
|
||||||
92, nil, 92, 92, 92, 92, 171, 171, 171, 171,
|
nil, 14, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
171, 171, 171, 171, 171, 142, nil, nil, 142, 142,
|
nil, nil, 15, nil, 15, nil, 15, nil, 15, 39,
|
||||||
142, 142, 142, 142, 52, nil, nil, 52, 52, 52,
|
15, nil, 39, 15, 39, 39, 39, 39, nil, 39,
|
||||||
52, 52, 52, 95, 95, 95, 95, 95, 95, 95,
|
nil, 39, nil, 39, nil, 39, nil, 39, nil, nil,
|
||||||
95, 168, 168, 168, 168, 168, 168, 168, 168, 158,
|
39, 42, 42, 42, 42, 42, 42, 42, 42, nil,
|
||||||
158, 158, 158, 158, 158, 158, 158, 27, 27, 27,
|
42, nil, 42, nil, 42, nil, 42, nil, 42, nil,
|
||||||
27, 27, 27 ]
|
nil, 42, 127, 127, 127, 127, 127, 127, 127, 127,
|
||||||
|
nil, 127, nil, 127, nil, 127, nil, 127, nil, 127,
|
||||||
|
nil, nil, 127, 122, 122, 122, 122, 122, 122, 122,
|
||||||
|
122, nil, 122, nil, 122, nil, 122, nil, 122, 92,
|
||||||
|
122, nil, 92, 122, 92, 92, 92, 92, 36, nil,
|
||||||
|
nil, 36, 36, 36, 36, 36, 36, 52, nil, nil,
|
||||||
|
52, 52, 52, 52, 52, 52, 126, 126, 126, 126,
|
||||||
|
126, 126, 126, 126, 126, 142, nil, nil, 142, 142,
|
||||||
|
142, 142, 142, 142, 159, 159, 159, 159, 159, 159,
|
||||||
|
159, 159, 159, 163, 163, 163, 163, 163, 163, 163,
|
||||||
|
163, 163, 171, 171, 171, 171, 171, 171, 171, 171,
|
||||||
|
171, 95, 95, 95, 95, 95, 95, 95, 95, 158,
|
||||||
|
158, 158, 158, 158, 158, 158, 158, 168, 168, 168,
|
||||||
|
168, 168, 168, 168, 168, 27, 27, 27, 27, 27,
|
||||||
|
27 ]
|
||||||
|
|
||||||
racc_action_pointer = [
|
racc_action_pointer = [
|
||||||
423, 188, 384, nil, nil, nil, nil, nil, nil, nil,
|
283, 78, 343, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, nil, 324, 283, 242, 220, 157, 176, 198,
|
nil, nil, nil, 365, 387, 409, 135, 157, 176, 198,
|
||||||
135, nil, nil, nil, nil, nil, nil, 604, nil, 147,
|
220, nil, nil, nil, nil, nil, nil, 602, nil, 55,
|
||||||
nil, 110, 96, -9, 69, 56, 526, 43, 66, 401,
|
nil, 29, -7, 150, 137, 131, 515, 128, -3, 426,
|
||||||
nil, 28, 486, 130, 362, 261, nil, nil, nil, nil,
|
nil, 145, 447, 96, 321, 302, nil, nil, nil, nil,
|
||||||
nil, nil, 571, nil, nil, nil, nil, nil, 169, 20,
|
nil, nil, 524, nil, nil, nil, nil, nil, 113, 43,
|
||||||
nil, -3, nil, nil, nil, nil, nil, nil, nil, nil,
|
nil, 112, nil, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
||||||
150, 112, 544, nil, 172, 579, nil, 43, nil, nil,
|
132, 66, 506, nil, 153, 577, nil, 20, nil, nil,
|
||||||
95, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
163, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
||||||
nil, nil, 444, nil, nil, 52, 517, 465, nil, nil,
|
nil, nil, 489, nil, nil, 17, 533, 468, nil, nil,
|
||||||
nil, nil, nil, nil, nil, nil, nil, nil, 343, nil,
|
nil, nil, nil, nil, nil, nil, nil, nil, 261, nil,
|
||||||
nil, nil, 562, nil, nil, nil, 302, nil, nil, nil,
|
nil, nil, 542, nil, nil, nil, 242, nil, nil, nil,
|
||||||
nil, nil, nil, nil, nil, 89, nil, nil, 595, 508,
|
nil, nil, nil, nil, nil, 89, nil, nil, 585, 551,
|
||||||
nil, nil, 168, 535, 171, 164, nil, nil, 587, nil,
|
nil, nil, 86, 560, 28, 142, nil, nil, 593, nil,
|
||||||
nil, 553, 185, nil, nil, nil, nil, nil, nil ]
|
nil, 569, 107, nil, nil, nil, nil, nil, nil ]
|
||||||
|
|
||||||
racc_action_default = [
|
racc_action_default = [
|
||||||
-138, -138, -1, -3, -4, -5, -6, -7, -8, -9,
|
-138, -138, -1, -3, -4, -5, -6, -7, -8, -9,
|
||||||
|
@ -412,47 +411,47 @@ racc_action_default = [
|
||||||
-60, -138, -34, -36, -37, -29, -30, -32, -34 ]
|
-60, -138, -34, -36, -37, -29, -30, -32, -34 ]
|
||||||
|
|
||||||
racc_goto_table = [
|
racc_goto_table = [
|
||||||
126, 44, 125, 43, 144, 144, 160, 93, 97, 52,
|
126, 44, 125, 52, 144, 144, 160, 93, 97, 43,
|
||||||
166, 82, 144, 41, 40, 39, 138, 146, 169, 147,
|
166, 82, 144, 40, 41, 39, 138, 146, 169, 90,
|
||||||
167, 94, 44, 1, 123, 129, 169, 52, 36, 37,
|
36, 52, 44, 1, 52, 129, 169, 94, 59, 83,
|
||||||
52, 90, 59, 92, 121, 120, 31, 32, 33, 34,
|
123, 30, 151, 92, 120, 121, 31, 32, 33, 34,
|
||||||
35, 170, 58, 166, 83, 30, 170, 166, 151, nil,
|
35, 170, 58, 166, 167, 147, 170, 166, 37, nil,
|
||||||
150, nil, 166, 159, 8, 166, 8, nil, nil, nil,
|
150, nil, 166, 159, 4, 166, 4, nil, nil, nil,
|
||||||
nil, 155, nil, 156, 160, nil, nil, 8, 8, 8,
|
nil, 155, nil, 156, 160, nil, nil, 4, 4, 4,
|
||||||
8, 8, nil, 8, 4, nil, 4, 157, nil, nil,
|
4, 4, nil, 4, 5, nil, 5, 52, nil, nil,
|
||||||
163, nil, 162, 52, nil, 168, nil, 4, 4, 4,
|
163, nil, 162, 157, nil, 168, nil, 5, 5, 5,
|
||||||
4, 4, nil, 4, nil, nil, nil, nil, 144, nil,
|
5, 5, nil, 5, nil, nil, nil, nil, 144, nil,
|
||||||
nil, nil, 144, nil, nil, 129, 144, 144, nil, 5,
|
nil, nil, 144, nil, nil, 129, 144, 144, nil, 6,
|
||||||
129, 5, nil, nil, nil, nil, 171, 6, nil, 6,
|
129, 6, nil, nil, nil, nil, 171, 7, nil, 7,
|
||||||
nil, nil, 5, 5, 5, 5, 5, 11, 5, 11,
|
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
|
||||||
6, 6, 6, 6, 6, 7, 6, 7, nil, nil,
|
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
|
||||||
11, 11, 11, 11, 11, nil, 11, nil, 7, 7,
|
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
|
||||||
7, 7, 7, nil, 7 ]
|
11, 11, 11, nil, 11 ]
|
||||||
|
|
||||||
racc_goto_check = [
|
racc_goto_check = [
|
||||||
22, 24, 21, 23, 36, 36, 37, 18, 16, 34,
|
22, 24, 21, 34, 36, 36, 37, 18, 16, 23,
|
||||||
35, 41, 36, 20, 19, 17, 25, 25, 28, 32,
|
35, 41, 36, 19, 20, 17, 25, 25, 28, 14,
|
||||||
29, 23, 24, 1, 23, 24, 28, 34, 13, 15,
|
13, 34, 24, 1, 34, 24, 28, 23, 38, 39,
|
||||||
34, 14, 38, 17, 20, 19, 1, 1, 1, 1,
|
23, 3, 42, 17, 19, 20, 1, 1, 1, 1,
|
||||||
1, 33, 1, 35, 39, 3, 33, 35, 42, nil,
|
1, 33, 1, 35, 29, 32, 33, 35, 15, nil,
|
||||||
41, nil, 35, 22, 8, 35, 8, nil, nil, nil,
|
41, nil, 35, 22, 4, 35, 4, nil, nil, nil,
|
||||||
nil, 16, nil, 18, 37, nil, nil, 8, 8, 8,
|
nil, 16, nil, 18, 37, nil, nil, 4, 4, 4,
|
||||||
8, 8, nil, 8, 4, nil, 4, 23, nil, nil,
|
4, 4, nil, 4, 5, nil, 5, 34, nil, nil,
|
||||||
22, nil, 21, 34, nil, 22, nil, 4, 4, 4,
|
22, nil, 21, 23, nil, 22, nil, 5, 5, 5,
|
||||||
4, 4, nil, 4, nil, nil, nil, nil, 36, nil,
|
5, 5, nil, 5, nil, nil, nil, nil, 36, nil,
|
||||||
nil, nil, 36, nil, nil, 24, 36, 36, nil, 5,
|
nil, nil, 36, nil, nil, 24, 36, 36, nil, 6,
|
||||||
24, 5, nil, nil, nil, nil, 22, 6, nil, 6,
|
24, 6, nil, nil, nil, nil, 22, 7, nil, 7,
|
||||||
nil, nil, 5, 5, 5, 5, 5, 11, 5, 11,
|
nil, nil, 6, 6, 6, 6, 6, 8, 6, 8,
|
||||||
6, 6, 6, 6, 6, 7, 6, 7, nil, nil,
|
7, 7, 7, 7, 7, 11, 7, 11, nil, nil,
|
||||||
11, 11, 11, 11, 11, nil, 11, nil, 7, 7,
|
8, 8, 8, 8, 8, nil, 8, nil, 11, 11,
|
||||||
7, 7, 7, nil, 7 ]
|
11, 11, 11, nil, 11 ]
|
||||||
|
|
||||||
racc_goto_pointer = [
|
racc_goto_pointer = [
|
||||||
nil, 23, nil, 43, 74, 109, 117, 135, 54, nil,
|
nil, 23, nil, 29, 54, 74, 109, 117, 127, nil,
|
||||||
nil, 127, nil, 10, -5, 11, -30, -3, -29, -4,
|
nil, 135, nil, 2, -17, 30, -30, -3, -29, -5,
|
||||||
-5, -40, -42, -15, -17, -28, nil, nil, -120, -107,
|
-4, -40, -42, -9, -17, -28, nil, nil, -120, -83,
|
||||||
nil, nil, -33, -101, -9, -116, -40, -91, 12, 17,
|
nil, nil, -7, -101, -15, -116, -40, -91, 8, 2,
|
||||||
nil, -9, -13 ]
|
nil, -9, -29 ]
|
||||||
|
|
||||||
racc_goto_default = [
|
racc_goto_default = [
|
||||||
nil, nil, 2, 3, 46, 47, 48, 49, 50, 9,
|
nil, nil, 2, 3, 46, 47, 48, 49, 50, 9,
|
||||||
|
@ -733,12 +732,12 @@ Racc_debug_parser = false
|
||||||
# reduce 1 omitted
|
# reduce 1 omitted
|
||||||
|
|
||||||
def _reduce_2(val, _values, result)
|
def _reduce_2(val, _values, result)
|
||||||
result.append val[1]
|
result.append val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_3(val, _values, result)
|
def _reduce_3(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -763,28 +762,28 @@ end
|
||||||
def _reduce_13(val, _values, result)
|
def _reduce_13(val, _values, result)
|
||||||
content = val[1]
|
content = val[1]
|
||||||
result = inline "<em>#{content}</em>", content
|
result = inline "<em>#{content}</em>", content
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_14(val, _values, result)
|
def _reduce_14(val, _values, result)
|
||||||
content = val[1]
|
content = val[1]
|
||||||
result = inline "<code>#{content}</code>", content
|
result = inline "<code>#{content}</code>", content
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_15(val, _values, result)
|
def _reduce_15(val, _values, result)
|
||||||
content = val[1]
|
content = val[1]
|
||||||
result = inline "+#{content}+", content
|
result = inline "+#{content}+", content
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_16(val, _values, result)
|
def _reduce_16(val, _values, result)
|
||||||
content = val[1]
|
content = val[1]
|
||||||
result = inline "<tt>#{content}</tt>", content
|
result = inline "<tt>#{content}</tt>", content
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -792,13 +791,13 @@ def _reduce_17(val, _values, result)
|
||||||
label = val[1]
|
label = val[1]
|
||||||
@block_parser.add_label label.reference
|
@block_parser.add_label label.reference
|
||||||
result = "<span id=\"label-#{label}\">#{label}</span>"
|
result = "<span id=\"label-#{label}\">#{label}</span>"
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_18(val, _values, result)
|
def _reduce_18(val, _values, result)
|
||||||
result = "{#{val[1]}}[#{val[2].join}]"
|
result = "{#{val[1]}}[#{val[2].join}]"
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -806,13 +805,13 @@ def _reduce_19(val, _values, result)
|
||||||
scheme, inline = val[1]
|
scheme, inline = val[1]
|
||||||
|
|
||||||
result = "{#{inline}}[#{scheme}#{inline.reference}]"
|
result = "{#{inline}}[#{scheme}#{inline.reference}]"
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_20(val, _values, result)
|
def _reduce_20(val, _values, result)
|
||||||
result = [nil, inline(val[1])]
|
result = [nil, inline(val[1])]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -821,25 +820,25 @@ def _reduce_21(val, _values, result)
|
||||||
'rdoc-label:',
|
'rdoc-label:',
|
||||||
inline("#{val[0].reference}/#{val[1].reference}")
|
inline("#{val[0].reference}/#{val[1].reference}")
|
||||||
]
|
]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_22(val, _values, result)
|
def _reduce_22(val, _values, result)
|
||||||
result = ['rdoc-label:', val[0].reference]
|
result = ['rdoc-label:', val[0].reference]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_23(val, _values, result)
|
def _reduce_23(val, _values, result)
|
||||||
result = ['rdoc-label:', "#{val[0].reference}/"]
|
result = ['rdoc-label:', "#{val[0].reference}/"]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_24(val, _values, result)
|
def _reduce_24(val, _values, result)
|
||||||
result = [nil, inline(val[1])]
|
result = [nil, inline(val[1])]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -848,92 +847,92 @@ def _reduce_25(val, _values, result)
|
||||||
'rdoc-label:',
|
'rdoc-label:',
|
||||||
inline("#{val[0].reference}/#{val[1].reference}")
|
inline("#{val[0].reference}/#{val[1].reference}")
|
||||||
]
|
]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_26(val, _values, result)
|
def _reduce_26(val, _values, result)
|
||||||
result = ['rdoc-label:', val[0]]
|
result = ['rdoc-label:', val[0]]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_27(val, _values, result)
|
def _reduce_27(val, _values, result)
|
||||||
ref = val[0].reference
|
ref = val[0].reference
|
||||||
result = ['rdoc-label:', inline(ref, "#{ref}/")]
|
result = ['rdoc-label:', inline(ref, "#{ref}/")]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 28 omitted
|
# reduce 28 omitted
|
||||||
|
|
||||||
def _reduce_29(val, _values, result)
|
def _reduce_29(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_30(val, _values, result)
|
def _reduce_30(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_31(val, _values, result)
|
def _reduce_31(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_32(val, _values, result)
|
def _reduce_32(val, _values, result)
|
||||||
result = inline "\"#{val[1]}\""
|
result = inline "\"#{val[1]}\""
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_33(val, _values, result)
|
def _reduce_33(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_34(val, _values, result)
|
def _reduce_34(val, _values, result)
|
||||||
result = inline "\"#{val[1]}\""
|
result = inline "\"#{val[1]}\""
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 35 omitted
|
# reduce 35 omitted
|
||||||
|
|
||||||
def _reduce_36(val, _values, result)
|
def _reduce_36(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_37(val, _values, result)
|
def _reduce_37(val, _values, result)
|
||||||
result = inline val[1]
|
result = inline val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_38(val, _values, result)
|
def _reduce_38(val, _values, result)
|
||||||
result = val[0].append val[1]
|
result = val[0].append val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_39(val, _values, result)
|
def _reduce_39(val, _values, result)
|
||||||
result = val[0].append val[1]
|
result = val[0].append val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_40(val, _values, result)
|
def _reduce_40(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_41(val, _values, result)
|
def _reduce_41(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -941,25 +940,25 @@ end
|
||||||
|
|
||||||
def _reduce_43(val, _values, result)
|
def _reduce_43(val, _values, result)
|
||||||
result = val[0].append val[1]
|
result = val[0].append val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_44(val, _values, result)
|
def _reduce_44(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_45(val, _values, result)
|
def _reduce_45(val, _values, result)
|
||||||
result = val[0].append val[1]
|
result = val[0].append val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_46(val, _values, result)
|
def _reduce_46(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -985,24 +984,24 @@ end
|
||||||
|
|
||||||
def _reduce_57(val, _values, result)
|
def _reduce_57(val, _values, result)
|
||||||
result = val[0]
|
result = val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_58(val, _values, result)
|
def _reduce_58(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_59(val, _values, result)
|
def _reduce_59(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_60(val, _values, result)
|
def _reduce_60(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1010,7 +1009,7 @@ end
|
||||||
|
|
||||||
def _reduce_62(val, _values, result)
|
def _reduce_62(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1018,7 +1017,7 @@ end
|
||||||
|
|
||||||
def _reduce_64(val, _values, result)
|
def _reduce_64(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1049,7 +1048,7 @@ end
|
||||||
# reduce 77 omitted
|
# reduce 77 omitted
|
||||||
|
|
||||||
def _reduce_78(val, _values, result)
|
def _reduce_78(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1100,13 +1099,13 @@ end
|
||||||
def _reduce_101(val, _values, result)
|
def _reduce_101(val, _values, result)
|
||||||
index = @block_parser.add_footnote val[1].rdoc
|
index = @block_parser.add_footnote val[1].rdoc
|
||||||
result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]"
|
result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]"
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_102(val, _values, result)
|
def _reduce_102(val, _values, result)
|
||||||
result = inline "<tt>#{val[1]}</tt>", val[1]
|
result = inline "<tt>#{val[1]}</tt>", val[1]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1123,7 +1122,7 @@ end
|
||||||
# reduce 108 omitted
|
# reduce 108 omitted
|
||||||
|
|
||||||
def _reduce_109(val, _values, result)
|
def _reduce_109(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1131,24 +1130,24 @@ end
|
||||||
|
|
||||||
def _reduce_111(val, _values, result)
|
def _reduce_111(val, _values, result)
|
||||||
result = inline val[0]
|
result = inline val[0]
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# reduce 112 omitted
|
# reduce 112 omitted
|
||||||
|
|
||||||
def _reduce_113(val, _values, result)
|
def _reduce_113(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_114(val, _values, result)
|
def _reduce_114(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
def _reduce_115(val, _values, result)
|
def _reduce_115(val, _values, result)
|
||||||
result = val[1]
|
result = val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1193,7 +1192,7 @@ end
|
||||||
# reduce 135 omitted
|
# reduce 135 omitted
|
||||||
|
|
||||||
def _reduce_136(val, _values, result)
|
def _reduce_136(val, _values, result)
|
||||||
result << val[1]
|
result << val[1]
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,66 @@
|
||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
$:.push File.expand_path("../lib", __FILE__)
|
||||||
|
require 'rdoc'
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "rdoc"
|
s.name = "rdoc"
|
||||||
s.version = "4.2.1"
|
s.version = RDoc::VERSION
|
||||||
s.summary = "This rdoc is bundled with Ruby"
|
|
||||||
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3") if
|
||||||
|
s.respond_to? :required_rubygems_version=
|
||||||
|
|
||||||
|
s.require_paths = ["lib"]
|
||||||
|
s.authors = [
|
||||||
|
"Eric Hodel",
|
||||||
|
"Dave Thomas",
|
||||||
|
"Phil Hagelberg",
|
||||||
|
"Tony Strauss",
|
||||||
|
"Zachary Scott"
|
||||||
|
]
|
||||||
|
|
||||||
|
s.description = <<-DESCRIPTION
|
||||||
|
RDoc produces HTML and command-line documentation for Ruby projects.
|
||||||
|
RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
s.email = ["drbrain@segment7.net", "mail@zzak.io"]
|
||||||
|
|
||||||
s.executables = ["rdoc", "ri"]
|
s.executables = ["rdoc", "ri"]
|
||||||
s.files = ["rdoc.rb", "rdoc/alias.rb", "rdoc/anon_class.rb", "rdoc/any_method.rb", "rdoc/attr.rb", "rdoc/class_module.rb", "rdoc/code_object.rb", "rdoc/code_objects.rb", "rdoc/comment.rb", "rdoc/constant.rb", "rdoc/context.rb", "rdoc/context/section.rb", "rdoc/cross_reference.rb", "rdoc/encoding.rb", "rdoc/erb_partial.rb", "rdoc/erbio.rb", "rdoc/extend.rb", "rdoc/generator.rb", "rdoc/generator/darkfish.rb", "rdoc/generator/json_index.rb", "rdoc/generator/markup.rb", "rdoc/generator/pot.rb", "rdoc/generator/pot/message_extractor.rb", "rdoc/generator/pot/po.rb", "rdoc/generator/pot/po_entry.rb", "rdoc/generator/ri.rb", "rdoc/ghost_method.rb", "rdoc/i18n.rb", "rdoc/i18n/locale.rb", "rdoc/i18n/text.rb", "rdoc/include.rb", "rdoc/known_classes.rb", "rdoc/markdown.rb", "rdoc/markdown/entities.rb", "rdoc/markdown/literals_1_9.rb", "rdoc/markup.rb", "rdoc/markup/attr_changer.rb", "rdoc/markup/attr_span.rb", "rdoc/markup/attribute_manager.rb", "rdoc/markup/attributes.rb", "rdoc/markup/blank_line.rb", "rdoc/markup/block_quote.rb", "rdoc/markup/document.rb", "rdoc/markup/formatter.rb", "rdoc/markup/formatter_test_case.rb", "rdoc/markup/hard_break.rb", "rdoc/markup/heading.rb", "rdoc/markup/include.rb", "rdoc/markup/indented_paragraph.rb", "rdoc/markup/inline.rb", "rdoc/markup/list.rb", "rdoc/markup/list_item.rb", "rdoc/markup/paragraph.rb", "rdoc/markup/parser.rb", "rdoc/markup/pre_process.rb", "rdoc/markup/raw.rb", "rdoc/markup/rule.rb", "rdoc/markup/special.rb", "rdoc/markup/text_formatter_test_case.rb", "rdoc/markup/to_ansi.rb", "rdoc/markup/to_bs.rb", "rdoc/markup/to_html.rb", "rdoc/markup/to_html_crossref.rb", "rdoc/markup/to_html_snippet.rb", "rdoc/markup/to_joined_paragraph.rb", "rdoc/markup/to_label.rb", "rdoc/markup/to_markdown.rb", "rdoc/markup/to_rdoc.rb", "rdoc/markup/to_table_of_contents.rb", "rdoc/markup/to_test.rb", "rdoc/markup/to_tt_only.rb", "rdoc/markup/verbatim.rb", "rdoc/meta_method.rb", "rdoc/method_attr.rb", "rdoc/mixin.rb", "rdoc/normal_class.rb", "rdoc/normal_module.rb", "rdoc/options.rb", "rdoc/parser.rb", "rdoc/parser/c.rb", "rdoc/parser/changelog.rb", "rdoc/parser/markdown.rb", "rdoc/parser/rd.rb", "rdoc/parser/ruby.rb", "rdoc/parser/ruby_tools.rb", "rdoc/parser/simple.rb", "rdoc/parser/text.rb", "rdoc/rd.rb", "rdoc/rd/block_parser.rb", "rdoc/rd/inline.rb", "rdoc/rd/inline_parser.rb", "rdoc/rdoc.rb", "rdoc/require.rb", "rdoc/ri.rb", "rdoc/ri/driver.rb", "rdoc/ri/formatter.rb", "rdoc/ri/paths.rb", "rdoc/ri/store.rb", "rdoc/ri/task.rb", "rdoc/ruby_lex.rb", "rdoc/ruby_token.rb", "rdoc/rubygems_hook.rb", "rdoc/servlet.rb", "rdoc/single_class.rb", "rdoc/stats.rb", "rdoc/stats/normal.rb", "rdoc/stats/quiet.rb", "rdoc/stats/verbose.rb", "rdoc/store.rb", "rdoc/task.rb", "rdoc/test_case.rb", "rdoc/text.rb", "rdoc/token_stream.rb", "rdoc/tom_doc.rb", "rdoc/top_level.rb"]
|
|
||||||
|
s.extra_rdoc_files += %w[
|
||||||
|
CVE-2013-0256.rdoc
|
||||||
|
CONTRIBUTING.rdoc
|
||||||
|
ExampleMarkdown.md
|
||||||
|
ExampleRDoc.rdoc
|
||||||
|
History.rdoc
|
||||||
|
LEGAL.rdoc
|
||||||
|
LICENSE.rdoc
|
||||||
|
README.rdoc
|
||||||
|
RI.rdoc
|
||||||
|
TODO.rdoc
|
||||||
|
]
|
||||||
|
|
||||||
|
s.files = File.readlines("Manifest.txt").map { |l| l.gsub("\n",'') }
|
||||||
|
|
||||||
|
s.homepage = "http://docs.seattlerb.org/rdoc"
|
||||||
|
s.licenses = ["Ruby"]
|
||||||
|
s.post_install_message = <<-MESSAGE
|
||||||
|
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
|
||||||
|
|
||||||
|
<= 1.8.6 : unsupported
|
||||||
|
= 1.8.7 : gem install rdoc-data; rdoc-data --install
|
||||||
|
= 1.9.1 : gem install rdoc-data; rdoc-data --install
|
||||||
|
>= 1.9.2 : nothing to do! Yay!
|
||||||
|
MESSAGE
|
||||||
|
|
||||||
|
s.rdoc_options = ["--main", "README.rdoc"]
|
||||||
|
s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
|
||||||
|
s.rubygems_version = "2.5.2"
|
||||||
|
s.summary = "RDoc produces HTML and command-line documentation for Ruby projects"
|
||||||
|
|
||||||
|
s.add_runtime_dependency("json", "~> 1.4")
|
||||||
|
s.add_development_dependency("rake", "~> 10.5")
|
||||||
|
s.add_development_dependency("racc", "~> 1.4", "> 1.4.10")
|
||||||
|
s.add_development_dependency("kpeg", "~> 0.9")
|
||||||
|
s.add_development_dependency("minitest", "~> 4")
|
||||||
end
|
end
|
||||||
|
|
|
@ -437,7 +437,7 @@ The internal error was:
|
||||||
|
|
||||||
def remove_unparseable files
|
def remove_unparseable files
|
||||||
files.reject do |file|
|
files.reject do |file|
|
||||||
file =~ /\.(?:class|eps|erb|scpt\.txt|ttf|yml)$/i or
|
file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or
|
||||||
(file =~ /tags$/i and
|
(file =~ /tags$/i and
|
||||||
open(file, 'rb') { |io|
|
open(file, 'rb') { |io|
|
||||||
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
|
io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/
|
||||||
|
|
|
@ -907,22 +907,9 @@ The ri pager can be set with the 'RI_PAGER' environment variable or the
|
||||||
# will be expanded to Zlib::DataError.
|
# will be expanded to Zlib::DataError.
|
||||||
|
|
||||||
def expand_class klass
|
def expand_class klass
|
||||||
klass.split('::').inject '' do |expanded, klass_part|
|
ary = classes.keys.grep(Regexp.new("\\A#{klass.gsub(/(?=::|\z)/, '[^:]*')}\\z"))
|
||||||
expanded << '::' unless expanded.empty?
|
raise NotFoundError, klass if ary.length != 1
|
||||||
short = expanded << klass_part
|
ary.first
|
||||||
|
|
||||||
subset = classes.keys.select do |klass_name|
|
|
||||||
klass_name =~ /^#{expanded}[^:]*$/
|
|
||||||
end
|
|
||||||
|
|
||||||
abbrevs = Abbrev.abbrev subset
|
|
||||||
|
|
||||||
expanded = abbrevs[short]
|
|
||||||
|
|
||||||
raise NotFoundError, short unless expanded
|
|
||||||
|
|
||||||
expanded.dup
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -102,10 +102,10 @@ class RDoc::RubyLex
|
||||||
@exp_line_no = @line_no = 1
|
@exp_line_no = @line_no = 1
|
||||||
@here_readed = []
|
@here_readed = []
|
||||||
@readed = []
|
@readed = []
|
||||||
|
@current_readed = @readed
|
||||||
@rests = []
|
@rests = []
|
||||||
@seek = 0
|
@seek = 0
|
||||||
|
|
||||||
@here_header = false
|
|
||||||
@indent = 0
|
@indent = 0
|
||||||
@indent_stack = []
|
@indent_stack = []
|
||||||
@lex_state = :EXPR_BEG
|
@lex_state = :EXPR_BEG
|
||||||
|
@ -161,7 +161,7 @@ class RDoc::RubyLex
|
||||||
end
|
end
|
||||||
|
|
||||||
readed = @readed.join("")
|
readed = @readed.join("")
|
||||||
@readed = []
|
@readed.clear
|
||||||
readed
|
readed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -171,13 +171,9 @@ class RDoc::RubyLex
|
||||||
@rests.push nil unless buf_input
|
@rests.push nil unless buf_input
|
||||||
end
|
end
|
||||||
c = @rests.shift
|
c = @rests.shift
|
||||||
if @here_header
|
@current_readed.push c
|
||||||
@here_readed.push c
|
|
||||||
else
|
|
||||||
@readed.push c
|
|
||||||
end
|
|
||||||
@seek += 1
|
@seek += 1
|
||||||
if c == "\n"
|
if c == "\n".freeze
|
||||||
@line_no += 1
|
@line_no += 1
|
||||||
@char_no = 0
|
@char_no = 0
|
||||||
else
|
else
|
||||||
|
@ -283,7 +279,7 @@ class RDoc::RubyLex
|
||||||
@indent_stack = []
|
@indent_stack = []
|
||||||
@lex_state = :EXPR_BEG
|
@lex_state = :EXPR_BEG
|
||||||
@space_seen = false
|
@space_seen = false
|
||||||
@here_header = false
|
@current_readed = @readed
|
||||||
|
|
||||||
@continue = false
|
@continue = false
|
||||||
prompt
|
prompt
|
||||||
|
@ -462,8 +458,8 @@ class RDoc::RubyLex
|
||||||
@indent_stack.pop
|
@indent_stack.pop
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@here_header = false
|
@current_readed = @readed
|
||||||
@here_readed = []
|
@here_readed.clear
|
||||||
Token(TkNL)
|
Token(TkNL)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1021,7 +1017,7 @@ class RDoc::RubyLex
|
||||||
doc = '"'
|
doc = '"'
|
||||||
end
|
end
|
||||||
|
|
||||||
@here_header = false
|
@current_readed = @readed
|
||||||
while l = gets
|
while l = gets
|
||||||
l = l.sub(/(:?\r)?\n\z/, "\n")
|
l = l.sub(/(:?\r)?\n\z/, "\n")
|
||||||
if (indent ? l.strip : l.chomp) == quoted
|
if (indent ? l.strip : l.chomp) == quoted
|
||||||
|
@ -1038,7 +1034,7 @@ class RDoc::RubyLex
|
||||||
doc << '"'
|
doc << '"'
|
||||||
end
|
end
|
||||||
|
|
||||||
@here_header = true
|
@current_readed = @here_readed
|
||||||
@here_readed.concat reserve
|
@here_readed.concat reserve
|
||||||
while ch = reserve.pop
|
while ch = reserve.pop
|
||||||
ungetc ch
|
ungetc ch
|
||||||
|
|
|
@ -116,8 +116,8 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
|
||||||
case req.path
|
case req.path
|
||||||
when '/' then
|
when '/' then
|
||||||
root req, res
|
root req, res
|
||||||
when '/rdoc.css', '/js/darkfish.js', '/js/jquery.js', '/js/search.js',
|
when '/js/darkfish.js', '/js/jquery.js', '/js/search.js',
|
||||||
%r%^/images/% then
|
%r%^/css/%, %r%^/images/%, %r%^/fonts/% then
|
||||||
asset :darkfish, req, res
|
asset :darkfish, req, res
|
||||||
when '/js/navigation.js', '/js/searcher.js' then
|
when '/js/navigation.js', '/js/searcher.js' then
|
||||||
asset :json_index, req, res
|
asset :json_index, req, res
|
||||||
|
@ -204,7 +204,7 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
|
||||||
|
|
||||||
<title>Error - #{ERB::Util.html_escape exception.class}</title>
|
<title>Error - #{ERB::Util.html_escape exception.class}</title>
|
||||||
|
|
||||||
<link type="text/css" media="screen" href="#{@mount_path}/rdoc.css" rel="stylesheet">
|
<link type="text/css" media="screen" href="#{@mount_path}/css/rdoc.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Error</h1>
|
<h1>Error</h1>
|
||||||
|
|
|
@ -417,7 +417,7 @@ class TestRDocContext < XrefTestCase
|
||||||
def bench_add_include
|
def bench_add_include
|
||||||
cm = RDoc::ClassModule.new 'Klass'
|
cm = RDoc::ClassModule.new 'Klass'
|
||||||
|
|
||||||
assert_performance_linear 0.9 do |count|
|
assert_performance_linear 0.5 do |count|
|
||||||
count.times do |i|
|
count.times do |i|
|
||||||
cm.add_include RDoc::Include.new("N::M#{i}", nil)
|
cm.add_include RDoc::Include.new("N::M#{i}", nil)
|
||||||
end
|
end
|
||||||
|
|
|
@ -48,6 +48,22 @@ class TestRDocContextSection < RDoc::TestCase
|
||||||
assert_equal 'one+two', @S.new(nil, 'one two', nil).aref
|
assert_equal 'one+two', @S.new(nil, 'one two', nil).aref
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_eql_eh
|
||||||
|
other = @S.new @klass, 'other', comment('# comment', @top_level)
|
||||||
|
|
||||||
|
assert @s.eql? @s
|
||||||
|
assert @s.eql? @s.dup
|
||||||
|
refute @s.eql? other
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_equals
|
||||||
|
other = @S.new @klass, 'other', comment('# comment', @top_level)
|
||||||
|
|
||||||
|
assert_equal @s, @s
|
||||||
|
assert_equal @s, @s.dup
|
||||||
|
refute_equal @s, other
|
||||||
|
end
|
||||||
|
|
||||||
def test_extract_comment
|
def test_extract_comment
|
||||||
assert_equal '', @s.extract_comment(comment('')).text
|
assert_equal '', @s.extract_comment(comment('')).text
|
||||||
assert_equal '', @s.extract_comment(comment("# :section: b\n")).text
|
assert_equal '', @s.extract_comment(comment("# :section: b\n")).text
|
||||||
|
@ -56,6 +72,14 @@ class TestRDocContextSection < RDoc::TestCase
|
||||||
@s.extract_comment(comment("# a\n# :section: b\n# c")).text
|
@s.extract_comment(comment("# a\n# :section: b\n# c")).text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_hash
|
||||||
|
other = @S.new @klass, 'other', comment('# comment', @top_level)
|
||||||
|
|
||||||
|
assert_equal @s.hash, @s.hash
|
||||||
|
assert_equal @s.hash, @s.dup.hash
|
||||||
|
refute_equal @s.hash, other.hash
|
||||||
|
end
|
||||||
|
|
||||||
def test_marshal_dump
|
def test_marshal_dump
|
||||||
loaded = Marshal.load Marshal.dump @s
|
loaded = Marshal.load Marshal.dump @s
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,45 @@ class TestRDocEncoding < RDoc::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_skip_frozen_string_literal
|
||||||
|
skip "Encoding not implemented" unless Object.const_defined? :Encoding
|
||||||
|
|
||||||
|
expected = "# frozen_string_literal: false\nhi everybody"
|
||||||
|
|
||||||
|
@tempfile.write expected
|
||||||
|
@tempfile.flush
|
||||||
|
|
||||||
|
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
|
||||||
|
assert_equal "hi everybody", contents
|
||||||
|
assert_equal Encoding::UTF_8, contents.encoding
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_skip_frozen_string_literal_after_coding
|
||||||
|
skip "Encoding not implemented" unless Object.const_defined? :Encoding
|
||||||
|
|
||||||
|
expected = "# coding: utf-8\n# frozen-string-literal: false\nhi everybody"
|
||||||
|
|
||||||
|
@tempfile.write expected
|
||||||
|
@tempfile.flush
|
||||||
|
|
||||||
|
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
|
||||||
|
assert_equal "hi everybody", contents
|
||||||
|
assert_equal Encoding::UTF_8, contents.encoding
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_skip_frozen_string_literal_before_coding
|
||||||
|
skip "Encoding not implemented" unless Object.const_defined? :Encoding
|
||||||
|
|
||||||
|
expected = "# frozen_string_literal: false\n# coding: utf-8\nhi everybody"
|
||||||
|
|
||||||
|
@tempfile.write expected
|
||||||
|
@tempfile.flush
|
||||||
|
|
||||||
|
contents = RDoc::Encoding.read_file @tempfile.path, Encoding::UTF_8
|
||||||
|
assert_equal "hi everybody", contents
|
||||||
|
assert_equal Encoding::UTF_8, contents.encoding
|
||||||
|
end
|
||||||
|
|
||||||
def test_sanity
|
def test_sanity
|
||||||
skip "Encoding not implemented" unless Object.const_defined? :Encoding
|
skip "Encoding not implemented" unless Object.const_defined? :Encoding
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,12 @@ class TestRDocMarkupToHtmlCrossref < XrefTestCase
|
||||||
assert_equal para("<a href=\"C1.html#Section\">Section at C1</a>"), result
|
assert_equal para("<a href=\"C1.html#Section\">Section at C1</a>"), result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_convert_CROSSREF_constant
|
||||||
|
result = @to.convert 'C1::CONST'
|
||||||
|
|
||||||
|
assert_equal para("<a href=\"C1.html#CONST\">C1::CONST</a>"), result
|
||||||
|
end
|
||||||
|
|
||||||
def test_convert_RDOCLINK_rdoc_ref
|
def test_convert_RDOCLINK_rdoc_ref
|
||||||
result = @to.convert 'rdoc-ref:C1'
|
result = @to.convert 'rdoc-ref:C1'
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,50 @@ void Init_Blah(void) {
|
||||||
assert_equal 'This is a writer', writer.comment.text
|
assert_equal 'This is a writer', writer.comment.text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_do_attr_rb_attr_2
|
||||||
|
content = <<-EOF
|
||||||
|
void Init_Blah(void) {
|
||||||
|
cBlah = rb_define_class("Blah", rb_cObject);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an accessor
|
||||||
|
*/
|
||||||
|
rb_attr(cBlah, rb_intern_const("accessor"), 1, 1, Qfalse);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a reader
|
||||||
|
*/
|
||||||
|
rb_attr(cBlah, rb_intern_const("reader"), 1, 0, Qfalse);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a writer
|
||||||
|
*/
|
||||||
|
rb_attr(cBlah, rb_intern_const("writer"), 0, 1, Qfalse);
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
klass = util_get_class content, 'cBlah'
|
||||||
|
|
||||||
|
attrs = klass.attributes
|
||||||
|
assert_equal 3, attrs.length, attrs.inspect
|
||||||
|
|
||||||
|
accessor = attrs.shift
|
||||||
|
assert_equal 'accessor', accessor.name
|
||||||
|
assert_equal 'RW', accessor.rw
|
||||||
|
assert_equal 'This is an accessor', accessor.comment.text
|
||||||
|
assert_equal @top_level, accessor.file
|
||||||
|
|
||||||
|
reader = attrs.shift
|
||||||
|
assert_equal 'reader', reader.name
|
||||||
|
assert_equal 'R', reader.rw
|
||||||
|
assert_equal 'This is a reader', reader.comment.text
|
||||||
|
|
||||||
|
writer = attrs.shift
|
||||||
|
assert_equal 'writer', writer.name
|
||||||
|
assert_equal 'W', writer.rw
|
||||||
|
assert_equal 'This is a writer', writer.comment.text
|
||||||
|
end
|
||||||
|
|
||||||
def test_do_attr_rb_define_attr
|
def test_do_attr_rb_define_attr
|
||||||
content = <<-EOF
|
content = <<-EOF
|
||||||
void Init_Blah(void) {
|
void Init_Blah(void) {
|
||||||
|
|
|
@ -300,6 +300,7 @@ class TestRDocRDoc < RDoc::TestCase
|
||||||
blah.eps
|
blah.eps
|
||||||
blah.erb
|
blah.erb
|
||||||
blah.scpt.txt
|
blah.scpt.txt
|
||||||
|
blah.svg
|
||||||
blah.ttf
|
blah.ttf
|
||||||
blah.yml
|
blah.yml
|
||||||
]
|
]
|
||||||
|
|
|
@ -834,6 +834,24 @@ Foo::Bar#bother
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_expand_class_2
|
||||||
|
@store1 = RDoc::RI::Store.new @home_ri, :home
|
||||||
|
|
||||||
|
@top_level = @store1.add_file 'file.rb'
|
||||||
|
|
||||||
|
@cFoo = @top_level.add_class RDoc::NormalClass, 'Foo'
|
||||||
|
@mFox = @top_level.add_module RDoc::NormalModule, 'Fox'
|
||||||
|
@cFoo_Bar = @cFoo.add_class RDoc::NormalClass, 'Bar'
|
||||||
|
@store1.save
|
||||||
|
|
||||||
|
@driver.stores = [@store1]
|
||||||
|
assert_raises RDoc::RI::Driver::NotFoundError do
|
||||||
|
@driver.expand_class 'F'
|
||||||
|
end
|
||||||
|
assert_equal 'Foo::Bar', @driver.expand_class('F::Bar')
|
||||||
|
assert_equal 'Foo::Bar', @driver.expand_class('F::B')
|
||||||
|
end
|
||||||
|
|
||||||
def test_expand_name
|
def test_expand_name
|
||||||
util_store
|
util_store
|
||||||
|
|
||||||
|
|
|
@ -66,14 +66,15 @@ class TestRDocServlet < RDoc::TestCase
|
||||||
|
|
||||||
def test_asset
|
def test_asset
|
||||||
temp_dir do
|
temp_dir do
|
||||||
now = Time.now
|
FileUtils.mkdir 'css'
|
||||||
|
|
||||||
open 'rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end
|
now = Time.now
|
||||||
File.utime now, now, 'rdoc.css'
|
open 'css/rdoc.css', 'w' do |io| io.write 'h1 { color: red }' end
|
||||||
|
File.utime now, now, 'css/rdoc.css'
|
||||||
|
|
||||||
@s.asset_dirs[:darkfish] = '.'
|
@s.asset_dirs[:darkfish] = '.'
|
||||||
|
|
||||||
@req.path = 'rdoc.css'
|
@req.path = '/css/rdoc.css'
|
||||||
|
|
||||||
@s.asset :darkfish, @req, @res
|
@s.asset :darkfish, @req, @res
|
||||||
|
|
||||||
|
@ -95,11 +96,12 @@ class TestRDocServlet < RDoc::TestCase
|
||||||
|
|
||||||
def test_do_GET_asset_darkfish
|
def test_do_GET_asset_darkfish
|
||||||
temp_dir do
|
temp_dir do
|
||||||
FileUtils.touch 'rdoc.css'
|
FileUtils.mkdir 'css'
|
||||||
|
FileUtils.touch 'css/rdoc.css'
|
||||||
|
|
||||||
@s.asset_dirs[:darkfish] = '.'
|
@s.asset_dirs[:darkfish] = '.'
|
||||||
|
|
||||||
@req.path = '/rdoc.css'
|
@req.path = '/css/rdoc.css'
|
||||||
|
|
||||||
@s.do_GET @req, @res
|
@s.do_GET @req, @res
|
||||||
|
|
||||||
|
@ -136,11 +138,12 @@ class TestRDocServlet < RDoc::TestCase
|
||||||
@s = RDoc::Servlet.new @server, @stores, @cache, '/mount/path'
|
@s = RDoc::Servlet.new @server, @stores, @cache, '/mount/path'
|
||||||
|
|
||||||
temp_dir do
|
temp_dir do
|
||||||
FileUtils.touch 'rdoc.css'
|
FileUtils.mkdir 'css'
|
||||||
|
FileUtils.touch 'css/rdoc.css'
|
||||||
|
|
||||||
@s.asset_dirs[:darkfish] = '.'
|
@s.asset_dirs[:darkfish] = '.'
|
||||||
|
|
||||||
@req.path = '/mount/path/rdoc.css'
|
@req.path = '/mount/path/css/rdoc.css'
|
||||||
|
|
||||||
@s.do_GET @req, @res
|
@s.do_GET @req, @res
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue