rdoc 3.12 → 3.12.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/CVE-2013-0256.rdoc +49 -0
- data/History.rdoc +8 -0
- data/Manifest.txt +3 -0
- data/Rakefile +2 -0
- data/lib/rdoc.rb +1 -1
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +9 -7
- data/lib/rdoc/rd/block_parser.rb +1054 -0
- data/lib/rdoc/rd/inline_parser.rb +1207 -0
- metadata +121 -139
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 273a837395647f78a5238c46c58b00040ac02b8c
|
4
|
+
data.tar.gz: 0140308e6098631af5fa1fb3cb1fd751f81023ca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 47b2995d687fdb88b09ab589e93cc1b63b078387e7ab12ea5cb38b82cac4b44412a3f801b985c96021a298ebdd1f47fcf4e6828fefe7205084267c3567dc3743
|
7
|
+
data.tar.gz: 079a4eaba7614a7002d98d4d43a12afb4213b8d2364d29bb58954fad1f560a4b21ccb0e80e8c7b09f2270a783ba9caba46b918dadeaacedb0f54871a9607004c
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
P���X�Lk��5�d�wD��(��W��h�AY9u^�)��g1�i����$�>9t;#h��㟲98QI�������IDŽ ��:2���E��Kf�fPP˂x��:a(��~!נ�"���7;��Y�ܠﰪ�W��e�8Y\Ӹv8��9��N��*&�o�=�X2�\���wp7K��]f8�Iҷ#���o�8e�rW���Vwyf��5���\!�I��ѡ�����A�]��Z��iY�!�W۠XIC
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CVE-2013-0256.rdoc
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
= RDoc 2.3.0 through 3.12 XSS Exploit
|
2
|
+
|
3
|
+
RDoc documentation generated by rdoc 2.3.0 through rdoc 3.12 and prereleases up
|
4
|
+
to rdoc 4.0.0.preview2.1 are vulnerable to an XSS exploit. This exploit may
|
5
|
+
lead to cookie disclosure to third parties.
|
6
|
+
|
7
|
+
The exploit exists in darkfish.js which is copied from the RDoc install
|
8
|
+
location to the generated documentation.
|
9
|
+
|
10
|
+
RDoc is a static documentation generation tool. Patching the library itself
|
11
|
+
is insufficient to correct this exploit. Those hosting rdoc documentation will
|
12
|
+
need to apply the following patch. If applied while ignoring whitespace, this
|
13
|
+
patch will correct all affected versions:
|
14
|
+
|
15
|
+
diff --git darkfish.js darkfish.js
|
16
|
+
index 4be722f..f26fd45 100644
|
17
|
+
--- darkfish.js
|
18
|
+
+++ darkfish.js
|
19
|
+
@@ -109,13 +109,15 @@ function hookSearch() {
|
20
|
+
function highlightTarget( anchor ) {
|
21
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
22
|
+
|
23
|
+
- $("a[name=" + anchor + "]").each( function() {
|
24
|
+
- if ( !$(this).parent().parent().hasClass('target-section') ) {
|
25
|
+
- console.debug( "Wrapping the target-section" );
|
26
|
+
- $('div.method-detail').unwrap( 'div.target-section' );
|
27
|
+
- $(this).parent().wrap( '<div class="target-section"></div>' );
|
28
|
+
- } else {
|
29
|
+
- console.debug( "Already wrapped." );
|
30
|
+
+ $("a[name]").each( function() {
|
31
|
+
+ if ( $(this).attr("name") == anchor ) {
|
32
|
+
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
|
33
|
+
+ console.debug( "Wrapping the target-section" );
|
34
|
+
+ $('div.method-detail').unwrap( 'div.target-section' );
|
35
|
+
+ $(this).parent().wrap( '<div class="target-section"></div>' );
|
36
|
+
+ } else {
|
37
|
+
+ console.debug( "Already wrapped." );
|
38
|
+
+ }
|
39
|
+
}
|
40
|
+
});
|
41
|
+
};
|
42
|
+
|
43
|
+
RDoc 3.9.5, 3.12.1 and RDoc 4.0.0.rc.2 and newer are not vulnerable to this
|
44
|
+
exploit.
|
45
|
+
|
46
|
+
This exploit was discovered by Evgeny Ermakov <corwmh@gmail.com>.
|
47
|
+
|
48
|
+
This vulnerability has been assigned the CVE identifier CVE-2013-0256.
|
49
|
+
|
data/History.rdoc
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 3.12.1 / 2013-02-05
|
2
|
+
|
3
|
+
* Bug fixes
|
4
|
+
* Fixed an XSS exploit in darkfish.js. This could lead to cookie disclosure
|
5
|
+
to third parties. See CVE-2013-0256[rdoc-ref:CVE-2013-0256.rdoc] for full
|
6
|
+
details including a patch you can apply to generated RDoc documentation.
|
7
|
+
* Ensured that rd parser files are generated before checking the manifest.
|
8
|
+
|
1
9
|
=== 3.12 / 2011-12-15
|
2
10
|
|
3
11
|
* Minor enhancements
|
data/Manifest.txt
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
.autotest
|
2
2
|
.document
|
3
|
+
CVE-2013-0256.rdoc
|
3
4
|
DEVELOPERS.rdoc
|
4
5
|
History.rdoc
|
5
6
|
LEGAL.rdoc
|
@@ -128,8 +129,10 @@ lib/rdoc/parser/ruby_tools.rb
|
|
128
129
|
lib/rdoc/parser/simple.rb
|
129
130
|
lib/rdoc/parser/text.rb
|
130
131
|
lib/rdoc/rd.rb
|
132
|
+
lib/rdoc/rd/block_parser.rb
|
131
133
|
lib/rdoc/rd/block_parser.ry
|
132
134
|
lib/rdoc/rd/inline.rb
|
135
|
+
lib/rdoc/rd/inline_parser.rb
|
133
136
|
lib/rdoc/rd/inline_parser.ry
|
134
137
|
lib/rdoc/rdoc.rb
|
135
138
|
lib/rdoc/require.rb
|
data/Rakefile
CHANGED
@@ -42,6 +42,7 @@ Depending on your version of ruby, you may need to install ruby rdoc/ri data:
|
|
42
42
|
self.testlib = :minitest
|
43
43
|
self.extra_rdoc_files += %w[
|
44
44
|
DEVELOPERS.rdoc
|
45
|
+
CVE-2013-0256.rdoc
|
45
46
|
History.rdoc
|
46
47
|
LICENSE.rdoc
|
47
48
|
LEGAL.rdoc
|
@@ -64,6 +65,7 @@ Depending on your version of ruby, you may need to install ruby rdoc/ri data:
|
|
64
65
|
end
|
65
66
|
|
66
67
|
task :generate => PARSER_FILES
|
68
|
+
task :check_manifest => :generate
|
67
69
|
|
68
70
|
rule '.rb' => '.ry' do |t|
|
69
71
|
racc = Gem.bin_path 'racc', 'racc'
|
data/lib/rdoc.rb
CHANGED
@@ -109,13 +109,15 @@ function hookSearch() {
|
|
109
109
|
function highlightTarget( anchor ) {
|
110
110
|
console.debug( "Highlighting target '%s'.", anchor );
|
111
111
|
|
112
|
-
$("a[name
|
113
|
-
if (
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
112
|
+
$("a[name]").each( function() {
|
113
|
+
if ( $(this).attr("name") == anchor ) {
|
114
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
115
|
+
console.debug( "Wrapping the target-section" );
|
116
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
117
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
118
|
+
} else {
|
119
|
+
console.debug( "Already wrapped." );
|
120
|
+
}
|
119
121
|
}
|
120
122
|
});
|
121
123
|
};
|
@@ -0,0 +1,1054 @@
|
|
1
|
+
#
|
2
|
+
# DO NOT MODIFY!!!!
|
3
|
+
# This file is automatically generated by Racc 1.4.9
|
4
|
+
# from Racc grammer file "".
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'racc/parser.rb'
|
8
|
+
|
9
|
+
class RDoc::RD
|
10
|
+
|
11
|
+
##
|
12
|
+
# RD format parser for headings, paragraphs, lists, verbatim sections that
|
13
|
+
# exist as blocks.
|
14
|
+
|
15
|
+
class BlockParser < Racc::Parser
|
16
|
+
|
17
|
+
|
18
|
+
# :stopdoc:
|
19
|
+
|
20
|
+
TMPFILE = ["rdtmp", $$, 0]
|
21
|
+
|
22
|
+
MARK_TO_LEVEL = {
|
23
|
+
'=' => 1,
|
24
|
+
'==' => 2,
|
25
|
+
'===' => 3,
|
26
|
+
'====' => 4,
|
27
|
+
'+' => 5,
|
28
|
+
'++' => 6,
|
29
|
+
}
|
30
|
+
|
31
|
+
# :startdoc:
|
32
|
+
|
33
|
+
##
|
34
|
+
# Footnotes for this document
|
35
|
+
|
36
|
+
attr_reader :footnotes
|
37
|
+
|
38
|
+
##
|
39
|
+
# Labels for items in this document
|
40
|
+
|
41
|
+
attr_reader :labels
|
42
|
+
|
43
|
+
##
|
44
|
+
# Path to find included files in
|
45
|
+
|
46
|
+
attr_accessor :include_path
|
47
|
+
|
48
|
+
##
|
49
|
+
# Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format
|
50
|
+
# document.
|
51
|
+
|
52
|
+
def initialize
|
53
|
+
@inline_parser = RDoc::RD::InlineParser.new self
|
54
|
+
@include_path = []
|
55
|
+
|
56
|
+
# for testing
|
57
|
+
@footnotes = []
|
58
|
+
@labels = {}
|
59
|
+
end
|
60
|
+
|
61
|
+
##
|
62
|
+
# Parses +src+ and returns an RDoc::Markup::Document.
|
63
|
+
|
64
|
+
def parse src
|
65
|
+
@src = src
|
66
|
+
@src.push false
|
67
|
+
|
68
|
+
@footnotes = []
|
69
|
+
@labels = {}
|
70
|
+
|
71
|
+
# @i: index(line no.) of src
|
72
|
+
@i = 0
|
73
|
+
|
74
|
+
# stack for current indentation
|
75
|
+
@indent_stack = []
|
76
|
+
|
77
|
+
# how indented.
|
78
|
+
@current_indent = @indent_stack.join("")
|
79
|
+
|
80
|
+
# RDoc::RD::BlockParser for tmp src
|
81
|
+
@subparser = nil
|
82
|
+
|
83
|
+
# which part is in now
|
84
|
+
@in_part = nil
|
85
|
+
@part_content = []
|
86
|
+
|
87
|
+
@in_verbatim = false
|
88
|
+
|
89
|
+
@yydebug = true
|
90
|
+
|
91
|
+
document = do_parse
|
92
|
+
|
93
|
+
unless @footnotes.empty? then
|
94
|
+
blankline = document.parts.pop
|
95
|
+
|
96
|
+
document.parts << RDoc::Markup::Rule.new(1)
|
97
|
+
document.parts.concat @footnotes
|
98
|
+
|
99
|
+
document.parts.push blankline
|
100
|
+
end
|
101
|
+
|
102
|
+
document
|
103
|
+
end
|
104
|
+
|
105
|
+
##
|
106
|
+
# Returns the next token from the document
|
107
|
+
|
108
|
+
def next_token # :nodoc:
|
109
|
+
# preprocessing
|
110
|
+
# if it is not in RD part
|
111
|
+
# => method
|
112
|
+
while @in_part != "rd"
|
113
|
+
line = @src[@i]
|
114
|
+
@i += 1 # next line
|
115
|
+
|
116
|
+
case line
|
117
|
+
# src end
|
118
|
+
when false
|
119
|
+
return [false, false]
|
120
|
+
# RD part begin
|
121
|
+
when /^=begin\s*(?:\bRD\b.*)?\s*$/
|
122
|
+
if @in_part # if in non-RD part
|
123
|
+
@part_content.push(line)
|
124
|
+
else
|
125
|
+
@in_part = "rd"
|
126
|
+
return [:WHITELINE, "=begin\n"] # <= for textblockand
|
127
|
+
end
|
128
|
+
# non-RD part begin
|
129
|
+
when /^=begin\s+(\w+)/
|
130
|
+
part = $1
|
131
|
+
if @in_part # if in non-RD part
|
132
|
+
@part_content.push(line)
|
133
|
+
else
|
134
|
+
@in_part = part if @tree.filter[part] # if filter exists
|
135
|
+
# p "BEGIN_PART: #{@in_part}" # DEBUG
|
136
|
+
end
|
137
|
+
# non-RD part end
|
138
|
+
when /^=end/
|
139
|
+
if @in_part # if in non-RD part
|
140
|
+
# p "END_PART: #{@in_part}" # DEBUG
|
141
|
+
# make Part-in object
|
142
|
+
part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r")
|
143
|
+
@part_content.clear
|
144
|
+
# call filter, part_out is output(Part object)
|
145
|
+
part_out = @tree.filter[@in_part].call(part)
|
146
|
+
|
147
|
+
if @tree.filter[@in_part].mode == :rd # if output is RD formated
|
148
|
+
subtree = parse_subtree(part_out.to_a)
|
149
|
+
else # if output is target formated
|
150
|
+
basename = TMPFILE.join('.')
|
151
|
+
TMPFILE[-1] += 1
|
152
|
+
tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w")
|
153
|
+
tmpfile.print(part_out)
|
154
|
+
tmpfile.close
|
155
|
+
subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"])
|
156
|
+
end
|
157
|
+
@in_part = nil
|
158
|
+
return [:SUBTREE, subtree]
|
159
|
+
end
|
160
|
+
else
|
161
|
+
if @in_part # if in non-RD part
|
162
|
+
@part_content.push(line)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
@current_indent = @indent_stack.join("")
|
168
|
+
line = @src[@i]
|
169
|
+
case line
|
170
|
+
when false
|
171
|
+
if_current_indent_equal("") do
|
172
|
+
[false, false]
|
173
|
+
end
|
174
|
+
when /^=end/
|
175
|
+
if_current_indent_equal("") do
|
176
|
+
@in_part = nil
|
177
|
+
[:WHITELINE, "=end"] # MUST CHANGE??
|
178
|
+
end
|
179
|
+
when /^\s*$/
|
180
|
+
@i += 1 # next line
|
181
|
+
return [:WHITELINE, ':WHITELINE']
|
182
|
+
when /^\#/ # comment line
|
183
|
+
@i += 1 # next line
|
184
|
+
self.next_token()
|
185
|
+
when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/
|
186
|
+
rest = $' # '
|
187
|
+
rest.strip!
|
188
|
+
mark = $1
|
189
|
+
if_current_indent_equal("") do
|
190
|
+
return [:HEADLINE, [MARK_TO_LEVEL[mark], rest]]
|
191
|
+
end
|
192
|
+
when /^<<<\s*(\S+)/
|
193
|
+
file = $1
|
194
|
+
if_current_indent_equal("") do
|
195
|
+
suffix = file[-3 .. -1]
|
196
|
+
if suffix == ".rd" or suffix == ".rb"
|
197
|
+
subtree = parse_subtree(get_included(file))
|
198
|
+
[:SUBTREE, subtree]
|
199
|
+
else
|
200
|
+
[:INCLUDE, file]
|
201
|
+
end
|
202
|
+
end
|
203
|
+
when /^(\s*)\*(\s*)/
|
204
|
+
rest = $' # '
|
205
|
+
newIndent = $2
|
206
|
+
if_current_indent_equal($1) do
|
207
|
+
if @in_verbatim
|
208
|
+
[:STRINGLINE, line]
|
209
|
+
else
|
210
|
+
@indent_stack.push("\s" << newIndent)
|
211
|
+
[:ITEMLISTLINE, rest]
|
212
|
+
end
|
213
|
+
end
|
214
|
+
when /^(\s*)(\(\d+\))(\s*)/
|
215
|
+
rest = $' # '
|
216
|
+
mark = $2
|
217
|
+
newIndent = $3
|
218
|
+
if_current_indent_equal($1) do
|
219
|
+
if @in_verbatim
|
220
|
+
[:STRINGLINE, line]
|
221
|
+
else
|
222
|
+
@indent_stack.push("\s" * mark.size << newIndent)
|
223
|
+
[:ENUMLISTLINE, rest]
|
224
|
+
end
|
225
|
+
end
|
226
|
+
when /^(\s*):(\s*)/
|
227
|
+
rest = $' # '
|
228
|
+
newIndent = $2
|
229
|
+
if_current_indent_equal($1) do
|
230
|
+
if @in_verbatim
|
231
|
+
[:STRINGLINE, line]
|
232
|
+
else
|
233
|
+
@indent_stack.push("\s#{$2}")
|
234
|
+
[:DESCLISTLINE, rest]
|
235
|
+
end
|
236
|
+
end
|
237
|
+
when /^(\s*)---(?!-|\s*$)/
|
238
|
+
indent = $1
|
239
|
+
rest = $'
|
240
|
+
/\s*/ === rest
|
241
|
+
term = $'
|
242
|
+
new_indent = $&
|
243
|
+
if_current_indent_equal(indent) do
|
244
|
+
if @in_verbatim
|
245
|
+
[:STRINGLINE, line]
|
246
|
+
else
|
247
|
+
@indent_stack.push("\s\s\s" + new_indent)
|
248
|
+
[:METHODLISTLINE, term]
|
249
|
+
end
|
250
|
+
end
|
251
|
+
when /^(\s*)/
|
252
|
+
if_current_indent_equal($1) do
|
253
|
+
[:STRINGLINE, line]
|
254
|
+
end
|
255
|
+
else
|
256
|
+
raise "[BUG] parsing error may occured."
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
##
|
261
|
+
# Yields to the given block if +indent+ matches the current indent, otherwise
|
262
|
+
# an indentation token is processed.
|
263
|
+
|
264
|
+
def if_current_indent_equal(indent)
|
265
|
+
indent = indent.sub(/\t/, "\s" * 8)
|
266
|
+
if @current_indent == indent
|
267
|
+
@i += 1 # next line
|
268
|
+
yield
|
269
|
+
elsif indent.index(@current_indent) == 0
|
270
|
+
@indent_stack.push(indent[@current_indent.size .. -1])
|
271
|
+
[:INDENT, ":INDENT"]
|
272
|
+
else
|
273
|
+
@indent_stack.pop
|
274
|
+
[:DEDENT, ":DEDENT"]
|
275
|
+
end
|
276
|
+
end
|
277
|
+
private :if_current_indent_equal
|
278
|
+
|
279
|
+
##
|
280
|
+
# Cuts off excess whitespace in +src+
|
281
|
+
|
282
|
+
def cut_off(src)
|
283
|
+
ret = []
|
284
|
+
whiteline_buf = []
|
285
|
+
|
286
|
+
line = src.shift
|
287
|
+
/^\s*/ =~ line
|
288
|
+
|
289
|
+
indent = Regexp.quote($&)
|
290
|
+
ret.push($')
|
291
|
+
|
292
|
+
while line = src.shift
|
293
|
+
if /^(\s*)$/ =~ line
|
294
|
+
whiteline_buf.push(line)
|
295
|
+
elsif /^#{indent}/ =~ line
|
296
|
+
unless whiteline_buf.empty?
|
297
|
+
ret.concat(whiteline_buf)
|
298
|
+
whiteline_buf.clear
|
299
|
+
end
|
300
|
+
ret.push($')
|
301
|
+
else
|
302
|
+
raise "[BUG]: probably Parser Error while cutting off.\n"
|
303
|
+
end
|
304
|
+
end
|
305
|
+
ret
|
306
|
+
end
|
307
|
+
private :cut_off
|
308
|
+
|
309
|
+
def set_term_to_element(parent, term)
|
310
|
+
# parent.set_term_under_document_struct(term, @tree.document_struct)
|
311
|
+
parent.set_term_without_document_struct(term)
|
312
|
+
end
|
313
|
+
private :set_term_to_element
|
314
|
+
|
315
|
+
##
|
316
|
+
# Raises a ParseError when invalid formatting is found
|
317
|
+
|
318
|
+
def on_error(et, ev, _values)
|
319
|
+
prv, cur, nxt = format_line_num(@i, @i+1, @i+2)
|
320
|
+
|
321
|
+
raise ParseError, <<Msg
|
322
|
+
|
323
|
+
RD syntax error: line #{@i+1}:
|
324
|
+
#{prv} |#{@src[@i-1].chomp}
|
325
|
+
#{cur}=>|#{@src[@i].chomp}
|
326
|
+
#{nxt} |#{@src[@i+1].chomp}
|
327
|
+
|
328
|
+
Msg
|
329
|
+
end
|
330
|
+
|
331
|
+
##
|
332
|
+
# Current line number
|
333
|
+
|
334
|
+
def line_index
|
335
|
+
@i
|
336
|
+
end
|
337
|
+
|
338
|
+
##
|
339
|
+
# Parses subtree +src+
|
340
|
+
|
341
|
+
def parse_subtree src
|
342
|
+
@subparser ||= RDoc::RD::BlockParser.new
|
343
|
+
|
344
|
+
@subparser.parse src
|
345
|
+
end
|
346
|
+
private :parse_subtree
|
347
|
+
|
348
|
+
##
|
349
|
+
# Retrieves the content for +file+ from the include_path
|
350
|
+
|
351
|
+
def get_included(file)
|
352
|
+
included = []
|
353
|
+
|
354
|
+
@include_path.each do |dir|
|
355
|
+
file_name = File.join dir, file
|
356
|
+
|
357
|
+
if File.exist? file_name then
|
358
|
+
included = IO.readlines file_name
|
359
|
+
break
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
included
|
364
|
+
end
|
365
|
+
private :get_included
|
366
|
+
|
367
|
+
##
|
368
|
+
# Formats line numbers +line_numbers+ prettily
|
369
|
+
|
370
|
+
def format_line_num(*line_numbers)
|
371
|
+
width = line_numbers.collect{|i| i.to_s.length }.max
|
372
|
+
line_numbers.collect{|i| sprintf("%#{width}d", i) }
|
373
|
+
end
|
374
|
+
private :format_line_num
|
375
|
+
|
376
|
+
##
|
377
|
+
# Retrieves the content of +values+ as a single String
|
378
|
+
|
379
|
+
def content values
|
380
|
+
values.map { |value| value.content }.join
|
381
|
+
end
|
382
|
+
|
383
|
+
##
|
384
|
+
# Creates a paragraph for +value+
|
385
|
+
|
386
|
+
def paragraph value
|
387
|
+
content = cut_off(value).join(' ').rstrip
|
388
|
+
contents = @inline_parser.parse content
|
389
|
+
|
390
|
+
RDoc::Markup::Paragraph.new(*contents)
|
391
|
+
end
|
392
|
+
|
393
|
+
##
|
394
|
+
# Adds footnote +content+ to the document
|
395
|
+
|
396
|
+
def add_footnote content
|
397
|
+
index = @footnotes.length + 1
|
398
|
+
|
399
|
+
footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]"
|
400
|
+
|
401
|
+
@footnotes << RDoc::Markup::Paragraph.new(footmark_link, *content)
|
402
|
+
|
403
|
+
index
|
404
|
+
end
|
405
|
+
|
406
|
+
##
|
407
|
+
# Adds label +label+ to the document
|
408
|
+
|
409
|
+
def add_label label
|
410
|
+
@labels[label] = true
|
411
|
+
|
412
|
+
label
|
413
|
+
end
|
414
|
+
|
415
|
+
# :stopdoc:
|
416
|
+
|
417
|
+
##### State transition tables begin ###
|
418
|
+
|
419
|
+
racc_action_table = [
|
420
|
+
34, 35, 30, 33, 14, 73, 38, 33, 76, 15,
|
421
|
+
88, 34, 35, 30, 33, 40, 34, 35, 30, 33,
|
422
|
+
40, 65, 34, 35, 30, 33, 14, 73, 77, 14,
|
423
|
+
54, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
424
|
+
12, 15, 34, 35, 30, 33, 14, 73, 81, 54,
|
425
|
+
38, 15, 34, 35, 30, 33, 14, 73, 40, 67,
|
426
|
+
83, 15, 34, 35, 30, 33, 14, 73, 54, 30,
|
427
|
+
35, 15, 34, 35, 30, 33, 34, 47, 36, 14,
|
428
|
+
59, 15, 34, 35, 30, 33, 14, 73, 38, nil,
|
429
|
+
nil, 15, 34, 35, 30, 33, nil, 47, nil, nil,
|
430
|
+
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
431
|
+
nil, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
432
|
+
nil, 15, 34, 35, 30, 33, 14, 9, 10, 11,
|
433
|
+
12, 15, 34, 35, 30, 33, 14, 73, nil, nil,
|
434
|
+
nil, 15, 34, 35, 30, 33, 14, 73, 61, 63,
|
435
|
+
nil, 15, nil, 62, 60, 61, 63, 61, 63, 14,
|
436
|
+
62, 87, 62, nil, 79, 34, 35, 30, 33 ]
|
437
|
+
|
438
|
+
racc_action_check = [
|
439
|
+
86, 86, 86, 86, 86, 86, 57, 31, 49, 86,
|
440
|
+
86, 41, 41, 41, 41, 41, 15, 15, 15, 15,
|
441
|
+
15, 41, 45, 45, 45, 45, 45, 45, 51, 34,
|
442
|
+
54, 45, 0, 0, 0, 0, 0, 0, 0, 0,
|
443
|
+
0, 0, 85, 85, 85, 85, 85, 85, 56, 33,
|
444
|
+
58, 85, 79, 79, 79, 79, 79, 79, 62, 44,
|
445
|
+
66, 79, 78, 78, 78, 78, 78, 78, 30, 28,
|
446
|
+
25, 78, 24, 24, 24, 24, 22, 24, 1, 35,
|
447
|
+
36, 24, 75, 75, 75, 75, 75, 75, 13, nil,
|
448
|
+
nil, 75, 27, 27, 27, 27, nil, 27, nil, nil,
|
449
|
+
nil, 27, 74, 74, 74, 74, 74, 74, nil, nil,
|
450
|
+
nil, 74, 68, 68, 68, 68, 68, 68, nil, nil,
|
451
|
+
nil, 68, 2, 2, 2, 2, 2, 2, 2, 2,
|
452
|
+
2, 2, 46, 46, 46, 46, 46, 46, nil, nil,
|
453
|
+
nil, 46, 47, 47, 47, 47, 47, 47, 39, 39,
|
454
|
+
nil, 47, nil, 39, 39, 82, 82, 64, 64, 52,
|
455
|
+
82, 82, 64, nil, 52, 20, 20, 20, 20 ]
|
456
|
+
|
457
|
+
racc_action_pointer = [
|
458
|
+
29, 78, 119, nil, nil, nil, nil, nil, nil, nil,
|
459
|
+
nil, nil, nil, 81, nil, 13, nil, nil, nil, nil,
|
460
|
+
162, nil, 73, nil, 69, 66, nil, 89, 64, nil,
|
461
|
+
60, 1, nil, 41, 22, 72, 80, nil, nil, 141,
|
462
|
+
nil, 8, nil, nil, 46, 19, 129, 139, nil, -5,
|
463
|
+
nil, 15, 152, nil, 22, nil, 35, -1, 43, nil,
|
464
|
+
nil, nil, 51, nil, 150, nil, 47, nil, 109, nil,
|
465
|
+
nil, nil, nil, nil, 99, 79, nil, nil, 59, 49,
|
466
|
+
nil, nil, 148, nil, nil, 39, -3, nil, nil ]
|
467
|
+
|
468
|
+
racc_action_default = [
|
469
|
+
-2, -73, -1, -4, -5, -6, -7, -8, -9, -10,
|
470
|
+
-11, -12, -13, -14, -16, -73, -23, -24, -25, -26,
|
471
|
+
-27, -31, -32, -34, -72, -36, -38, -72, -40, -42,
|
472
|
+
-59, -44, -46, -59, -63, -65, -73, -3, -15, -73,
|
473
|
+
-22, -73, -30, -33, -73, -69, -70, -71, -37, -73,
|
474
|
+
-41, -73, -51, -58, -61, -45, -73, -62, -64, 89,
|
475
|
+
-17, -19, -73, -21, -18, -28, -73, -35, -66, -53,
|
476
|
+
-54, -55, -56, -57, -67, -68, -39, -43, -49, -73,
|
477
|
+
-60, -47, -73, -29, -52, -48, -73, -20, -50 ]
|
478
|
+
|
479
|
+
racc_goto_table = [
|
480
|
+
4, 39, 4, 68, 74, 75, 5, 6, 5, 6,
|
481
|
+
51, 42, 44, 56, 3, 49, 37, 57, 58, 41,
|
482
|
+
43, 48, 84, 50, 66, 55, 1, 64, 84, 84,
|
483
|
+
45, 46, 42, 45, 46, 2, 85, 86, 80, 84,
|
484
|
+
84, nil, nil, nil, nil, nil, nil, nil, 82, nil,
|
485
|
+
nil, nil, 78 ]
|
486
|
+
|
487
|
+
racc_goto_check = [
|
488
|
+
4, 10, 4, 31, 31, 31, 5, 6, 5, 6,
|
489
|
+
27, 12, 21, 27, 3, 21, 3, 9, 9, 17,
|
490
|
+
19, 23, 32, 26, 11, 29, 1, 10, 32, 32,
|
491
|
+
5, 6, 12, 5, 6, 2, 31, 31, 33, 32,
|
492
|
+
32, nil, nil, nil, nil, nil, nil, nil, 10, nil,
|
493
|
+
nil, nil, 4 ]
|
494
|
+
|
495
|
+
racc_goto_pointer = [
|
496
|
+
nil, 26, 35, 14, 0, 6, 7, nil, nil, -17,
|
497
|
+
-14, -17, -9, nil, nil, nil, nil, 4, nil, -2,
|
498
|
+
nil, -12, nil, -4, nil, nil, -5, -20, nil, -6,
|
499
|
+
nil, -42, -46, -16 ]
|
500
|
+
|
501
|
+
racc_goto_default = [
|
502
|
+
nil, nil, nil, nil, 70, 71, 72, 7, 8, 13,
|
503
|
+
nil, nil, 21, 16, 17, 18, 19, 20, 22, 23,
|
504
|
+
24, nil, 25, 26, 27, 28, 29, nil, 31, 32,
|
505
|
+
52, nil, 69, 53 ]
|
506
|
+
|
507
|
+
racc_reduce_table = [
|
508
|
+
0, 0, :racc_error,
|
509
|
+
1, 15, :_reduce_1,
|
510
|
+
0, 15, :_reduce_2,
|
511
|
+
2, 16, :_reduce_3,
|
512
|
+
1, 16, :_reduce_4,
|
513
|
+
1, 17, :_reduce_5,
|
514
|
+
1, 17, :_reduce_6,
|
515
|
+
1, 17, :_reduce_none,
|
516
|
+
1, 17, :_reduce_8,
|
517
|
+
1, 17, :_reduce_9,
|
518
|
+
1, 17, :_reduce_10,
|
519
|
+
1, 17, :_reduce_11,
|
520
|
+
1, 21, :_reduce_12,
|
521
|
+
1, 22, :_reduce_13,
|
522
|
+
1, 18, :_reduce_14,
|
523
|
+
2, 23, :_reduce_15,
|
524
|
+
1, 23, :_reduce_16,
|
525
|
+
3, 19, :_reduce_17,
|
526
|
+
1, 25, :_reduce_18,
|
527
|
+
2, 24, :_reduce_19,
|
528
|
+
4, 24, :_reduce_20,
|
529
|
+
2, 24, :_reduce_21,
|
530
|
+
1, 24, :_reduce_22,
|
531
|
+
1, 26, :_reduce_none,
|
532
|
+
1, 26, :_reduce_none,
|
533
|
+
1, 26, :_reduce_none,
|
534
|
+
1, 26, :_reduce_none,
|
535
|
+
1, 20, :_reduce_27,
|
536
|
+
3, 20, :_reduce_28,
|
537
|
+
4, 20, :_reduce_29,
|
538
|
+
2, 31, :_reduce_30,
|
539
|
+
1, 31, :_reduce_31,
|
540
|
+
1, 27, :_reduce_32,
|
541
|
+
2, 32, :_reduce_33,
|
542
|
+
1, 32, :_reduce_34,
|
543
|
+
3, 33, :_reduce_35,
|
544
|
+
1, 28, :_reduce_36,
|
545
|
+
2, 36, :_reduce_37,
|
546
|
+
1, 36, :_reduce_38,
|
547
|
+
3, 37, :_reduce_39,
|
548
|
+
1, 29, :_reduce_40,
|
549
|
+
2, 39, :_reduce_41,
|
550
|
+
1, 39, :_reduce_42,
|
551
|
+
3, 40, :_reduce_43,
|
552
|
+
1, 30, :_reduce_44,
|
553
|
+
2, 42, :_reduce_45,
|
554
|
+
1, 42, :_reduce_46,
|
555
|
+
3, 43, :_reduce_47,
|
556
|
+
3, 41, :_reduce_48,
|
557
|
+
2, 41, :_reduce_49,
|
558
|
+
4, 41, :_reduce_50,
|
559
|
+
1, 41, :_reduce_51,
|
560
|
+
2, 45, :_reduce_52,
|
561
|
+
1, 45, :_reduce_none,
|
562
|
+
1, 46, :_reduce_54,
|
563
|
+
1, 46, :_reduce_55,
|
564
|
+
1, 46, :_reduce_none,
|
565
|
+
1, 46, :_reduce_57,
|
566
|
+
1, 44, :_reduce_none,
|
567
|
+
0, 44, :_reduce_none,
|
568
|
+
2, 47, :_reduce_none,
|
569
|
+
1, 47, :_reduce_none,
|
570
|
+
2, 34, :_reduce_62,
|
571
|
+
1, 34, :_reduce_63,
|
572
|
+
2, 38, :_reduce_64,
|
573
|
+
1, 38, :_reduce_65,
|
574
|
+
2, 35, :_reduce_66,
|
575
|
+
2, 35, :_reduce_67,
|
576
|
+
2, 35, :_reduce_68,
|
577
|
+
1, 35, :_reduce_69,
|
578
|
+
1, 35, :_reduce_none,
|
579
|
+
1, 35, :_reduce_71,
|
580
|
+
0, 35, :_reduce_72 ]
|
581
|
+
|
582
|
+
racc_reduce_n = 73
|
583
|
+
|
584
|
+
racc_shift_n = 89
|
585
|
+
|
586
|
+
racc_token_table = {
|
587
|
+
false => 0,
|
588
|
+
:error => 1,
|
589
|
+
:DUMMY => 2,
|
590
|
+
:ITEMLISTLINE => 3,
|
591
|
+
:ENUMLISTLINE => 4,
|
592
|
+
:DESCLISTLINE => 5,
|
593
|
+
:METHODLISTLINE => 6,
|
594
|
+
:STRINGLINE => 7,
|
595
|
+
:WHITELINE => 8,
|
596
|
+
:SUBTREE => 9,
|
597
|
+
:HEADLINE => 10,
|
598
|
+
:INCLUDE => 11,
|
599
|
+
:INDENT => 12,
|
600
|
+
:DEDENT => 13 }
|
601
|
+
|
602
|
+
racc_nt_base = 14
|
603
|
+
|
604
|
+
racc_use_result_var = true
|
605
|
+
|
606
|
+
Racc_arg = [
|
607
|
+
racc_action_table,
|
608
|
+
racc_action_check,
|
609
|
+
racc_action_default,
|
610
|
+
racc_action_pointer,
|
611
|
+
racc_goto_table,
|
612
|
+
racc_goto_check,
|
613
|
+
racc_goto_default,
|
614
|
+
racc_goto_pointer,
|
615
|
+
racc_nt_base,
|
616
|
+
racc_reduce_table,
|
617
|
+
racc_token_table,
|
618
|
+
racc_shift_n,
|
619
|
+
racc_reduce_n,
|
620
|
+
racc_use_result_var ]
|
621
|
+
|
622
|
+
Racc_token_to_s_table = [
|
623
|
+
"$end",
|
624
|
+
"error",
|
625
|
+
"DUMMY",
|
626
|
+
"ITEMLISTLINE",
|
627
|
+
"ENUMLISTLINE",
|
628
|
+
"DESCLISTLINE",
|
629
|
+
"METHODLISTLINE",
|
630
|
+
"STRINGLINE",
|
631
|
+
"WHITELINE",
|
632
|
+
"SUBTREE",
|
633
|
+
"HEADLINE",
|
634
|
+
"INCLUDE",
|
635
|
+
"INDENT",
|
636
|
+
"DEDENT",
|
637
|
+
"$start",
|
638
|
+
"document",
|
639
|
+
"blocks",
|
640
|
+
"block",
|
641
|
+
"textblock",
|
642
|
+
"verbatim",
|
643
|
+
"lists",
|
644
|
+
"headline",
|
645
|
+
"include",
|
646
|
+
"textblockcontent",
|
647
|
+
"verbatimcontent",
|
648
|
+
"verbatim_after_lists",
|
649
|
+
"list",
|
650
|
+
"itemlist",
|
651
|
+
"enumlist",
|
652
|
+
"desclist",
|
653
|
+
"methodlist",
|
654
|
+
"lists2",
|
655
|
+
"itemlistitems",
|
656
|
+
"itemlistitem",
|
657
|
+
"first_textblock_in_itemlist",
|
658
|
+
"other_blocks_in_list",
|
659
|
+
"enumlistitems",
|
660
|
+
"enumlistitem",
|
661
|
+
"first_textblock_in_enumlist",
|
662
|
+
"desclistitems",
|
663
|
+
"desclistitem",
|
664
|
+
"description_part",
|
665
|
+
"methodlistitems",
|
666
|
+
"methodlistitem",
|
667
|
+
"whitelines",
|
668
|
+
"blocks_in_list",
|
669
|
+
"block_in_list",
|
670
|
+
"whitelines2" ]
|
671
|
+
|
672
|
+
Racc_debug_parser = false
|
673
|
+
|
674
|
+
##### State transition tables end #####
|
675
|
+
|
676
|
+
# reduce 0 omitted
|
677
|
+
|
678
|
+
def _reduce_1(val, _values, result)
|
679
|
+
result = RDoc::Markup::Document.new(*val[0])
|
680
|
+
result
|
681
|
+
end
|
682
|
+
|
683
|
+
def _reduce_2(val, _values, result)
|
684
|
+
raise ParseError, "file empty"
|
685
|
+
result
|
686
|
+
end
|
687
|
+
|
688
|
+
def _reduce_3(val, _values, result)
|
689
|
+
result = val[0].concat val[1]
|
690
|
+
result
|
691
|
+
end
|
692
|
+
|
693
|
+
def _reduce_4(val, _values, result)
|
694
|
+
result = val[0]
|
695
|
+
result
|
696
|
+
end
|
697
|
+
|
698
|
+
def _reduce_5(val, _values, result)
|
699
|
+
result = val
|
700
|
+
result
|
701
|
+
end
|
702
|
+
|
703
|
+
def _reduce_6(val, _values, result)
|
704
|
+
result = val
|
705
|
+
result
|
706
|
+
end
|
707
|
+
|
708
|
+
# reduce 7 omitted
|
709
|
+
|
710
|
+
def _reduce_8(val, _values, result)
|
711
|
+
result = val
|
712
|
+
result
|
713
|
+
end
|
714
|
+
|
715
|
+
def _reduce_9(val, _values, result)
|
716
|
+
result = val
|
717
|
+
result
|
718
|
+
end
|
719
|
+
|
720
|
+
def _reduce_10(val, _values, result)
|
721
|
+
result = [RDoc::Markup::BlankLine.new]
|
722
|
+
result
|
723
|
+
end
|
724
|
+
|
725
|
+
def _reduce_11(val, _values, result)
|
726
|
+
result = val[0].parts
|
727
|
+
result
|
728
|
+
end
|
729
|
+
|
730
|
+
def _reduce_12(val, _values, result)
|
731
|
+
# val[0] is like [level, title]
|
732
|
+
title = @inline_parser.parse(val[0][1])
|
733
|
+
result = RDoc::Markup::Heading.new(val[0][0], title)
|
734
|
+
|
735
|
+
result
|
736
|
+
end
|
737
|
+
|
738
|
+
def _reduce_13(val, _values, result)
|
739
|
+
result = RDoc::Markup::Include.new val[0], @include_path
|
740
|
+
|
741
|
+
result
|
742
|
+
end
|
743
|
+
|
744
|
+
def _reduce_14(val, _values, result)
|
745
|
+
# val[0] is Array of String
|
746
|
+
result = paragraph val[0]
|
747
|
+
|
748
|
+
result
|
749
|
+
end
|
750
|
+
|
751
|
+
def _reduce_15(val, _values, result)
|
752
|
+
result << val[1].rstrip
|
753
|
+
result
|
754
|
+
end
|
755
|
+
|
756
|
+
def _reduce_16(val, _values, result)
|
757
|
+
result = [val[0].rstrip]
|
758
|
+
result
|
759
|
+
end
|
760
|
+
|
761
|
+
def _reduce_17(val, _values, result)
|
762
|
+
# val[1] is Array of String
|
763
|
+
content = cut_off val[1]
|
764
|
+
result = RDoc::Markup::Verbatim.new(*content)
|
765
|
+
|
766
|
+
# imform to lexer.
|
767
|
+
@in_verbatim = false
|
768
|
+
|
769
|
+
result
|
770
|
+
end
|
771
|
+
|
772
|
+
def _reduce_18(val, _values, result)
|
773
|
+
# val[0] is Array of String
|
774
|
+
content = cut_off val[0]
|
775
|
+
result = RDoc::Markup::Verbatim.new(*content)
|
776
|
+
|
777
|
+
# imform to lexer.
|
778
|
+
@in_verbatim = false
|
779
|
+
|
780
|
+
result
|
781
|
+
end
|
782
|
+
|
783
|
+
def _reduce_19(val, _values, result)
|
784
|
+
result << val[1]
|
785
|
+
|
786
|
+
result
|
787
|
+
end
|
788
|
+
|
789
|
+
def _reduce_20(val, _values, result)
|
790
|
+
result.concat val[2]
|
791
|
+
|
792
|
+
result
|
793
|
+
end
|
794
|
+
|
795
|
+
def _reduce_21(val, _values, result)
|
796
|
+
result << "\n"
|
797
|
+
|
798
|
+
result
|
799
|
+
end
|
800
|
+
|
801
|
+
def _reduce_22(val, _values, result)
|
802
|
+
result = val
|
803
|
+
# inform to lexer.
|
804
|
+
@in_verbatim = true
|
805
|
+
|
806
|
+
result
|
807
|
+
end
|
808
|
+
|
809
|
+
# reduce 23 omitted
|
810
|
+
|
811
|
+
# reduce 24 omitted
|
812
|
+
|
813
|
+
# reduce 25 omitted
|
814
|
+
|
815
|
+
# reduce 26 omitted
|
816
|
+
|
817
|
+
def _reduce_27(val, _values, result)
|
818
|
+
result = val[0]
|
819
|
+
|
820
|
+
result
|
821
|
+
end
|
822
|
+
|
823
|
+
def _reduce_28(val, _values, result)
|
824
|
+
result = val[1]
|
825
|
+
|
826
|
+
result
|
827
|
+
end
|
828
|
+
|
829
|
+
def _reduce_29(val, _values, result)
|
830
|
+
result = val[1].push(val[2])
|
831
|
+
|
832
|
+
result
|
833
|
+
end
|
834
|
+
|
835
|
+
def _reduce_30(val, _values, result)
|
836
|
+
result = val[0] << val[1]
|
837
|
+
result
|
838
|
+
end
|
839
|
+
|
840
|
+
def _reduce_31(val, _values, result)
|
841
|
+
result = [val[0]]
|
842
|
+
result
|
843
|
+
end
|
844
|
+
|
845
|
+
def _reduce_32(val, _values, result)
|
846
|
+
result = RDoc::Markup::List.new :BULLET, *val[0]
|
847
|
+
|
848
|
+
result
|
849
|
+
end
|
850
|
+
|
851
|
+
def _reduce_33(val, _values, result)
|
852
|
+
result.push(val[1])
|
853
|
+
result
|
854
|
+
end
|
855
|
+
|
856
|
+
def _reduce_34(val, _values, result)
|
857
|
+
result = val
|
858
|
+
result
|
859
|
+
end
|
860
|
+
|
861
|
+
def _reduce_35(val, _values, result)
|
862
|
+
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
863
|
+
|
864
|
+
result
|
865
|
+
end
|
866
|
+
|
867
|
+
def _reduce_36(val, _values, result)
|
868
|
+
result = RDoc::Markup::List.new :NUMBER, *val[0]
|
869
|
+
|
870
|
+
result
|
871
|
+
end
|
872
|
+
|
873
|
+
def _reduce_37(val, _values, result)
|
874
|
+
result.push(val[1])
|
875
|
+
result
|
876
|
+
end
|
877
|
+
|
878
|
+
def _reduce_38(val, _values, result)
|
879
|
+
result = val
|
880
|
+
result
|
881
|
+
end
|
882
|
+
|
883
|
+
def _reduce_39(val, _values, result)
|
884
|
+
result = RDoc::Markup::ListItem.new nil, val[0], *val[1]
|
885
|
+
|
886
|
+
result
|
887
|
+
end
|
888
|
+
|
889
|
+
def _reduce_40(val, _values, result)
|
890
|
+
result = RDoc::Markup::List.new :NOTE, *val[0]
|
891
|
+
|
892
|
+
result
|
893
|
+
end
|
894
|
+
|
895
|
+
def _reduce_41(val, _values, result)
|
896
|
+
result.push(val[1])
|
897
|
+
result
|
898
|
+
end
|
899
|
+
|
900
|
+
def _reduce_42(val, _values, result)
|
901
|
+
result = val
|
902
|
+
result
|
903
|
+
end
|
904
|
+
|
905
|
+
def _reduce_43(val, _values, result)
|
906
|
+
term = @inline_parser.parse val[0].strip
|
907
|
+
|
908
|
+
result = RDoc::Markup::ListItem.new term, *val[1]
|
909
|
+
|
910
|
+
result
|
911
|
+
end
|
912
|
+
|
913
|
+
def _reduce_44(val, _values, result)
|
914
|
+
result = RDoc::Markup::List.new :LABEL, *val[0]
|
915
|
+
|
916
|
+
result
|
917
|
+
end
|
918
|
+
|
919
|
+
def _reduce_45(val, _values, result)
|
920
|
+
result.push(val[1])
|
921
|
+
result
|
922
|
+
end
|
923
|
+
|
924
|
+
def _reduce_46(val, _values, result)
|
925
|
+
result = val
|
926
|
+
result
|
927
|
+
end
|
928
|
+
|
929
|
+
def _reduce_47(val, _values, result)
|
930
|
+
result = RDoc::Markup::ListItem.new "<tt>#{val[0].strip}</tt>", *val[1]
|
931
|
+
|
932
|
+
result
|
933
|
+
end
|
934
|
+
|
935
|
+
def _reduce_48(val, _values, result)
|
936
|
+
result = [val[1]].concat(val[2])
|
937
|
+
|
938
|
+
result
|
939
|
+
end
|
940
|
+
|
941
|
+
def _reduce_49(val, _values, result)
|
942
|
+
result = [val[1]]
|
943
|
+
|
944
|
+
result
|
945
|
+
end
|
946
|
+
|
947
|
+
def _reduce_50(val, _values, result)
|
948
|
+
result = val[2]
|
949
|
+
|
950
|
+
result
|
951
|
+
end
|
952
|
+
|
953
|
+
def _reduce_51(val, _values, result)
|
954
|
+
result = []
|
955
|
+
|
956
|
+
result
|
957
|
+
end
|
958
|
+
|
959
|
+
def _reduce_52(val, _values, result)
|
960
|
+
result.concat val[1]
|
961
|
+
result
|
962
|
+
end
|
963
|
+
|
964
|
+
# reduce 53 omitted
|
965
|
+
|
966
|
+
def _reduce_54(val, _values, result)
|
967
|
+
result = val
|
968
|
+
result
|
969
|
+
end
|
970
|
+
|
971
|
+
def _reduce_55(val, _values, result)
|
972
|
+
result = val
|
973
|
+
result
|
974
|
+
end
|
975
|
+
|
976
|
+
# reduce 56 omitted
|
977
|
+
|
978
|
+
def _reduce_57(val, _values, result)
|
979
|
+
result = []
|
980
|
+
result
|
981
|
+
end
|
982
|
+
|
983
|
+
# reduce 58 omitted
|
984
|
+
|
985
|
+
# reduce 59 omitted
|
986
|
+
|
987
|
+
# reduce 60 omitted
|
988
|
+
|
989
|
+
# reduce 61 omitted
|
990
|
+
|
991
|
+
def _reduce_62(val, _values, result)
|
992
|
+
result = paragraph [val[0]].concat(val[1])
|
993
|
+
|
994
|
+
result
|
995
|
+
end
|
996
|
+
|
997
|
+
def _reduce_63(val, _values, result)
|
998
|
+
result = paragraph [val[0]]
|
999
|
+
|
1000
|
+
result
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
def _reduce_64(val, _values, result)
|
1004
|
+
result = paragraph [val[0]].concat(val[1])
|
1005
|
+
|
1006
|
+
result
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
def _reduce_65(val, _values, result)
|
1010
|
+
result = paragraph [val[0]]
|
1011
|
+
|
1012
|
+
result
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
def _reduce_66(val, _values, result)
|
1016
|
+
result = [val[0]].concat(val[1])
|
1017
|
+
|
1018
|
+
result
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
def _reduce_67(val, _values, result)
|
1022
|
+
result.concat val[1]
|
1023
|
+
result
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
def _reduce_68(val, _values, result)
|
1027
|
+
result = val[1]
|
1028
|
+
result
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
def _reduce_69(val, _values, result)
|
1032
|
+
result = val
|
1033
|
+
result
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
# reduce 70 omitted
|
1037
|
+
|
1038
|
+
def _reduce_71(val, _values, result)
|
1039
|
+
result = []
|
1040
|
+
result
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
def _reduce_72(val, _values, result)
|
1044
|
+
result = []
|
1045
|
+
result
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
def _reduce_none(val, _values, result)
|
1049
|
+
val[0]
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
end # class BlockParser
|
1053
|
+
|
1054
|
+
end
|