raf 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING +674 -0
- data/Gemfile.lock +20 -0
- data/History.rdoc +2 -0
- data/LICENSE.txt +11 -17
- data/README.rdoc +2 -13
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/bin/raf2html +18 -0
- data/lib/default.css +116 -0
- data/lib/parserutility.rb +18 -0
- data/lib/raf2html.rb +167 -0
- data/lib/raf2html_element.rb +195 -0
- data/lib/rafblockparser.output +670 -0
- data/lib/rafblockparser.ry +356 -0
- data/lib/rafblockparser.tab.rb +717 -0
- data/lib/rafelement.rb +219 -0
- data/lib/rafinlineparser.output +1804 -0
- data/lib/rafinlineparser.ry +451 -0
- data/lib/rafinlineparser.tab.rb +1117 -0
- data/raf.gemspec +118 -0
- data/test/test_descblock.rb +88 -0
- data/test/test_emphasis.rb +76 -0
- data/test/test_erb.rb +23 -0
- data/test/test_footnote.rb +38 -0
- data/test/test_headline.rb +43 -0
- data/test/test_headline_and_itemlist.rb +40 -0
- data/test/test_helper.rb +2 -0
- data/test/test_image.rb +81 -0
- data/test/test_italic.rb +76 -0
- data/test/test_itemlistblock.rb +151 -0
- data/test/test_numlistblock.rb +342 -0
- data/test/test_paragraph.rb +76 -0
- data/test/test_quoteblock.rb +109 -0
- data/test/test_reference.rb +47 -0
- data/test/test_ruby.rb +66 -0
- data/test/test_strike.rb +76 -0
- data/test/test_tableblock.rb +63 -0
- data/test/test_verb.rb +86 -0
- data/test/ts_block.rb +9 -0
- data/test/ts_inline.rb +8 -0
- data/test/ts_rafparser.rb +4 -0
- metadata +67 -12
- data/lib/raf.rb +0 -0
- data/test/test_raf.rb +0 -7
@@ -0,0 +1,1117 @@
|
|
1
|
+
#
|
2
|
+
# DO NOT MODIFY!!!!
|
3
|
+
# This file is automatically generated by Racc 1.4.6
|
4
|
+
# from Racc grammer file "".
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'racc/parser.rb'
|
8
|
+
|
9
|
+
require "parserutility"
|
10
|
+
require 'strscan'
|
11
|
+
require 'erb'
|
12
|
+
require 'rafelement'
|
13
|
+
|
14
|
+
module Raf
|
15
|
+
class InlineParser < Racc::Parser
|
16
|
+
|
17
|
+
module_eval(<<'...end rafinlineparser.ry/module_eval...', 'rafinlineparser.ry', 201)
|
18
|
+
include ParserUtility
|
19
|
+
|
20
|
+
EM_OPEN = '((*'
|
21
|
+
EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/
|
22
|
+
EM_CLOSE = '*))'
|
23
|
+
EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/
|
24
|
+
|
25
|
+
ITALIC_OPEN = '((_'
|
26
|
+
ITALIC_OPEN_RE = /\A#{Regexp.quote(ITALIC_OPEN)}/
|
27
|
+
ITALIC_CLOSE = '_))'
|
28
|
+
ITALIC_CLOSE_RE = /\A#{Regexp.quote(ITALIC_CLOSE)}/
|
29
|
+
|
30
|
+
STRIKE_OPEN = '((-'
|
31
|
+
STRIKE_OPEN_RE = /\A#{Regexp.quote(STRIKE_OPEN)}/
|
32
|
+
STRIKE_CLOSE = '-))'
|
33
|
+
STRIKE_CLOSE_RE = /\A#{Regexp.quote(STRIKE_CLOSE)}/
|
34
|
+
|
35
|
+
RUBY_OPEN = '((^'
|
36
|
+
RUBY_OPEN_RE = /\A#{Regexp.quote(RUBY_OPEN)}/
|
37
|
+
RUBY_CLOSE = '^))'
|
38
|
+
RUBY_CLOSE_RE = /\A#{Regexp.quote(RUBY_CLOSE)}/
|
39
|
+
|
40
|
+
FOOTNOTE_OPEN = '((['
|
41
|
+
FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/
|
42
|
+
FOOTNOTE_CLOSE = ']))'
|
43
|
+
FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/
|
44
|
+
|
45
|
+
IMAGE_OPEN = '(($'
|
46
|
+
IMAGE_OPEN_RE = /\A#{Regexp.quote(IMAGE_OPEN)}/
|
47
|
+
IMAGE_CLOSE = '$))'
|
48
|
+
IMAGE_CLOSE_RE = /\A#{Regexp.quote(IMAGE_CLOSE)}/
|
49
|
+
|
50
|
+
|
51
|
+
LABEL_OPEN = '((>'
|
52
|
+
LABEL_OPEN_RE = /\A#{Regexp.quote(LABEL_OPEN)}/
|
53
|
+
LABEL_CLOSE = '<))'
|
54
|
+
LABEL_CLOSE_RE = /\A#{Regexp.quote(LABEL_CLOSE)}/
|
55
|
+
|
56
|
+
LABEL_HTML_OPEN = '((>'
|
57
|
+
LABEL_HTML_OPEN_RE = /\A#{Regexp.quote(LABEL_HTML_OPEN)}/
|
58
|
+
LABEL_HTML_CLOSE = '<))'
|
59
|
+
LABEL_HTML_CLOSE_RE = /\A#{Regexp.quote(LABEL_HTML_CLOSE)}/
|
60
|
+
|
61
|
+
|
62
|
+
REFERENCE_OPEN = '((<'
|
63
|
+
REFERENCE_OPEN_RE = /\A#{Regexp.quote(REFERENCE_OPEN)}/
|
64
|
+
REFERENCE_CLOSE = '>))'
|
65
|
+
REFERENCE_CLOSE_RE = /\A#{Regexp.quote(REFERENCE_CLOSE)}/
|
66
|
+
|
67
|
+
REFERENCE_HTML_OPEN = '((<'
|
68
|
+
REFERENCE_HTML_OPEN_RE = /\A#{Regexp.quote(REFERENCE_HTML_OPEN)}/
|
69
|
+
REFERENCE_HTML_CLOSE = '>))'
|
70
|
+
REFERENCE_HTML_CLOSE_RE = /\A#{Regexp.quote(REFERENCE_HTML_CLOSE)}/
|
71
|
+
|
72
|
+
VERB_OPEN = "(('"
|
73
|
+
VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/
|
74
|
+
VERB_CLOSE = "'))"
|
75
|
+
VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/
|
76
|
+
|
77
|
+
MANUEDO_OPEN = "((/"
|
78
|
+
MANUEDO_OPEN_RE = /\A#{Regexp.quote(MANUEDO_OPEN)}/
|
79
|
+
MANUEDO_CLOSE = "/))"
|
80
|
+
MANUEDO_CLOSE_RE = /\A#{Regexp.quote(MANUEDO_CLOSE)}/
|
81
|
+
|
82
|
+
ERB_OPEN = "<%="
|
83
|
+
ERB_OPEN_RE = /\A#{Regexp.quote(ERB_OPEN)}/
|
84
|
+
ERB_CLOSE = "%>"
|
85
|
+
ERB_CLOSE_RE = /\A#{Regexp.quote(ERB_CLOSE)}/
|
86
|
+
|
87
|
+
BAR = "|"
|
88
|
+
BAR_RE = /\A#{Regexp.quote(BAR)}/
|
89
|
+
QUOTE = '"'
|
90
|
+
QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/
|
91
|
+
SLASH = "/"
|
92
|
+
SLASH_RE = /\A#{Regexp.quote(SLASH)}/
|
93
|
+
BACK_SLASH = "\\"
|
94
|
+
BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/
|
95
|
+
# URL = "URL:"
|
96
|
+
# URL_RE = /\A#{Regexp.quote(URL)}/
|
97
|
+
|
98
|
+
#other_re_mode = Regexp::EXTENDED
|
99
|
+
other_re_mode = Regexp::MULTILINE
|
100
|
+
OTHER_RE = Regexp.new(
|
101
|
+
"\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}|#{Regexp.quote(ITALIC_OPEN)}|#{Regexp.quote(ITALIC_CLOSE)}|#{Regexp.quote(STRIKE_OPEN)}|#{Regexp.quote(STRIKE_CLOSE)}|#{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}|#{Regexp.quote(RUBY_OPEN)}|#{Regexp.quote(RUBY_CLOSE)}|#{Regexp.quote(IMAGE_OPEN)}|#{Regexp.quote(IMAGE_CLOSE)}|#{Regexp.quote(LABEL_OPEN)}|#{Regexp.quote(LABEL_CLOSE)}|#{Regexp.quote(LABEL_HTML_OPEN)}|#{Regexp.quote(LABEL_HTML_CLOSE)}|#{Regexp.quote(REFERENCE_OPEN)}|#{Regexp.quote(REFERENCE_CLOSE)}|#{Regexp.quote(REFERENCE_HTML_OPEN)}|#{Regexp.quote(REFERENCE_HTML_CLOSE)}|#{Regexp.quote(MANUEDO_OPEN)}|#{Regexp.quote(MANUEDO_CLOSE)}|#{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}|#{Regexp.quote(ERB_OPEN)}|#{Regexp.quote(ERB_CLOSE)}|#{Regexp.quote(BAR)}|#{Regexp.quote(QUOTE)}|#{Regexp.quote(SLASH)}|#{Regexp.quote(BACK_SLASH)})", other_re_mode)
|
102
|
+
|
103
|
+
|
104
|
+
def parse(src)
|
105
|
+
@src = StringScanner.new(src.to_s)
|
106
|
+
@pre = ""
|
107
|
+
@@yydebug = true
|
108
|
+
@view_token_type = false
|
109
|
+
do_parse
|
110
|
+
end
|
111
|
+
def initialize
|
112
|
+
@index = {}
|
113
|
+
end
|
114
|
+
attr_reader :index
|
115
|
+
|
116
|
+
def next_token
|
117
|
+
return [false, false] if @src.eos?
|
118
|
+
if ret = @src.scan(EM_OPEN_RE)
|
119
|
+
puts "i: EM_OPEN: #{ret}" if @view_token_type
|
120
|
+
@pre << ret
|
121
|
+
[:EM_OPEN, ret]
|
122
|
+
elsif ret = @src.scan(EM_CLOSE_RE)
|
123
|
+
puts "i: EM_CLOSE: #{ret}" if @view_token_type
|
124
|
+
@pre << ret
|
125
|
+
[:EM_CLOSE, ret]
|
126
|
+
elsif ret = @src.scan(ITALIC_OPEN_RE)
|
127
|
+
puts "i: ITALIC_OPEN: #{ret}" if @view_token_type
|
128
|
+
@pre << ret
|
129
|
+
[:ITALIC_OPEN, ret]
|
130
|
+
elsif ret = @src.scan(ITALIC_CLOSE_RE)
|
131
|
+
puts "i: ITALIC_CLOSE: #{ret}" if @view_token_type
|
132
|
+
@pre << ret
|
133
|
+
[:ITALIC_CLOSE, ret]
|
134
|
+
elsif ret = @src.scan(STRIKE_OPEN_RE)
|
135
|
+
@pre << ret
|
136
|
+
puts "i: STRIKE_OPEN: #{ret}" if @view_token_type
|
137
|
+
[:STRIKE_OPEN, ret]
|
138
|
+
elsif ret = @src.scan(STRIKE_CLOSE_RE)
|
139
|
+
@pre << ret
|
140
|
+
puts "i: STRIKE_CLOSE: #{ret}" if @view_token_type
|
141
|
+
[:STRIKE_CLOSE, ret]
|
142
|
+
elsif ret = @src.scan(LABEL_OPEN_RE)
|
143
|
+
@pre << ret
|
144
|
+
puts "i: LABEL_OPEN: #{ret}" if @view_token_type
|
145
|
+
[:LABEL_OPEN, ret]
|
146
|
+
elsif ret = @src.scan(LABEL_CLOSE_RE)
|
147
|
+
puts "i: LABEL_CLOSE: #{ret}" if @view_token_type
|
148
|
+
@pre << ret
|
149
|
+
[:LABEL_CLOSE, ret]
|
150
|
+
elsif ret = @src.scan(LABEL_HTML_OPEN_RE)
|
151
|
+
@pre << ret
|
152
|
+
puts "i: LABEL_OPEN: #{ret}" if @view_token_type
|
153
|
+
[:LABEL_OPEN, ret]
|
154
|
+
elsif ret = @src.scan(LABEL_HTML_CLOSE_RE)
|
155
|
+
puts "i: LABEL_CLOSE: #{ret}" if @view_token_type
|
156
|
+
@pre << ret
|
157
|
+
[:LABEL_CLOSE, ret]
|
158
|
+
elsif ret = @src.scan(REFERENCE_OPEN_RE)
|
159
|
+
puts "i: REFERENCE_OPEN: #{ret}" if @view_token_type
|
160
|
+
@pre << ret
|
161
|
+
[:REFERENCE_OPEN, ret]
|
162
|
+
elsif ret = @src.scan(REFERENCE_CLOSE_RE)
|
163
|
+
puts "i: REFERENCE_CLOSE: #{ret}" if @view_token_type
|
164
|
+
@pre << ret
|
165
|
+
[:REFERENCE_CLOSE, ret]
|
166
|
+
elsif ret = @src.scan(REFERENCE_HTML_OPEN_RE)
|
167
|
+
puts "i: REFERENCE_HTML_OPEN: #{ret}" if @view_token_type
|
168
|
+
@pre << ret
|
169
|
+
[:REFERENCE_OPEN, ret]
|
170
|
+
elsif ret = @src.scan(REFERENCE_HTML_CLOSE_RE)
|
171
|
+
puts "i: REFERENCE_HTML_CLOSE: #{ret}" if @view_token_type
|
172
|
+
@pre << ret
|
173
|
+
[:REFERENCE_CLOSE, ret]
|
174
|
+
elsif ret = @src.scan(VERB_OPEN_RE)
|
175
|
+
puts "i: VERB_OPEN: #{ret}" if @view_token_type
|
176
|
+
@pre << ret
|
177
|
+
[:VERB_OPEN, ret]
|
178
|
+
elsif ret = @src.scan(VERB_CLOSE_RE)
|
179
|
+
puts "i: VERB_CLOSE: #{ret}" if @view_token_type
|
180
|
+
@pre << ret
|
181
|
+
[:VERB_CLOSE, ret]
|
182
|
+
elsif ret = @src.scan(RUBY_OPEN_RE)
|
183
|
+
puts "i: RUBY_OPEN: #{ret}" if @view_token_type
|
184
|
+
@pre << ret
|
185
|
+
[:RUBY_OPEN, ret]
|
186
|
+
elsif ret = @src.scan(RUBY_CLOSE_RE)
|
187
|
+
puts "i: RUBY_CLOSE: #{ret}" if @view_token_type
|
188
|
+
@pre << ret
|
189
|
+
[:RUBY_CLOSE, ret]
|
190
|
+
elsif ret = @src.scan(FOOTNOTE_OPEN_RE)
|
191
|
+
puts "i: FOOTNOTE_OPEN: #{ret}" if @view_token_type
|
192
|
+
@pre << ret
|
193
|
+
[:FOOTNOTE_OPEN, ret]
|
194
|
+
elsif ret = @src.scan(FOOTNOTE_CLOSE_RE)
|
195
|
+
puts "i: FOOTNOTE_CLOSE: #{ret}" if @view_token_type
|
196
|
+
@pre << ret
|
197
|
+
[:FOOTNOTE_CLOSE, ret]
|
198
|
+
elsif ret = @src.scan(IMAGE_OPEN_RE)
|
199
|
+
puts "i: IMAGE_OPEN: #{ret}" if @view_token_type
|
200
|
+
@pre << ret
|
201
|
+
[:IMAGE_OPEN, ret]
|
202
|
+
elsif ret = @src.scan(IMAGE_CLOSE_RE)
|
203
|
+
puts "i: IMAGE_CLOSE: #{ret}" if @view_token_type
|
204
|
+
@pre << ret
|
205
|
+
[:IMAGE_CLOSE, ret]
|
206
|
+
elsif ret = @src.scan(MANUEDO_OPEN_RE)
|
207
|
+
puts "i: MANUEDO_OPEN: #{ret}" if @view_token_type
|
208
|
+
@pre << ret
|
209
|
+
[:MANUEDO_OPEN, ret]
|
210
|
+
elsif ret = @src.scan(MANUEDO_CLOSE_RE)
|
211
|
+
puts "i: MANUED_CLOSE: #{ret}" if @view_token_type
|
212
|
+
@pre << ret
|
213
|
+
[:MANUEDO_CLOSE, ret]
|
214
|
+
elsif ret = @src.scan(ERB_OPEN_RE)
|
215
|
+
puts "i: ERB_OPEN: #{ret}" if @view_token_type
|
216
|
+
@pre << ret
|
217
|
+
[:ERB_OPEN, ret]
|
218
|
+
elsif ret = @src.scan(ERB_CLOSE_RE)
|
219
|
+
puts "i: ERB_CLOSE: #{ret}" if @view_token_type
|
220
|
+
@pre << ret
|
221
|
+
[:ERB_CLOSE, ret]
|
222
|
+
elsif ret = @src.scan(BAR_RE)
|
223
|
+
puts "i: BAR: #{ret}" if @view_token_type
|
224
|
+
@pre << ret
|
225
|
+
[:BAR, ret]
|
226
|
+
elsif ret = @src.scan(QUOTE_RE)
|
227
|
+
puts "i: QUOTE: #{ret}" if @view_token_type
|
228
|
+
@pre << ret
|
229
|
+
[:QUOTE, ret]
|
230
|
+
elsif ret = @src.scan(SLASH_RE)
|
231
|
+
puts "i: SLASH: #{ret}" if @view_token_type
|
232
|
+
@pre << ret
|
233
|
+
[:SLASH, ret]
|
234
|
+
elsif ret = @src.scan(BACK_SLASH_RE)
|
235
|
+
puts "i: BACK_SLASH: #{ret}" if @view_token_type
|
236
|
+
@pre << ret
|
237
|
+
[:BACK_SLASH, ret]
|
238
|
+
elsif ret = @src.scan(OTHER_RE)
|
239
|
+
puts "i: OTHER_RE: #{ret}" if @view_token_type
|
240
|
+
@pre << ret
|
241
|
+
[:OTHER, ret]
|
242
|
+
else
|
243
|
+
puts "i: OTHER_RE(else): #{ret}" if @view_token_type
|
244
|
+
ret = @src.rest
|
245
|
+
@pre << ret
|
246
|
+
@src.terminate
|
247
|
+
[:OTHER, ret]
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
...end rafinlineparser.ry/module_eval...
|
252
|
+
##### State transition tables begin ###
|
253
|
+
|
254
|
+
racc_action_table = [
|
255
|
+
8, 145, 14, 144, 20, 147, 24, 143, 30, 103,
|
256
|
+
5, 152, 11, 140, 17, 146, 22, nil, 27, nil,
|
257
|
+
2, nil, 7, 10, 13, 16, 19, 8, nil, 14,
|
258
|
+
nil, 20, nil, 24, nil, 30, nil, 5, nil, 11,
|
259
|
+
nil, 17, nil, 22, nil, 27, nil, 2, nil, 7,
|
260
|
+
10, 13, 16, 19, 111, 114, 117, 120, 123, 126,
|
261
|
+
127, 130, 131, 104, 107, 110, 113, 116, 119, 122,
|
262
|
+
125, 128, 129, 154, 105, 108, 112, 115, 118, 121,
|
263
|
+
124, 39, 42, 45, 49, 52, 55, 57, 58, 61,
|
264
|
+
35, 37, nil, 41, 44, 48, 51, 54, 56, 59,
|
265
|
+
62, 36, 38, 40, 43, 46, 50, 53, 8, nil,
|
266
|
+
14, nil, 20, nil, 24, nil, 30, nil, 5, nil,
|
267
|
+
11, nil, 17, nil, 22, nil, 27, nil, 2, nil,
|
268
|
+
7, 10, 13, 16, 19, 39, 42, 45, 49, 52,
|
269
|
+
55, 57, 58, 61, 35, 37, nil, 41, 44, 48,
|
270
|
+
51, 54, 56, 59, 62, 36, 38, 40, 43, 46,
|
271
|
+
50, 53, 8, nil, 14, nil, 20, nil, 24, nil,
|
272
|
+
30, nil, 5, nil, 11, nil, 17, nil, 22, nil,
|
273
|
+
27, nil, 2, nil, 7, 10, 13, 16, 19, 8,
|
274
|
+
nil, 14, nil, 20, nil, 24, nil, 30, nil, 5,
|
275
|
+
nil, 11, nil, 17, nil, 22, nil, 27, nil, 2,
|
276
|
+
nil, 7, 10, 13, 16, 19, 8, nil, 14, nil,
|
277
|
+
20, nil, 24, nil, 30, nil, 5, nil, 11, nil,
|
278
|
+
17, nil, 22, nil, 27, nil, 2, nil, 7, 10,
|
279
|
+
13, 16, 19, 73, 77, 81, 84, 87, 90, 91,
|
280
|
+
92, 94, 68, 70, 72, 76, 80, 83, 86, 89,
|
281
|
+
nil, 93, 95, 69, 71, 74, 78, 82, 85, 88,
|
282
|
+
73, 77, 81, 84, 87, 90, 91, 92, 94, 68,
|
283
|
+
70, 72, 76, 80, 83, 86, 89, 149, 93, 95,
|
284
|
+
69, 71, 74, 78, 82, 85, 88, 39, 42, 45,
|
285
|
+
49, 52, 55, 57, 58, 61, 35, 37, 141, 41,
|
286
|
+
44, 48, 51, 54, 56, 59, 62, 36, 38, 40,
|
287
|
+
43, 46, 50, 53, 111, 114, 117, 120, 123, 126,
|
288
|
+
127, 130, 131, 104, 107, 110, 113, 116, 119, 122,
|
289
|
+
125, 128, 129, nil, 105, 108, 112, 115, 118, 121,
|
290
|
+
124, 8, nil, 14, nil, 20, nil, 24, nil, 30,
|
291
|
+
nil, 5, nil, 11, 151, 17, nil, 22, nil, 27,
|
292
|
+
nil, 2, 155, 7, 10, 13, 16, 19, nil, 96,
|
293
|
+
97, 98, 99, 101, nil, 133, 134, 135, 136, 137,
|
294
|
+
7, 10, 13, 16, 19, 96, 97, 98, 99, 101,
|
295
|
+
133, 134, 135, 136, 137 ]
|
296
|
+
|
297
|
+
racc_action_check = [
|
298
|
+
0, 65, 0, 64, 0, 67, 0, 63, 0, 26,
|
299
|
+
0, 103, 0, 33, 0, 66, 0, nil, 0, nil,
|
300
|
+
0, nil, 0, 0, 0, 0, 0, 2, nil, 2,
|
301
|
+
nil, 2, nil, 2, nil, 2, nil, 2, nil, 2,
|
302
|
+
nil, 2, nil, 2, nil, 2, nil, 2, nil, 2,
|
303
|
+
2, 2, 2, 2, 109, 109, 109, 109, 109, 109,
|
304
|
+
109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
|
305
|
+
109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
|
306
|
+
109, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
307
|
+
5, 5, nil, 5, 5, 5, 5, 5, 5, 5,
|
308
|
+
5, 5, 5, 5, 5, 5, 5, 5, 8, nil,
|
309
|
+
8, nil, 8, nil, 8, nil, 8, nil, 8, nil,
|
310
|
+
8, nil, 8, nil, 8, nil, 8, nil, 8, nil,
|
311
|
+
8, 8, 8, 8, 8, 11, 11, 11, 11, 11,
|
312
|
+
11, 11, 11, 11, 11, 11, nil, 11, 11, 11,
|
313
|
+
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
|
314
|
+
11, 11, 14, nil, 14, nil, 14, nil, 14, nil,
|
315
|
+
14, nil, 14, nil, 14, nil, 14, nil, 14, nil,
|
316
|
+
14, nil, 14, nil, 14, 14, 14, 14, 14, 17,
|
317
|
+
nil, 17, nil, 17, nil, 17, nil, 17, nil, 17,
|
318
|
+
nil, 17, nil, 17, nil, 17, nil, 17, nil, 17,
|
319
|
+
nil, 17, 17, 17, 17, 17, 20, nil, 20, nil,
|
320
|
+
20, nil, 20, nil, 20, nil, 20, nil, 20, nil,
|
321
|
+
20, nil, 20, nil, 20, nil, 20, nil, 20, 20,
|
322
|
+
20, 20, 20, 22, 22, 22, 22, 22, 22, 22,
|
323
|
+
22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
324
|
+
nil, 22, 22, 22, 22, 22, 22, 22, 22, 22,
|
325
|
+
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
326
|
+
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
|
327
|
+
79, 79, 79, 79, 79, 79, 79, 60, 60, 60,
|
328
|
+
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
|
329
|
+
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
|
330
|
+
60, 60, 60, 60, 27, 27, 27, 27, 27, 27,
|
331
|
+
27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
|
332
|
+
27, 27, 27, nil, 27, 27, 27, 27, 27, 27,
|
333
|
+
27, 29, nil, 29, nil, 29, nil, 29, nil, 29,
|
334
|
+
nil, 29, nil, 29, 102, 29, nil, 29, nil, 29,
|
335
|
+
nil, 29, 139, 29, 29, 29, 29, 29, nil, 102,
|
336
|
+
102, 102, 102, 102, nil, 139, 139, 139, 139, 139,
|
337
|
+
3, 3, 3, 3, 3, 24, 24, 24, 24, 24,
|
338
|
+
30, 30, 30, 30, 30 ]
|
339
|
+
|
340
|
+
racc_action_pointer = [
|
341
|
+
-2, nil, 25, 366, nil, 79, nil, nil, 106, nil,
|
342
|
+
nil, 133, nil, nil, 160, nil, nil, 187, nil, nil,
|
343
|
+
214, nil, 241, nil, 371, nil, 9, 322, nil, 349,
|
344
|
+
376, nil, nil, -10, nil, nil, nil, nil, nil, nil,
|
345
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
346
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
347
|
+
295, nil, nil, 4, -12, -4, -2, -2, nil, nil,
|
348
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 268,
|
349
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
350
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
351
|
+
nil, nil, 355, 11, nil, nil, nil, nil, nil, 52,
|
352
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
353
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
354
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 361,
|
355
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
356
|
+
nil, nil, nil, nil, nil, nil, nil ]
|
357
|
+
|
358
|
+
racc_action_default = [
|
359
|
+
-1, -126, -1, -16, -5, -133, -6, -130, -1, -7,
|
360
|
+
-129, -133, -8, -131, -1, -9, -132, -1, -10, -128,
|
361
|
+
-1, -11, -133, -12, -133, -13, -133, -133, -14, -2,
|
362
|
+
-133, -15, -4, -133, -127, -115, -110, -122, -111, -102,
|
363
|
+
-99, -112, -103, -98, -113, -104, -100, -123, -120, -105,
|
364
|
+
-101, -121, -106, -97, -118, -107, -119, -116, -117, -108,
|
365
|
+
-133, -114, -109, -133, -133, -133, -133, -133, -68, -63,
|
366
|
+
-74, -64, -75, -55, -52, -77, -65, -56, -51, -133,
|
367
|
+
-66, -57, -53, -72, -58, -54, -73, -59, -50, -71,
|
368
|
+
-60, -69, -70, -61, -67, -62, -83, -82, -84, -85,
|
369
|
+
-87, -81, -133, -133, -39, -34, -48, -44, -35, -133,
|
370
|
+
-45, -26, -23, -36, -27, -22, -37, -28, -24, -42,
|
371
|
+
-29, -25, -43, -30, -21, -32, -31, -40, -33, -46,
|
372
|
+
-41, -38, -3, -91, -90, -92, -93, -89, -95, -133,
|
373
|
+
-80, -125, -124, -17, -79, -18, -20, -19, -76, -78,
|
374
|
+
-86, -88, 157, -47, -49, -96, -94 ]
|
375
|
+
|
376
|
+
racc_goto_table = [
|
377
|
+
138, 106, 100, 75, 47, 26, 79, 33, 109, 102,
|
378
|
+
64, 132, 139, 63, 60, 34, nil, nil, nil, 65,
|
379
|
+
nil, nil, 66, nil, nil, 67, nil, nil, nil, nil,
|
380
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
381
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
382
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 142,
|
383
|
+
148, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
384
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
385
|
+
150, nil, nil, 153, nil, nil, nil, nil, nil, nil,
|
386
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
387
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 156 ]
|
388
|
+
|
389
|
+
racc_goto_check = [
|
390
|
+
23, 16, 21, 18, 20, 1, 19, 1, 17, 22,
|
391
|
+
20, 3, 24, 1, 25, 26, nil, nil, nil, 1,
|
392
|
+
nil, nil, 1, nil, nil, 1, nil, nil, nil, nil,
|
393
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
394
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
395
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 20,
|
396
|
+
18, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
397
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
398
|
+
21, nil, nil, 16, nil, nil, nil, nil, nil, nil,
|
399
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
400
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 23 ]
|
401
|
+
|
402
|
+
racc_goto_pointer = [
|
403
|
+
nil, 5, nil, -18, nil, nil, nil, nil, nil, nil,
|
404
|
+
nil, nil, nil, nil, nil, nil, -26, -19, -19, -16,
|
405
|
+
-1, -22, -15, -30, -18, 9, 12 ]
|
406
|
+
|
407
|
+
racc_goto_default = [
|
408
|
+
nil, nil, 29, 32, 4, 6, 9, 12, 15, 18,
|
409
|
+
21, 23, 25, 28, 31, 3, nil, nil, nil, nil,
|
410
|
+
nil, nil, nil, nil, nil, nil, 1 ]
|
411
|
+
|
412
|
+
racc_reduce_table = [
|
413
|
+
0, 0, :racc_error,
|
414
|
+
0, 30, :_reduce_none,
|
415
|
+
1, 30, :_reduce_none,
|
416
|
+
2, 31, :_reduce_3,
|
417
|
+
1, 31, :_reduce_4,
|
418
|
+
1, 32, :_reduce_none,
|
419
|
+
1, 32, :_reduce_none,
|
420
|
+
1, 32, :_reduce_none,
|
421
|
+
1, 32, :_reduce_none,
|
422
|
+
1, 32, :_reduce_none,
|
423
|
+
1, 32, :_reduce_none,
|
424
|
+
1, 32, :_reduce_none,
|
425
|
+
1, 32, :_reduce_none,
|
426
|
+
1, 32, :_reduce_none,
|
427
|
+
1, 32, :_reduce_none,
|
428
|
+
1, 32, :_reduce_none,
|
429
|
+
1, 32, :_reduce_none,
|
430
|
+
3, 33, :_reduce_17,
|
431
|
+
3, 34, :_reduce_18,
|
432
|
+
3, 35, :_reduce_19,
|
433
|
+
3, 39, :_reduce_20,
|
434
|
+
1, 45, :_reduce_none,
|
435
|
+
1, 45, :_reduce_none,
|
436
|
+
1, 45, :_reduce_none,
|
437
|
+
1, 45, :_reduce_none,
|
438
|
+
1, 45, :_reduce_none,
|
439
|
+
1, 45, :_reduce_none,
|
440
|
+
1, 45, :_reduce_none,
|
441
|
+
1, 45, :_reduce_none,
|
442
|
+
1, 45, :_reduce_none,
|
443
|
+
1, 45, :_reduce_none,
|
444
|
+
1, 45, :_reduce_none,
|
445
|
+
1, 45, :_reduce_none,
|
446
|
+
1, 45, :_reduce_none,
|
447
|
+
1, 45, :_reduce_none,
|
448
|
+
1, 45, :_reduce_none,
|
449
|
+
1, 45, :_reduce_none,
|
450
|
+
1, 45, :_reduce_none,
|
451
|
+
1, 45, :_reduce_none,
|
452
|
+
1, 45, :_reduce_none,
|
453
|
+
1, 45, :_reduce_none,
|
454
|
+
1, 45, :_reduce_none,
|
455
|
+
1, 45, :_reduce_none,
|
456
|
+
1, 45, :_reduce_none,
|
457
|
+
1, 45, :_reduce_none,
|
458
|
+
1, 45, :_reduce_none,
|
459
|
+
1, 45, :_reduce_none,
|
460
|
+
2, 46, :_reduce_47,
|
461
|
+
1, 46, :_reduce_48,
|
462
|
+
3, 40, :_reduce_49,
|
463
|
+
1, 47, :_reduce_none,
|
464
|
+
1, 47, :_reduce_none,
|
465
|
+
1, 47, :_reduce_none,
|
466
|
+
1, 47, :_reduce_none,
|
467
|
+
1, 47, :_reduce_none,
|
468
|
+
1, 47, :_reduce_none,
|
469
|
+
1, 47, :_reduce_none,
|
470
|
+
1, 47, :_reduce_none,
|
471
|
+
1, 47, :_reduce_none,
|
472
|
+
1, 47, :_reduce_none,
|
473
|
+
1, 47, :_reduce_none,
|
474
|
+
1, 47, :_reduce_none,
|
475
|
+
1, 47, :_reduce_none,
|
476
|
+
1, 47, :_reduce_none,
|
477
|
+
1, 47, :_reduce_none,
|
478
|
+
1, 47, :_reduce_none,
|
479
|
+
1, 47, :_reduce_none,
|
480
|
+
1, 47, :_reduce_none,
|
481
|
+
1, 47, :_reduce_none,
|
482
|
+
1, 47, :_reduce_none,
|
483
|
+
1, 47, :_reduce_none,
|
484
|
+
1, 47, :_reduce_none,
|
485
|
+
1, 47, :_reduce_none,
|
486
|
+
1, 47, :_reduce_none,
|
487
|
+
1, 47, :_reduce_none,
|
488
|
+
1, 47, :_reduce_none,
|
489
|
+
2, 48, :_reduce_76,
|
490
|
+
1, 48, :_reduce_77,
|
491
|
+
3, 38, :_reduce_78,
|
492
|
+
3, 42, :_reduce_79,
|
493
|
+
3, 43, :_reduce_80,
|
494
|
+
1, 50, :_reduce_81,
|
495
|
+
1, 50, :_reduce_82,
|
496
|
+
1, 50, :_reduce_83,
|
497
|
+
1, 50, :_reduce_84,
|
498
|
+
1, 50, :_reduce_85,
|
499
|
+
2, 51, :_reduce_86,
|
500
|
+
1, 51, :_reduce_87,
|
501
|
+
3, 36, :_reduce_88,
|
502
|
+
1, 52, :_reduce_89,
|
503
|
+
1, 52, :_reduce_90,
|
504
|
+
1, 52, :_reduce_91,
|
505
|
+
1, 52, :_reduce_92,
|
506
|
+
1, 52, :_reduce_93,
|
507
|
+
2, 53, :_reduce_94,
|
508
|
+
1, 53, :_reduce_95,
|
509
|
+
3, 37, :_reduce_96,
|
510
|
+
1, 49, :_reduce_none,
|
511
|
+
1, 49, :_reduce_none,
|
512
|
+
1, 49, :_reduce_none,
|
513
|
+
1, 49, :_reduce_none,
|
514
|
+
1, 49, :_reduce_none,
|
515
|
+
1, 49, :_reduce_none,
|
516
|
+
1, 49, :_reduce_none,
|
517
|
+
1, 49, :_reduce_none,
|
518
|
+
1, 49, :_reduce_none,
|
519
|
+
1, 49, :_reduce_none,
|
520
|
+
1, 49, :_reduce_none,
|
521
|
+
1, 49, :_reduce_none,
|
522
|
+
1, 49, :_reduce_none,
|
523
|
+
1, 49, :_reduce_none,
|
524
|
+
1, 49, :_reduce_none,
|
525
|
+
1, 49, :_reduce_none,
|
526
|
+
1, 49, :_reduce_none,
|
527
|
+
1, 49, :_reduce_none,
|
528
|
+
1, 49, :_reduce_none,
|
529
|
+
1, 49, :_reduce_none,
|
530
|
+
1, 49, :_reduce_none,
|
531
|
+
1, 49, :_reduce_none,
|
532
|
+
1, 49, :_reduce_none,
|
533
|
+
1, 49, :_reduce_none,
|
534
|
+
1, 49, :_reduce_none,
|
535
|
+
1, 49, :_reduce_none,
|
536
|
+
1, 54, :_reduce_none,
|
537
|
+
2, 54, :_reduce_124,
|
538
|
+
3, 41, :_reduce_125,
|
539
|
+
1, 44, :_reduce_126,
|
540
|
+
2, 44, :_reduce_127,
|
541
|
+
1, 55, :_reduce_128,
|
542
|
+
1, 55, :_reduce_129,
|
543
|
+
1, 55, :_reduce_130,
|
544
|
+
1, 55, :_reduce_131,
|
545
|
+
1, 55, :_reduce_132 ]
|
546
|
+
|
547
|
+
racc_reduce_n = 133
|
548
|
+
|
549
|
+
racc_shift_n = 157
|
550
|
+
|
551
|
+
racc_token_table = {
|
552
|
+
false => 0,
|
553
|
+
:error => 1,
|
554
|
+
:EM_OPEN => 2,
|
555
|
+
:EM_CLOSE => 3,
|
556
|
+
:ITALIC_OPEN => 4,
|
557
|
+
:ITALIC_CLOSE => 5,
|
558
|
+
:STRIKE_OPEN => 6,
|
559
|
+
:STRIKE_CLOSE => 7,
|
560
|
+
:LABEL_OPEN => 8,
|
561
|
+
:LABEL_CLOSE => 9,
|
562
|
+
:REFERENCE_OPEN => 10,
|
563
|
+
:REFERENCE_CLOSE => 11,
|
564
|
+
:VERB_OPEN => 12,
|
565
|
+
:VERB_CLOSE => 13,
|
566
|
+
:ERB_OPEN => 14,
|
567
|
+
:ERB_CLOSE => 15,
|
568
|
+
:FOOTNOTE_OPEN => 16,
|
569
|
+
:FOOTNOTE_CLOSE => 17,
|
570
|
+
:RUBY_OPEN => 18,
|
571
|
+
:RUBY_CLOSE => 19,
|
572
|
+
:IMAGE_OPEN => 20,
|
573
|
+
:IMAGE_CLOSE => 21,
|
574
|
+
:MANUEDO_OPEN => 22,
|
575
|
+
:MANUEDO_CLOSE => 23,
|
576
|
+
:BAR => 24,
|
577
|
+
:QUOTE => 25,
|
578
|
+
:SLASH => 26,
|
579
|
+
:BACK_SLASH => 27,
|
580
|
+
:OTHER => 28 }
|
581
|
+
|
582
|
+
racc_nt_base = 29
|
583
|
+
|
584
|
+
racc_use_result_var = false
|
585
|
+
|
586
|
+
Racc_arg = [
|
587
|
+
racc_action_table,
|
588
|
+
racc_action_check,
|
589
|
+
racc_action_default,
|
590
|
+
racc_action_pointer,
|
591
|
+
racc_goto_table,
|
592
|
+
racc_goto_check,
|
593
|
+
racc_goto_default,
|
594
|
+
racc_goto_pointer,
|
595
|
+
racc_nt_base,
|
596
|
+
racc_reduce_table,
|
597
|
+
racc_token_table,
|
598
|
+
racc_shift_n,
|
599
|
+
racc_reduce_n,
|
600
|
+
racc_use_result_var ]
|
601
|
+
|
602
|
+
Racc_token_to_s_table = [
|
603
|
+
"$end",
|
604
|
+
"error",
|
605
|
+
"EM_OPEN",
|
606
|
+
"EM_CLOSE",
|
607
|
+
"ITALIC_OPEN",
|
608
|
+
"ITALIC_CLOSE",
|
609
|
+
"STRIKE_OPEN",
|
610
|
+
"STRIKE_CLOSE",
|
611
|
+
"LABEL_OPEN",
|
612
|
+
"LABEL_CLOSE",
|
613
|
+
"REFERENCE_OPEN",
|
614
|
+
"REFERENCE_CLOSE",
|
615
|
+
"VERB_OPEN",
|
616
|
+
"VERB_CLOSE",
|
617
|
+
"ERB_OPEN",
|
618
|
+
"ERB_CLOSE",
|
619
|
+
"FOOTNOTE_OPEN",
|
620
|
+
"FOOTNOTE_CLOSE",
|
621
|
+
"RUBY_OPEN",
|
622
|
+
"RUBY_CLOSE",
|
623
|
+
"IMAGE_OPEN",
|
624
|
+
"IMAGE_CLOSE",
|
625
|
+
"MANUEDO_OPEN",
|
626
|
+
"MANUEDO_CLOSE",
|
627
|
+
"BAR",
|
628
|
+
"QUOTE",
|
629
|
+
"SLASH",
|
630
|
+
"BACK_SLASH",
|
631
|
+
"OTHER",
|
632
|
+
"$start",
|
633
|
+
"content",
|
634
|
+
"elements",
|
635
|
+
"element",
|
636
|
+
"emphasis",
|
637
|
+
"italic",
|
638
|
+
"strike",
|
639
|
+
"label",
|
640
|
+
"reference",
|
641
|
+
"ruby",
|
642
|
+
"footnote",
|
643
|
+
"image",
|
644
|
+
"verb",
|
645
|
+
"erb",
|
646
|
+
"manuedo",
|
647
|
+
"normal_strings",
|
648
|
+
"image_string",
|
649
|
+
"image_strings",
|
650
|
+
"ruby_string",
|
651
|
+
"ruby_strings",
|
652
|
+
"verb_string",
|
653
|
+
"label_string",
|
654
|
+
"label_strings",
|
655
|
+
"reference_string",
|
656
|
+
"reference_strings",
|
657
|
+
"verb_strings",
|
658
|
+
"normal_string" ]
|
659
|
+
|
660
|
+
Racc_debug_parser = false
|
661
|
+
|
662
|
+
##### State transition tables end #####
|
663
|
+
|
664
|
+
# reduce 0 omitted
|
665
|
+
|
666
|
+
# reduce 1 omitted
|
667
|
+
|
668
|
+
# reduce 2 omitted
|
669
|
+
|
670
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 7)
|
671
|
+
def _reduce_3(val, _values)
|
672
|
+
val[0].push(val[1])
|
673
|
+
end
|
674
|
+
.,.,
|
675
|
+
|
676
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 8)
|
677
|
+
def _reduce_4(val, _values)
|
678
|
+
val
|
679
|
+
end
|
680
|
+
.,.,
|
681
|
+
|
682
|
+
# reduce 5 omitted
|
683
|
+
|
684
|
+
# reduce 6 omitted
|
685
|
+
|
686
|
+
# reduce 7 omitted
|
687
|
+
|
688
|
+
# reduce 8 omitted
|
689
|
+
|
690
|
+
# reduce 9 omitted
|
691
|
+
|
692
|
+
# reduce 10 omitted
|
693
|
+
|
694
|
+
# reduce 11 omitted
|
695
|
+
|
696
|
+
# reduce 12 omitted
|
697
|
+
|
698
|
+
# reduce 13 omitted
|
699
|
+
|
700
|
+
# reduce 14 omitted
|
701
|
+
|
702
|
+
# reduce 15 omitted
|
703
|
+
|
704
|
+
# reduce 16 omitted
|
705
|
+
|
706
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 25)
|
707
|
+
def _reduce_17(val, _values)
|
708
|
+
Emphasis.new(val[1])
|
709
|
+
end
|
710
|
+
.,.,
|
711
|
+
|
712
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 26)
|
713
|
+
def _reduce_18(val, _values)
|
714
|
+
Italic.new(val[1])
|
715
|
+
end
|
716
|
+
.,.,
|
717
|
+
|
718
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 27)
|
719
|
+
def _reduce_19(val, _values)
|
720
|
+
Strike.new(val[1])
|
721
|
+
end
|
722
|
+
.,.,
|
723
|
+
|
724
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 29)
|
725
|
+
def _reduce_20(val, _values)
|
726
|
+
@index[:footnote] ||= []
|
727
|
+
@index[:footnote] << {:content => val[1] }
|
728
|
+
Footnote.new([val[1], @index[:footnote].size])
|
729
|
+
|
730
|
+
end
|
731
|
+
.,.,
|
732
|
+
|
733
|
+
# reduce 21 omitted
|
734
|
+
|
735
|
+
# reduce 22 omitted
|
736
|
+
|
737
|
+
# reduce 23 omitted
|
738
|
+
|
739
|
+
# reduce 24 omitted
|
740
|
+
|
741
|
+
# reduce 25 omitted
|
742
|
+
|
743
|
+
# reduce 26 omitted
|
744
|
+
|
745
|
+
# reduce 27 omitted
|
746
|
+
|
747
|
+
# reduce 28 omitted
|
748
|
+
|
749
|
+
# reduce 29 omitted
|
750
|
+
|
751
|
+
# reduce 30 omitted
|
752
|
+
|
753
|
+
# reduce 31 omitted
|
754
|
+
|
755
|
+
# reduce 32 omitted
|
756
|
+
|
757
|
+
# reduce 33 omitted
|
758
|
+
|
759
|
+
# reduce 34 omitted
|
760
|
+
|
761
|
+
# reduce 35 omitted
|
762
|
+
|
763
|
+
# reduce 36 omitted
|
764
|
+
|
765
|
+
# reduce 37 omitted
|
766
|
+
|
767
|
+
# reduce 38 omitted
|
768
|
+
|
769
|
+
# reduce 39 omitted
|
770
|
+
|
771
|
+
# reduce 40 omitted
|
772
|
+
|
773
|
+
# reduce 41 omitted
|
774
|
+
|
775
|
+
# reduce 42 omitted
|
776
|
+
|
777
|
+
# reduce 43 omitted
|
778
|
+
|
779
|
+
# reduce 44 omitted
|
780
|
+
|
781
|
+
# reduce 45 omitted
|
782
|
+
|
783
|
+
# reduce 46 omitted
|
784
|
+
|
785
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 65)
|
786
|
+
def _reduce_47(val, _values)
|
787
|
+
val.to_s
|
788
|
+
end
|
789
|
+
.,.,
|
790
|
+
|
791
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 66)
|
792
|
+
def _reduce_48(val, _values)
|
793
|
+
val[0]
|
794
|
+
end
|
795
|
+
.,.,
|
796
|
+
|
797
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 67)
|
798
|
+
def _reduce_49(val, _values)
|
799
|
+
Image.new(val[1])
|
800
|
+
end
|
801
|
+
.,.,
|
802
|
+
|
803
|
+
# reduce 50 omitted
|
804
|
+
|
805
|
+
# reduce 51 omitted
|
806
|
+
|
807
|
+
# reduce 52 omitted
|
808
|
+
|
809
|
+
# reduce 53 omitted
|
810
|
+
|
811
|
+
# reduce 54 omitted
|
812
|
+
|
813
|
+
# reduce 55 omitted
|
814
|
+
|
815
|
+
# reduce 56 omitted
|
816
|
+
|
817
|
+
# reduce 57 omitted
|
818
|
+
|
819
|
+
# reduce 58 omitted
|
820
|
+
|
821
|
+
# reduce 59 omitted
|
822
|
+
|
823
|
+
# reduce 60 omitted
|
824
|
+
|
825
|
+
# reduce 61 omitted
|
826
|
+
|
827
|
+
# reduce 62 omitted
|
828
|
+
|
829
|
+
# reduce 63 omitted
|
830
|
+
|
831
|
+
# reduce 64 omitted
|
832
|
+
|
833
|
+
# reduce 65 omitted
|
834
|
+
|
835
|
+
# reduce 66 omitted
|
836
|
+
|
837
|
+
# reduce 67 omitted
|
838
|
+
|
839
|
+
# reduce 68 omitted
|
840
|
+
|
841
|
+
# reduce 69 omitted
|
842
|
+
|
843
|
+
# reduce 70 omitted
|
844
|
+
|
845
|
+
# reduce 71 omitted
|
846
|
+
|
847
|
+
# reduce 72 omitted
|
848
|
+
|
849
|
+
# reduce 73 omitted
|
850
|
+
|
851
|
+
# reduce 74 omitted
|
852
|
+
|
853
|
+
# reduce 75 omitted
|
854
|
+
|
855
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 98)
|
856
|
+
def _reduce_76(val, _values)
|
857
|
+
val.to_s
|
858
|
+
end
|
859
|
+
.,.,
|
860
|
+
|
861
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 99)
|
862
|
+
def _reduce_77(val, _values)
|
863
|
+
val[0]
|
864
|
+
end
|
865
|
+
.,.,
|
866
|
+
|
867
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 102)
|
868
|
+
def _reduce_78(val, _values)
|
869
|
+
base, text = val[1].split("|",2)
|
870
|
+
text ||= base
|
871
|
+
Ruby.new([base, text])
|
872
|
+
|
873
|
+
end
|
874
|
+
.,.,
|
875
|
+
|
876
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 110)
|
877
|
+
def _reduce_79(val, _values)
|
878
|
+
e = ERB.new("<%= #{val[1]} %>")
|
879
|
+
Plain.new(e.result)
|
880
|
+
end
|
881
|
+
.,.,
|
882
|
+
|
883
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 114)
|
884
|
+
def _reduce_80(val, _values)
|
885
|
+
Manuedo.new(val[1])
|
886
|
+
end
|
887
|
+
.,.,
|
888
|
+
|
889
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 119)
|
890
|
+
def _reduce_81(val, _values)
|
891
|
+
val[0]
|
892
|
+
end
|
893
|
+
.,.,
|
894
|
+
|
895
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 120)
|
896
|
+
def _reduce_82(val, _values)
|
897
|
+
val[0]
|
898
|
+
end
|
899
|
+
.,.,
|
900
|
+
|
901
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 121)
|
902
|
+
def _reduce_83(val, _values)
|
903
|
+
val[0]
|
904
|
+
end
|
905
|
+
.,.,
|
906
|
+
|
907
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 122)
|
908
|
+
def _reduce_84(val, _values)
|
909
|
+
val[0]
|
910
|
+
end
|
911
|
+
.,.,
|
912
|
+
|
913
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 123)
|
914
|
+
def _reduce_85(val, _values)
|
915
|
+
val[0]
|
916
|
+
end
|
917
|
+
.,.,
|
918
|
+
|
919
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 125)
|
920
|
+
def _reduce_86(val, _values)
|
921
|
+
val.to_s
|
922
|
+
end
|
923
|
+
.,.,
|
924
|
+
|
925
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 126)
|
926
|
+
def _reduce_87(val, _values)
|
927
|
+
val[0]
|
928
|
+
end
|
929
|
+
.,.,
|
930
|
+
|
931
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 129)
|
932
|
+
def _reduce_88(val, _values)
|
933
|
+
label, title = val[1].split("|",2)
|
934
|
+
title ||= label
|
935
|
+
@index[:label] ||= []
|
936
|
+
@index[:label] << {:title => title }
|
937
|
+
Label.new([label.to_code, title, @index[:label].size])
|
938
|
+
|
939
|
+
end
|
940
|
+
.,.,
|
941
|
+
|
942
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 138)
|
943
|
+
def _reduce_89(val, _values)
|
944
|
+
val[0]
|
945
|
+
end
|
946
|
+
.,.,
|
947
|
+
|
948
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 139)
|
949
|
+
def _reduce_90(val, _values)
|
950
|
+
val[0]
|
951
|
+
end
|
952
|
+
.,.,
|
953
|
+
|
954
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 140)
|
955
|
+
def _reduce_91(val, _values)
|
956
|
+
val[0]
|
957
|
+
end
|
958
|
+
.,.,
|
959
|
+
|
960
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 141)
|
961
|
+
def _reduce_92(val, _values)
|
962
|
+
val[0]
|
963
|
+
end
|
964
|
+
.,.,
|
965
|
+
|
966
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 142)
|
967
|
+
def _reduce_93(val, _values)
|
968
|
+
val[0]
|
969
|
+
end
|
970
|
+
.,.,
|
971
|
+
|
972
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 144)
|
973
|
+
def _reduce_94(val, _values)
|
974
|
+
val.to_s
|
975
|
+
end
|
976
|
+
.,.,
|
977
|
+
|
978
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 145)
|
979
|
+
def _reduce_95(val, _values)
|
980
|
+
val[0]
|
981
|
+
end
|
982
|
+
.,.,
|
983
|
+
|
984
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 148)
|
985
|
+
def _reduce_96(val, _values)
|
986
|
+
title, uri = val[1].split("|",2)
|
987
|
+
uri ||= title
|
988
|
+
uri = "#" + uri.to_code if uri.gsub(/^\s*https*:\/\//,"") == uri
|
989
|
+
Reference.new([title, uri])
|
990
|
+
|
991
|
+
end
|
992
|
+
.,.,
|
993
|
+
|
994
|
+
# reduce 97 omitted
|
995
|
+
|
996
|
+
# reduce 98 omitted
|
997
|
+
|
998
|
+
# reduce 99 omitted
|
999
|
+
|
1000
|
+
# reduce 100 omitted
|
1001
|
+
|
1002
|
+
# reduce 101 omitted
|
1003
|
+
|
1004
|
+
# reduce 102 omitted
|
1005
|
+
|
1006
|
+
# reduce 103 omitted
|
1007
|
+
|
1008
|
+
# reduce 104 omitted
|
1009
|
+
|
1010
|
+
# reduce 105 omitted
|
1011
|
+
|
1012
|
+
# reduce 106 omitted
|
1013
|
+
|
1014
|
+
# reduce 107 omitted
|
1015
|
+
|
1016
|
+
# reduce 108 omitted
|
1017
|
+
|
1018
|
+
# reduce 109 omitted
|
1019
|
+
|
1020
|
+
# reduce 110 omitted
|
1021
|
+
|
1022
|
+
# reduce 111 omitted
|
1023
|
+
|
1024
|
+
# reduce 112 omitted
|
1025
|
+
|
1026
|
+
# reduce 113 omitted
|
1027
|
+
|
1028
|
+
# reduce 114 omitted
|
1029
|
+
|
1030
|
+
# reduce 115 omitted
|
1031
|
+
|
1032
|
+
# reduce 116 omitted
|
1033
|
+
|
1034
|
+
# reduce 117 omitted
|
1035
|
+
|
1036
|
+
# reduce 118 omitted
|
1037
|
+
|
1038
|
+
# reduce 119 omitted
|
1039
|
+
|
1040
|
+
# reduce 120 omitted
|
1041
|
+
|
1042
|
+
# reduce 121 omitted
|
1043
|
+
|
1044
|
+
# reduce 122 omitted
|
1045
|
+
|
1046
|
+
# reduce 123 omitted
|
1047
|
+
|
1048
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 183)
|
1049
|
+
def _reduce_124(val, _values)
|
1050
|
+
val
|
1051
|
+
end
|
1052
|
+
.,.,
|
1053
|
+
|
1054
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 185)
|
1055
|
+
def _reduce_125(val, _values)
|
1056
|
+
Verb.new(val[1])
|
1057
|
+
end
|
1058
|
+
.,.,
|
1059
|
+
|
1060
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 189)
|
1061
|
+
def _reduce_126(val, _values)
|
1062
|
+
Plain.new(val[0])
|
1063
|
+
end
|
1064
|
+
.,.,
|
1065
|
+
|
1066
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 190)
|
1067
|
+
def _reduce_127(val, _values)
|
1068
|
+
Plain.new([val[0].contents, val[1]])
|
1069
|
+
end
|
1070
|
+
.,.,
|
1071
|
+
|
1072
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 192)
|
1073
|
+
def _reduce_128(val, _values)
|
1074
|
+
val[0]
|
1075
|
+
end
|
1076
|
+
.,.,
|
1077
|
+
|
1078
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 193)
|
1079
|
+
def _reduce_129(val, _values)
|
1080
|
+
val[0]
|
1081
|
+
end
|
1082
|
+
.,.,
|
1083
|
+
|
1084
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 194)
|
1085
|
+
def _reduce_130(val, _values)
|
1086
|
+
val[0]
|
1087
|
+
end
|
1088
|
+
.,.,
|
1089
|
+
|
1090
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 195)
|
1091
|
+
def _reduce_131(val, _values)
|
1092
|
+
val[0]
|
1093
|
+
end
|
1094
|
+
.,.,
|
1095
|
+
|
1096
|
+
module_eval(<<'.,.,', 'rafinlineparser.ry', 196)
|
1097
|
+
def _reduce_132(val, _values)
|
1098
|
+
val[0]
|
1099
|
+
end
|
1100
|
+
.,.,
|
1101
|
+
|
1102
|
+
def _reduce_none(val, _values)
|
1103
|
+
val[0]
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
end # class InlineParser
|
1107
|
+
|
1108
|
+
if __FILE__ == $0
|
1109
|
+
raf = InlineParser.new
|
1110
|
+
src = $stdin.readline
|
1111
|
+
nodes = raf.parse(src)
|
1112
|
+
puts "----- output -----"
|
1113
|
+
nodes.each do |n|
|
1114
|
+
puts n.apply
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
end # end of module Raf
|