mok-parser 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1268 @@
1
+ #
2
+ # DO NOT MODIFY!!!!
3
+ # This file is automatically generated by Racc 1.4.10
4
+ # from Racc grammer file "".
5
+ #
6
+
7
+ require 'racc/parser.rb'
8
+
9
+ require "parserutility"
10
+ require 'strscan'
11
+ require 'mimemagic'
12
+ require 'erb'
13
+ require 'mokelement'
14
+
15
+ module Mok
16
+ class InlineParser < Racc::Parser
17
+
18
+ module_eval(<<'...end mokinlineparser.ry/module_eval...', 'mokinlineparser.ry', 272)
19
+ include ParserUtility
20
+
21
+ EM_OPEN = '((*'
22
+ EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/
23
+ EM_CLOSE = '*))'
24
+ EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/
25
+
26
+ ITALIC_OPEN = '((_'
27
+ ITALIC_OPEN_RE = /\A#{Regexp.quote(ITALIC_OPEN)}/
28
+ ITALIC_CLOSE = '_))'
29
+ ITALIC_CLOSE_RE = /\A#{Regexp.quote(ITALIC_CLOSE)}/
30
+
31
+ STRIKE_OPEN = '((-'
32
+ STRIKE_OPEN_RE = /\A#{Regexp.quote(STRIKE_OPEN)}/
33
+ STRIKE_CLOSE = '-))'
34
+ STRIKE_CLOSE_RE = /\A#{Regexp.quote(STRIKE_CLOSE)}/
35
+
36
+ CODE_OPEN = '(({'
37
+ CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/
38
+ CODE_CLOSE = '}))'
39
+ CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/
40
+
41
+ KBD_OPEN = '((%'
42
+ KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/
43
+ KBD_CLOSE = '%))'
44
+ KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/
45
+
46
+ RUBY_OPEN = '((^'
47
+ RUBY_OPEN_RE = /\A#{Regexp.quote(RUBY_OPEN)}/
48
+ RUBY_CLOSE = '^))'
49
+ RUBY_CLOSE_RE = /\A#{Regexp.quote(RUBY_CLOSE)}/
50
+
51
+ VARIABLE_OPEN = '((@'
52
+ VARIABLE_OPEN_RE = /\A#{Regexp.quote(VARIABLE_OPEN)}/
53
+ VARIABLE_CLOSE = '@))'
54
+ VARIABLE_CLOSE_RE = /\A#{Regexp.quote(VARIABLE_CLOSE)}/
55
+
56
+ FOOTNOTE_OPEN = '((['
57
+ FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/
58
+ FOOTNOTE_CLOSE = ']))'
59
+ FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/
60
+
61
+ MEDIA_OPEN = '(($'
62
+ MEDIA_OPEN_RE = /\A#{Regexp.quote(MEDIA_OPEN)}/
63
+ MEDIA_CLOSE = '$))'
64
+ MEDIA_CLOSE_RE = /\A#{Regexp.quote(MEDIA_CLOSE)}/
65
+
66
+ LABEL_OPEN = '((>'
67
+ LABEL_OPEN_RE = /\A#{Regexp.quote(LABEL_OPEN)}/
68
+ LABEL_CLOSE = '<))'
69
+ LABEL_CLOSE_RE = /\A#{Regexp.quote(LABEL_CLOSE)}/
70
+
71
+ LABEL_HTML_OPEN = '((&gt;'
72
+ LABEL_HTML_OPEN_RE = /\A#{Regexp.quote(LABEL_HTML_OPEN)}/
73
+ LABEL_HTML_CLOSE = '&lt;))'
74
+ LABEL_HTML_CLOSE_RE = /\A#{Regexp.quote(LABEL_HTML_CLOSE)}/
75
+
76
+ LABEL_LINK_OPEN = '((='
77
+ LABEL_LINK_OPEN_RE = /\A#{Regexp.quote(LABEL_LINK_OPEN)}/
78
+ LABEL_LINK_CLOSE = '=))'
79
+ LABEL_LINK_CLOSE_RE = /\A#{Regexp.quote(LABEL_LINK_CLOSE)}/
80
+
81
+ REFERENCE_OPEN = '((<'
82
+ REFERENCE_OPEN_RE = /\A#{Regexp.quote(REFERENCE_OPEN)}/
83
+ REFERENCE_CLOSE = '>))'
84
+ REFERENCE_CLOSE_RE = /\A#{Regexp.quote(REFERENCE_CLOSE)}/
85
+
86
+ REFERENCE_HTML_OPEN = '((<'
87
+ REFERENCE_HTML_OPEN_RE = /\A#{Regexp.quote(REFERENCE_HTML_OPEN)}/
88
+ REFERENCE_HTML_CLOSE = '>))'
89
+ REFERENCE_HTML_CLOSE_RE = /\A#{Regexp.quote(REFERENCE_HTML_CLOSE)}/
90
+
91
+ VERB_OPEN = "(('"
92
+ VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/
93
+ VERB_CLOSE = "'))"
94
+ VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/
95
+
96
+ MANUEDO_OPEN = "((/"
97
+ MANUEDO_OPEN_RE = /\A#{Regexp.quote(MANUEDO_OPEN)}/
98
+ MANUEDO_CLOSE = "/))"
99
+ MANUEDO_CLOSE_RE = /\A#{Regexp.quote(MANUEDO_CLOSE)}/
100
+
101
+ # URL = "URL:"
102
+ # URL_RE = /\A#{Regexp.quote(URL)}/
103
+
104
+ #other_re_mode = Regexp::EXTENDED
105
+ other_re_mode = Regexp::MULTILINE
106
+ OTHER_RE = Regexp.new(
107
+ "\\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(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}|#{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}|#{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}|#{Regexp.quote(RUBY_OPEN)}|#{Regexp.quote(RUBY_CLOSE)}|#{Regexp.quote(VARIABLE_OPEN)}|#{Regexp.quote(VARIABLE_CLOSE)}|#{Regexp.quote(MEDIA_OPEN)}|#{Regexp.quote(MEDIA_CLOSE)}|#{Regexp.quote(LABEL_OPEN)}|#{Regexp.quote(LABEL_CLOSE)}|#{Regexp.quote(LABEL_LINK_OPEN)}|#{Regexp.quote(LABEL_LINK_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)})", other_re_mode)
108
+
109
+ def parse(src)
110
+ @src = StringScanner.new(Array(src).join)
111
+ @pre = ""
112
+ @@yydebug = false
113
+ @view_token_type = false
114
+ do_parse
115
+ end
116
+ def initialize(options = {})
117
+ @options = options
118
+ @index = {}
119
+ end
120
+ attr_reader :index
121
+
122
+ def next_token
123
+ return [false, false] if @src.eos?
124
+ if ret = @src.scan(EM_OPEN_RE)
125
+ puts "i: EM_OPEN: #{ret}" if @view_token_type
126
+ @pre << ret
127
+ [:EM_OPEN, ret]
128
+ elsif ret = @src.scan(EM_CLOSE_RE)
129
+ puts "i: EM_CLOSE: #{ret}" if @view_token_type
130
+ @pre << ret
131
+ [:EM_CLOSE, ret]
132
+ elsif ret = @src.scan(ITALIC_OPEN_RE)
133
+ puts "i: ITALIC_OPEN: #{ret}" if @view_token_type
134
+ @pre << ret
135
+ [:ITALIC_OPEN, ret]
136
+ elsif ret = @src.scan(ITALIC_CLOSE_RE)
137
+ puts "i: ITALIC_CLOSE: #{ret}" if @view_token_type
138
+ @pre << ret
139
+ [:ITALIC_CLOSE, ret]
140
+ elsif ret = @src.scan(STRIKE_OPEN_RE)
141
+ @pre << ret
142
+ puts "i: STRIKE_OPEN: #{ret}" if @view_token_type
143
+ [:STRIKE_OPEN, ret]
144
+ elsif ret = @src.scan(STRIKE_CLOSE_RE)
145
+ @pre << ret
146
+ puts "i: STRIKE_CLOSE: #{ret}" if @view_token_type
147
+ [:STRIKE_CLOSE, ret]
148
+ elsif ret = @src.scan(CODE_OPEN_RE)
149
+ @pre << ret
150
+ puts "i: CODE_OPEN: #{ret}" if @view_token_type
151
+ [:CODE_OPEN, ret]
152
+ elsif ret = @src.scan(CODE_CLOSE_RE)
153
+ @pre << ret
154
+ puts "i: CODE_CLOSE: #{ret}" if @view_token_type
155
+ [:CODE_CLOSE, ret]
156
+ elsif ret = @src.scan(KBD_OPEN_RE)
157
+ @pre << ret
158
+ puts "i: KBD_OPEN: #{ret}" if @view_token_type
159
+ [:KBD_OPEN, ret]
160
+ elsif ret = @src.scan(KBD_CLOSE_RE)
161
+ @pre << ret
162
+ puts "i: KBD_CLOSE: #{ret}" if @view_token_type
163
+ [:KBD_CLOSE, ret]
164
+ elsif ret = @src.scan(LABEL_OPEN_RE)
165
+ @pre << ret
166
+ puts "i: LABEL_OPEN: #{ret}" if @view_token_type
167
+ [:LABEL_OPEN, ret]
168
+ elsif ret = @src.scan(LABEL_CLOSE_RE)
169
+ puts "i: LABEL_CLOSE: #{ret}" if @view_token_type
170
+ @pre << ret
171
+ [:LABEL_CLOSE, ret]
172
+ elsif ret = @src.scan(LABEL_LINK_OPEN_RE)
173
+ @pre << ret
174
+ puts "i: LABEL_LINK_OPEN: #{ret}" if @view_token_type
175
+ [:LABEL_LINK_OPEN, ret]
176
+ elsif ret = @src.scan(LABEL_LINK_CLOSE_RE)
177
+ puts "i: LABEL_LINK_CLOSE: #{ret}" if @view_token_type
178
+ @pre << ret
179
+ [:LABEL_LINK_CLOSE, ret]
180
+ elsif ret = @src.scan(LABEL_HTML_OPEN_RE)
181
+ @pre << ret
182
+ puts "i: LABEL_OPEN: #{ret}" if @view_token_type
183
+ [:LABEL_OPEN, ret]
184
+ elsif ret = @src.scan(LABEL_HTML_CLOSE_RE)
185
+ puts "i: LABEL_CLOSE: #{ret}" if @view_token_type
186
+ @pre << ret
187
+ [:LABEL_CLOSE, ret]
188
+ elsif ret = @src.scan(REFERENCE_OPEN_RE)
189
+ puts "i: REFERENCE_OPEN: #{ret}" if @view_token_type
190
+ @pre << ret
191
+ [:REFERENCE_OPEN, ret]
192
+ elsif ret = @src.scan(REFERENCE_CLOSE_RE)
193
+ puts "i: REFERENCE_CLOSE: #{ret}" if @view_token_type
194
+ @pre << ret
195
+ [:REFERENCE_CLOSE, ret]
196
+ elsif ret = @src.scan(REFERENCE_HTML_OPEN_RE)
197
+ puts "i: REFERENCE_HTML_OPEN: #{ret}" if @view_token_type
198
+ @pre << ret
199
+ [:REFERENCE_OPEN, ret]
200
+ elsif ret = @src.scan(REFERENCE_HTML_CLOSE_RE)
201
+ puts "i: REFERENCE_HTML_CLOSE: #{ret}" if @view_token_type
202
+ @pre << ret
203
+ [:REFERENCE_CLOSE, ret]
204
+ elsif ret = @src.scan(VERB_OPEN_RE)
205
+ puts "i: VERB_OPEN: #{ret}" if @view_token_type
206
+ @pre << ret
207
+ [:VERB_OPEN, ret]
208
+ elsif ret = @src.scan(VERB_CLOSE_RE)
209
+ puts "i: VERB_CLOSE: #{ret}" if @view_token_type
210
+ @pre << ret
211
+ [:VERB_CLOSE, ret]
212
+ elsif ret = @src.scan(RUBY_OPEN_RE)
213
+ puts "i: RUBY_OPEN: #{ret}" if @view_token_type
214
+ @pre << ret
215
+ [:RUBY_OPEN, ret]
216
+ elsif ret = @src.scan(RUBY_CLOSE_RE)
217
+ puts "i: RUBY_CLOSE: #{ret}" if @view_token_type
218
+ @pre << ret
219
+ [:RUBY_CLOSE, ret]
220
+ elsif ret = @src.scan(VARIABLE_OPEN_RE)
221
+ puts "i: VARIABLE_OPEN: #{ret}" if @view_token_type
222
+ @pre << ret
223
+ [:VARIABLE_OPEN, ret]
224
+ elsif ret = @src.scan(VARIABLE_CLOSE_RE)
225
+ puts "i: VARIABLE_CLOSE: #{ret}" if @view_token_type
226
+ @pre << ret
227
+ [:VARIABLE_CLOSE, ret]
228
+ elsif ret = @src.scan(FOOTNOTE_OPEN_RE)
229
+ puts "i: FOOTNOTE_OPEN: #{ret}" if @view_token_type
230
+ @pre << ret
231
+ [:FOOTNOTE_OPEN, ret]
232
+ elsif ret = @src.scan(FOOTNOTE_CLOSE_RE)
233
+ puts "i: FOOTNOTE_CLOSE: #{ret}" if @view_token_type
234
+ @pre << ret
235
+ [:FOOTNOTE_CLOSE, ret]
236
+ elsif ret = @src.scan(MEDIA_OPEN_RE)
237
+ puts "i: MEDIA_OPEN: #{ret}" if @view_token_type
238
+ @pre << ret
239
+ [:MEDIA_OPEN, ret]
240
+ elsif ret = @src.scan(MEDIA_CLOSE_RE)
241
+ puts "i: MEDIA_CLOSE: #{ret}" if @view_token_type
242
+ @pre << ret
243
+ [:MEDIA_CLOSE, ret]
244
+ elsif ret = @src.scan(MANUEDO_OPEN_RE)
245
+ puts "i: MANUEDO_OPEN: #{ret}" if @view_token_type
246
+ @pre << ret
247
+ [:MANUEDO_OPEN, ret]
248
+ elsif ret = @src.scan(MANUEDO_CLOSE_RE)
249
+ puts "i: MANUED_CLOSE: #{ret}" if @view_token_type
250
+ @pre << ret
251
+ [:MANUEDO_CLOSE, ret]
252
+ elsif ret = @src.scan(OTHER_RE)
253
+ puts "i: OTHER_RE: #{ret}" if @view_token_type
254
+ @pre << ret
255
+ [:OTHER, ret]
256
+ else
257
+ puts "i: OTHER_RE(else): #{ret}" if @view_token_type
258
+ ret = @src.rest
259
+ @pre << ret
260
+ @src.terminate
261
+ [:OTHER, ret]
262
+ end
263
+ end
264
+
265
+ ...end mokinlineparser.ry/module_eval...
266
+ ##### State transition tables begin ###
267
+
268
+ racc_action_table = [
269
+ 19, 133, 20, 175, 21, 176, 22, 177, 23, 178,
270
+ 29, 174, 30, 34, 31, 35, 32, 185, 24, 136,
271
+ 26, 173, 27, 172, 25, 139, 28, nil, 34, 103,
272
+ 104, 105, 106, 107, 108, 109, 110, 111, 112, 119,
273
+ 120, 121, 122, 117, 118, 128, 129, 126, 127, 123,
274
+ 124, 125, 184, 113, 114, 115, 116, 102, 19, nil,
275
+ 20, nil, 21, nil, 22, nil, 23, nil, 29, nil,
276
+ 30, nil, 31, nil, 32, nil, 24, nil, 26, nil,
277
+ 27, nil, 25, nil, 28, nil, 34, 75, 76, 77,
278
+ 78, 79, 80, 81, 82, 83, 84, 91, 92, 93,
279
+ 94, 89, 90, 98, 99, 96, 97, 95, 182, nil,
280
+ nil, 85, 86, 87, 88, 74, 19, 19, 20, 20,
281
+ 21, 21, 22, 22, 23, 23, 29, 29, 30, 30,
282
+ 31, 31, 32, 32, 24, 24, 26, 26, 27, 27,
283
+ 25, 25, 28, 28, 34, 34, 19, 19, 20, 20,
284
+ 21, 21, 22, 22, 23, 23, 29, 29, 30, 30,
285
+ 31, 31, 32, 32, 24, 24, 26, 26, 27, 27,
286
+ 25, 25, 28, 28, 34, 34, 19, 19, 20, 20,
287
+ 21, 21, 22, 22, 23, 23, 29, 29, 30, 30,
288
+ 31, 31, 32, 32, 24, 24, 26, 26, 27, 27,
289
+ 25, 25, 28, 28, 34, 34, 45, 46, 47, 48,
290
+ 49, 50, 51, 52, 53, 54, 63, 64, 65, 66,
291
+ 61, 62, 69, 70, 67, 68, 55, 56, 57, 58,
292
+ 71, nil, 59, 60, 44, 75, 76, 77, 78, 79,
293
+ 80, 81, 82, 83, 84, 91, 92, 93, 94, 89,
294
+ 90, 98, 99, 96, 97, 95, nil, nil, nil, 85,
295
+ 86, 87, 88, 74, 103, 104, 105, 106, 107, 108,
296
+ 109, 110, 111, 112, 119, 120, 121, 122, 117, 118,
297
+ 128, 129, 126, 127, 123, 124, 125, 187, 113, 114,
298
+ 115, 116, 102, 19, nil, 20, nil, 21, nil, 22,
299
+ nil, 23, nil, 29, 133, 30, nil, 31, nil, 32,
300
+ nil, 24, nil, 26, nil, 27, nil, 25, nil, 28,
301
+ nil, 34, 45, 46, 47, 48, 49, 50, 51, 52,
302
+ 53, 54, 63, 64, 65, 66, 61, 62, 69, 70,
303
+ 67, 68, 55, 56, 57, 58, 71, 180, 59, 60,
304
+ 44, 143, 144, 145, 146, 147, 148, 149, 150, 151,
305
+ 152, 159, 160, 161, 162, 157, 158, 169, nil, 167,
306
+ 168, 163, 164, 165, 166, 153, 154, 155, 156, 142,
307
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
308
+ 159, 160, 161, 162, 157, 158, 169, 193, 167, 168,
309
+ 163, 164, 165, 166, 153, 154, 155, 156, 142, 189,
310
+ 191, nil, nil, nil, nil, nil, nil, nil, nil, nil,
311
+ nil, nil, nil, 139, 136 ]
312
+
313
+ racc_action_check = [
314
+ 0, 29, 0, 40, 0, 41, 0, 42, 0, 43,
315
+ 0, 39, 0, 18, 0, 1, 0, 132, 0, 30,
316
+ 0, 38, 0, 35, 0, 31, 0, nil, 0, 130,
317
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
318
+ 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
319
+ 130, 130, 130, 130, 130, 130, 130, 130, 2, nil,
320
+ 2, nil, 2, nil, 2, nil, 2, nil, 2, nil,
321
+ 2, nil, 2, nil, 2, nil, 2, nil, 2, nil,
322
+ 2, nil, 2, nil, 2, nil, 2, 100, 100, 100,
323
+ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
324
+ 100, 100, 100, 100, 100, 100, 100, 100, 100, nil,
325
+ nil, 100, 100, 100, 100, 100, 19, 20, 19, 20,
326
+ 19, 20, 19, 20, 19, 20, 19, 20, 19, 20,
327
+ 19, 20, 19, 20, 19, 20, 19, 20, 19, 20,
328
+ 19, 20, 19, 20, 19, 20, 21, 22, 21, 22,
329
+ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
330
+ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22,
331
+ 21, 22, 21, 22, 21, 22, 23, 24, 23, 24,
332
+ 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
333
+ 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
334
+ 23, 24, 23, 24, 23, 24, 25, 25, 25, 25,
335
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
336
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
337
+ 25, nil, 25, 25, 25, 26, 26, 26, 26, 26,
338
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
339
+ 26, 26, 26, 26, 26, 26, nil, nil, nil, 26,
340
+ 26, 26, 26, 26, 27, 27, 27, 27, 27, 27,
341
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
342
+ 27, 27, 27, 27, 27, 27, 27, 134, 27, 27,
343
+ 27, 27, 27, 28, nil, 28, nil, 28, nil, 28,
344
+ nil, 28, nil, 28, 134, 28, nil, 28, nil, 28,
345
+ nil, 28, nil, 28, nil, 28, nil, 28, nil, 28,
346
+ nil, 28, 72, 72, 72, 72, 72, 72, 72, 72,
347
+ 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
348
+ 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
349
+ 72, 32, 32, 32, 32, 32, 32, 32, 32, 32,
350
+ 32, 32, 32, 32, 32, 32, 32, 32, nil, 32,
351
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
352
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
353
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
354
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 137,
355
+ 140, nil, nil, nil, nil, nil, nil, nil, nil, nil,
356
+ nil, nil, nil, 140, 137 ]
357
+
358
+ racc_action_pointer = [
359
+ -2, 15, 56, nil, nil, nil, nil, nil, nil, nil,
360
+ nil, nil, nil, nil, nil, nil, nil, nil, -17, 114,
361
+ 115, 144, 145, 174, 175, 204, 233, 262, 291, -29,
362
+ -11, -5, 349, nil, nil, 23, nil, nil, 18, 6,
363
+ -4, -4, -4, -12, nil, nil, nil, nil, nil, nil,
364
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
365
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
366
+ nil, nil, 320, nil, nil, nil, nil, nil, nil, nil,
367
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
368
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
369
+ 85, nil, nil, nil, nil, nil, nil, nil, nil, nil,
370
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
371
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
372
+ 27, nil, -12, nil, 274, nil, nil, 394, nil, nil,
373
+ 393, nil, nil, nil, nil, nil, nil, nil, nil, nil,
374
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
375
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
376
+ nil, 378, nil, nil, nil, nil, nil, nil, nil, nil,
377
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
378
+ nil, nil, nil, nil ]
379
+
380
+ racc_action_default = [
381
+ -1, -164, -2, -4, -5, -6, -7, -8, -9, -10,
382
+ -11, -12, -13, -14, -15, -16, -17, -18, -19, -1,
383
+ -1, -1, -1, -1, -1, -164, -164, -164, -1, -164,
384
+ -164, -164, -164, -161, -163, -164, -3, -162, -164, -164,
385
+ -164, -164, -164, -164, -26, -27, -28, -29, -30, -31,
386
+ -32, -33, -34, -35, -36, -37, -38, -39, -40, -41,
387
+ -42, -43, -44, -45, -46, -47, -48, -49, -50, -51,
388
+ -52, -53, -164, -55, -57, -58, -59, -60, -61, -62,
389
+ -63, -64, -65, -66, -67, -68, -69, -70, -71, -72,
390
+ -73, -74, -75, -76, -77, -78, -79, -80, -81, -82,
391
+ -164, -84, -86, -87, -88, -89, -90, -91, -92, -93,
392
+ -94, -95, -96, -97, -98, -99, -100, -101, -102, -103,
393
+ -104, -105, -106, -107, -108, -109, -110, -111, -112, -113,
394
+ -164, -115, -164, -118, -164, -120, -122, -164, -124, -126,
395
+ -164, -128, -130, -131, -132, -133, -134, -135, -136, -137,
396
+ -138, -139, -140, -141, -142, -143, -144, -145, -146, -147,
397
+ -148, -149, -150, -151, -152, -153, -154, -155, -156, -157,
398
+ -158, -164, 194, -20, -21, -22, -23, -24, -25, -54,
399
+ -56, -83, -85, -114, -116, -117, -119, -121, -123, -125,
400
+ -127, -129, -159, -160 ]
401
+
402
+ racc_goto_table = [
403
+ 170, 141, 138, 135, 131, 101, 73, 1, 130, 134,
404
+ 100, 137, 72, 140, 36, 171, 37, nil, nil, nil,
405
+ nil, nil, nil, nil, nil, nil, 38, 39, 40, 41,
406
+ 42, 43, nil, nil, nil, 132, nil, nil, nil, nil,
407
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
408
+ nil, nil, nil, 179, nil, nil, nil, nil, nil, nil,
409
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
410
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 181,
411
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
412
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
413
+ nil, nil, nil, nil, nil, nil, nil, 183, 186, 188,
414
+ 190, nil, nil, nil, nil, nil, nil, nil, nil, nil,
415
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
416
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 192 ]
417
+
418
+ racc_goto_check = [
419
+ 31, 29, 27, 25, 23, 21, 19, 1, 24, 26,
420
+ 22, 28, 20, 30, 3, 32, 33, nil, nil, nil,
421
+ nil, nil, nil, nil, nil, nil, 1, 1, 1, 1,
422
+ 1, 1, nil, nil, nil, 1, nil, nil, nil, nil,
423
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
424
+ nil, nil, nil, 19, nil, nil, nil, nil, nil, nil,
425
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
426
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 21,
427
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
428
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
429
+ nil, nil, nil, nil, nil, nil, nil, 23, 25, 27,
430
+ 29, nil, nil, nil, nil, nil, nil, nil, nil, nil,
431
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
432
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, 31 ]
433
+
434
+ racc_goto_pointer = [
435
+ nil, 7, nil, 12, nil, nil, nil, nil, nil, nil,
436
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, -19,
437
+ -13, -21, -16, -23, -19, -26, -20, -28, -19, -30,
438
+ -18, -32, -17, -2 ]
439
+
440
+ racc_goto_default = [
441
+ nil, nil, 2, 3, 4, 5, 6, 7, 8, 9,
442
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, nil,
443
+ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
444
+ nil, nil, nil, 33 ]
445
+
446
+ racc_reduce_table = [
447
+ 0, 0, :racc_error,
448
+ 0, 32, :_reduce_none,
449
+ 1, 32, :_reduce_none,
450
+ 2, 33, :_reduce_3,
451
+ 1, 33, :_reduce_4,
452
+ 1, 34, :_reduce_none,
453
+ 1, 34, :_reduce_none,
454
+ 1, 34, :_reduce_none,
455
+ 1, 34, :_reduce_none,
456
+ 1, 34, :_reduce_none,
457
+ 1, 34, :_reduce_none,
458
+ 1, 34, :_reduce_none,
459
+ 1, 34, :_reduce_none,
460
+ 1, 34, :_reduce_none,
461
+ 1, 34, :_reduce_none,
462
+ 1, 34, :_reduce_none,
463
+ 1, 34, :_reduce_none,
464
+ 1, 34, :_reduce_none,
465
+ 1, 34, :_reduce_none,
466
+ 1, 34, :_reduce_none,
467
+ 3, 35, :_reduce_20,
468
+ 3, 36, :_reduce_21,
469
+ 3, 37, :_reduce_22,
470
+ 3, 38, :_reduce_23,
471
+ 3, 39, :_reduce_24,
472
+ 3, 45, :_reduce_25,
473
+ 1, 50, :_reduce_none,
474
+ 1, 50, :_reduce_none,
475
+ 1, 50, :_reduce_none,
476
+ 1, 50, :_reduce_none,
477
+ 1, 50, :_reduce_none,
478
+ 1, 50, :_reduce_none,
479
+ 1, 50, :_reduce_none,
480
+ 1, 50, :_reduce_none,
481
+ 1, 50, :_reduce_none,
482
+ 1, 50, :_reduce_none,
483
+ 1, 50, :_reduce_none,
484
+ 1, 50, :_reduce_none,
485
+ 1, 50, :_reduce_none,
486
+ 1, 50, :_reduce_none,
487
+ 1, 50, :_reduce_none,
488
+ 1, 50, :_reduce_none,
489
+ 1, 50, :_reduce_none,
490
+ 1, 50, :_reduce_none,
491
+ 1, 50, :_reduce_none,
492
+ 1, 50, :_reduce_none,
493
+ 1, 50, :_reduce_none,
494
+ 1, 50, :_reduce_none,
495
+ 1, 50, :_reduce_none,
496
+ 1, 50, :_reduce_none,
497
+ 1, 50, :_reduce_none,
498
+ 1, 50, :_reduce_none,
499
+ 1, 50, :_reduce_none,
500
+ 1, 50, :_reduce_none,
501
+ 2, 51, :_reduce_54,
502
+ 1, 51, :_reduce_55,
503
+ 3, 46, :_reduce_56,
504
+ 1, 52, :_reduce_none,
505
+ 1, 52, :_reduce_none,
506
+ 1, 52, :_reduce_none,
507
+ 1, 52, :_reduce_none,
508
+ 1, 52, :_reduce_none,
509
+ 1, 52, :_reduce_none,
510
+ 1, 52, :_reduce_none,
511
+ 1, 52, :_reduce_none,
512
+ 1, 52, :_reduce_none,
513
+ 1, 52, :_reduce_none,
514
+ 1, 52, :_reduce_none,
515
+ 1, 52, :_reduce_none,
516
+ 1, 52, :_reduce_none,
517
+ 1, 52, :_reduce_none,
518
+ 1, 52, :_reduce_none,
519
+ 1, 52, :_reduce_none,
520
+ 1, 52, :_reduce_none,
521
+ 1, 52, :_reduce_none,
522
+ 1, 52, :_reduce_none,
523
+ 1, 52, :_reduce_none,
524
+ 1, 52, :_reduce_none,
525
+ 1, 52, :_reduce_none,
526
+ 1, 52, :_reduce_none,
527
+ 1, 52, :_reduce_none,
528
+ 1, 52, :_reduce_none,
529
+ 1, 52, :_reduce_none,
530
+ 2, 53, :_reduce_83,
531
+ 1, 53, :_reduce_84,
532
+ 3, 43, :_reduce_85,
533
+ 1, 54, :_reduce_none,
534
+ 1, 54, :_reduce_none,
535
+ 1, 54, :_reduce_none,
536
+ 1, 54, :_reduce_none,
537
+ 1, 54, :_reduce_none,
538
+ 1, 54, :_reduce_none,
539
+ 1, 54, :_reduce_none,
540
+ 1, 54, :_reduce_none,
541
+ 1, 54, :_reduce_none,
542
+ 1, 54, :_reduce_none,
543
+ 1, 54, :_reduce_none,
544
+ 1, 54, :_reduce_none,
545
+ 1, 54, :_reduce_none,
546
+ 1, 54, :_reduce_none,
547
+ 1, 54, :_reduce_none,
548
+ 1, 54, :_reduce_none,
549
+ 1, 54, :_reduce_none,
550
+ 1, 54, :_reduce_none,
551
+ 1, 54, :_reduce_none,
552
+ 1, 54, :_reduce_none,
553
+ 1, 54, :_reduce_none,
554
+ 1, 54, :_reduce_none,
555
+ 1, 54, :_reduce_none,
556
+ 1, 54, :_reduce_none,
557
+ 1, 54, :_reduce_none,
558
+ 1, 54, :_reduce_none,
559
+ 1, 54, :_reduce_none,
560
+ 1, 54, :_reduce_none,
561
+ 2, 55, :_reduce_114,
562
+ 1, 55, :_reduce_115,
563
+ 3, 44, :_reduce_116,
564
+ 3, 48, :_reduce_117,
565
+ 1, 56, :_reduce_118,
566
+ 2, 57, :_reduce_119,
567
+ 1, 57, :_reduce_120,
568
+ 3, 40, :_reduce_121,
569
+ 1, 58, :_reduce_122,
570
+ 2, 59, :_reduce_123,
571
+ 1, 59, :_reduce_124,
572
+ 3, 41, :_reduce_125,
573
+ 1, 60, :_reduce_126,
574
+ 2, 61, :_reduce_127,
575
+ 1, 61, :_reduce_128,
576
+ 3, 42, :_reduce_129,
577
+ 1, 62, :_reduce_none,
578
+ 1, 62, :_reduce_none,
579
+ 1, 62, :_reduce_none,
580
+ 1, 62, :_reduce_none,
581
+ 1, 62, :_reduce_none,
582
+ 1, 62, :_reduce_none,
583
+ 1, 62, :_reduce_none,
584
+ 1, 62, :_reduce_none,
585
+ 1, 62, :_reduce_none,
586
+ 1, 62, :_reduce_none,
587
+ 1, 62, :_reduce_none,
588
+ 1, 62, :_reduce_none,
589
+ 1, 62, :_reduce_none,
590
+ 1, 62, :_reduce_none,
591
+ 1, 62, :_reduce_none,
592
+ 1, 62, :_reduce_none,
593
+ 1, 62, :_reduce_none,
594
+ 1, 62, :_reduce_none,
595
+ 1, 62, :_reduce_none,
596
+ 1, 62, :_reduce_none,
597
+ 1, 62, :_reduce_none,
598
+ 1, 62, :_reduce_none,
599
+ 1, 62, :_reduce_none,
600
+ 1, 62, :_reduce_none,
601
+ 1, 62, :_reduce_none,
602
+ 1, 62, :_reduce_none,
603
+ 1, 62, :_reduce_none,
604
+ 1, 62, :_reduce_none,
605
+ 1, 63, :_reduce_none,
606
+ 2, 63, :_reduce_159,
607
+ 3, 47, :_reduce_160,
608
+ 1, 49, :_reduce_161,
609
+ 2, 49, :_reduce_162,
610
+ 1, 64, :_reduce_163 ]
611
+
612
+ racc_reduce_n = 164
613
+
614
+ racc_shift_n = 194
615
+
616
+ racc_token_table = {
617
+ false => 0,
618
+ :error => 1,
619
+ :EM_OPEN => 2,
620
+ :EM_CLOSE => 3,
621
+ :ITALIC_OPEN => 4,
622
+ :ITALIC_CLOSE => 5,
623
+ :STRIKE_OPEN => 6,
624
+ :STRIKE_CLOSE => 7,
625
+ :CODE_OPEN => 8,
626
+ :CODE_CLOSE => 9,
627
+ :KBD_OPEN => 10,
628
+ :KBD_CLOSE => 11,
629
+ :LABEL_OPEN => 12,
630
+ :LABEL_CLOSE => 13,
631
+ :LABEL_LINK_OPEN => 14,
632
+ :LABEL_LINK_CLOSE => 15,
633
+ :REFERENCE_OPEN => 16,
634
+ :REFERENCE_CLOSE => 17,
635
+ :VERB_OPEN => 18,
636
+ :VERB_CLOSE => 19,
637
+ :FOOTNOTE_OPEN => 20,
638
+ :FOOTNOTE_CLOSE => 21,
639
+ :RUBY_OPEN => 22,
640
+ :RUBY_CLOSE => 23,
641
+ :VARIABLE_OPEN => 24,
642
+ :VARIABLE_CLOSE => 25,
643
+ :MEDIA_OPEN => 26,
644
+ :MEDIA_CLOSE => 27,
645
+ :MANUEDO_OPEN => 28,
646
+ :MANUEDO_CLOSE => 29,
647
+ :OTHER => 30 }
648
+
649
+ racc_nt_base = 31
650
+
651
+ racc_use_result_var = false
652
+
653
+ Racc_arg = [
654
+ racc_action_table,
655
+ racc_action_check,
656
+ racc_action_default,
657
+ racc_action_pointer,
658
+ racc_goto_table,
659
+ racc_goto_check,
660
+ racc_goto_default,
661
+ racc_goto_pointer,
662
+ racc_nt_base,
663
+ racc_reduce_table,
664
+ racc_token_table,
665
+ racc_shift_n,
666
+ racc_reduce_n,
667
+ racc_use_result_var ]
668
+
669
+ Racc_token_to_s_table = [
670
+ "$end",
671
+ "error",
672
+ "EM_OPEN",
673
+ "EM_CLOSE",
674
+ "ITALIC_OPEN",
675
+ "ITALIC_CLOSE",
676
+ "STRIKE_OPEN",
677
+ "STRIKE_CLOSE",
678
+ "CODE_OPEN",
679
+ "CODE_CLOSE",
680
+ "KBD_OPEN",
681
+ "KBD_CLOSE",
682
+ "LABEL_OPEN",
683
+ "LABEL_CLOSE",
684
+ "LABEL_LINK_OPEN",
685
+ "LABEL_LINK_CLOSE",
686
+ "REFERENCE_OPEN",
687
+ "REFERENCE_CLOSE",
688
+ "VERB_OPEN",
689
+ "VERB_CLOSE",
690
+ "FOOTNOTE_OPEN",
691
+ "FOOTNOTE_CLOSE",
692
+ "RUBY_OPEN",
693
+ "RUBY_CLOSE",
694
+ "VARIABLE_OPEN",
695
+ "VARIABLE_CLOSE",
696
+ "MEDIA_OPEN",
697
+ "MEDIA_CLOSE",
698
+ "MANUEDO_OPEN",
699
+ "MANUEDO_CLOSE",
700
+ "OTHER",
701
+ "$start",
702
+ "content",
703
+ "elements",
704
+ "element",
705
+ "emphasis",
706
+ "italic",
707
+ "strike",
708
+ "code",
709
+ "kbd",
710
+ "label",
711
+ "label_link",
712
+ "reference",
713
+ "ruby",
714
+ "variable",
715
+ "footnote",
716
+ "media",
717
+ "verb",
718
+ "manuedo",
719
+ "normal_strings",
720
+ "media_string",
721
+ "media_strings",
722
+ "ruby_string",
723
+ "ruby_strings",
724
+ "variable_string",
725
+ "variable_strings",
726
+ "label_string",
727
+ "label_strings",
728
+ "label_link_string",
729
+ "label_link_strings",
730
+ "reference_string",
731
+ "reference_strings",
732
+ "verb_string",
733
+ "verb_strings",
734
+ "normal_string" ]
735
+
736
+ Racc_debug_parser = false
737
+
738
+ ##### State transition tables end #####
739
+
740
+ # reduce 0 omitted
741
+
742
+ # reduce 1 omitted
743
+
744
+ # reduce 2 omitted
745
+
746
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 9)
747
+ def _reduce_3(val, _values)
748
+ val[0].push(val[1])
749
+ end
750
+ .,.,
751
+
752
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 10)
753
+ def _reduce_4(val, _values)
754
+ val
755
+ end
756
+ .,.,
757
+
758
+ # reduce 5 omitted
759
+
760
+ # reduce 6 omitted
761
+
762
+ # reduce 7 omitted
763
+
764
+ # reduce 8 omitted
765
+
766
+ # reduce 9 omitted
767
+
768
+ # reduce 10 omitted
769
+
770
+ # reduce 11 omitted
771
+
772
+ # reduce 12 omitted
773
+
774
+ # reduce 13 omitted
775
+
776
+ # reduce 14 omitted
777
+
778
+ # reduce 15 omitted
779
+
780
+ # reduce 16 omitted
781
+
782
+ # reduce 17 omitted
783
+
784
+ # reduce 18 omitted
785
+
786
+ # reduce 19 omitted
787
+
788
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 29)
789
+ def _reduce_20(val, _values)
790
+ Emphasis.new(val[1])
791
+ end
792
+ .,.,
793
+
794
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 30)
795
+ def _reduce_21(val, _values)
796
+ Italic.new(val[1])
797
+ end
798
+ .,.,
799
+
800
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 31)
801
+ def _reduce_22(val, _values)
802
+ Strike.new(val[1])
803
+ end
804
+ .,.,
805
+
806
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 32)
807
+ def _reduce_23(val, _values)
808
+ Code.new(val[1])
809
+ end
810
+ .,.,
811
+
812
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 33)
813
+ def _reduce_24(val, _values)
814
+ Kbd.new(val[1])
815
+ end
816
+ .,.,
817
+
818
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 35)
819
+ def _reduce_25(val, _values)
820
+ @index[:footnote] ||= []
821
+ @index[:footnote] << {:content => val[1] }
822
+ Footnote.new([val[1], @index[:footnote].size])
823
+
824
+ end
825
+ .,.,
826
+
827
+ # reduce 26 omitted
828
+
829
+ # reduce 27 omitted
830
+
831
+ # reduce 28 omitted
832
+
833
+ # reduce 29 omitted
834
+
835
+ # reduce 30 omitted
836
+
837
+ # reduce 31 omitted
838
+
839
+ # reduce 32 omitted
840
+
841
+ # reduce 33 omitted
842
+
843
+ # reduce 34 omitted
844
+
845
+ # reduce 35 omitted
846
+
847
+ # reduce 36 omitted
848
+
849
+ # reduce 37 omitted
850
+
851
+ # reduce 38 omitted
852
+
853
+ # reduce 39 omitted
854
+
855
+ # reduce 40 omitted
856
+
857
+ # reduce 41 omitted
858
+
859
+ # reduce 42 omitted
860
+
861
+ # reduce 43 omitted
862
+
863
+ # reduce 44 omitted
864
+
865
+ # reduce 45 omitted
866
+
867
+ # reduce 46 omitted
868
+
869
+ # reduce 47 omitted
870
+
871
+ # reduce 48 omitted
872
+
873
+ # reduce 49 omitted
874
+
875
+ # reduce 50 omitted
876
+
877
+ # reduce 51 omitted
878
+
879
+ # reduce 52 omitted
880
+
881
+ # reduce 53 omitted
882
+
883
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 72)
884
+ def _reduce_54(val, _values)
885
+ val.join
886
+ end
887
+ .,.,
888
+
889
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 74)
890
+ def _reduce_55(val, _values)
891
+ unless @options[:media_directory].nil? || @options[:media_directory].empty?
892
+ val[0] = File.join(@options[:media_directory],val[0]) unless val[0] =~ /^.*:\/\/.*/
893
+ end
894
+ val[0]
895
+
896
+ end
897
+ .,.,
898
+
899
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 80)
900
+ def _reduce_56(val, _values)
901
+ mime = MimeMagic.by_extension(val[1].split(".").last)
902
+ unless mime.nil?
903
+ mediatype, subtype = mime.mediatype, mime.subtype
904
+ else
905
+ mediatype, subtype = "",""
906
+ end
907
+ Media.new([val[1],mediatype,subtype])
908
+
909
+ end
910
+ .,.,
911
+
912
+ # reduce 57 omitted
913
+
914
+ # reduce 58 omitted
915
+
916
+ # reduce 59 omitted
917
+
918
+ # reduce 60 omitted
919
+
920
+ # reduce 61 omitted
921
+
922
+ # reduce 62 omitted
923
+
924
+ # reduce 63 omitted
925
+
926
+ # reduce 64 omitted
927
+
928
+ # reduce 65 omitted
929
+
930
+ # reduce 66 omitted
931
+
932
+ # reduce 67 omitted
933
+
934
+ # reduce 68 omitted
935
+
936
+ # reduce 69 omitted
937
+
938
+ # reduce 70 omitted
939
+
940
+ # reduce 71 omitted
941
+
942
+ # reduce 72 omitted
943
+
944
+ # reduce 73 omitted
945
+
946
+ # reduce 74 omitted
947
+
948
+ # reduce 75 omitted
949
+
950
+ # reduce 76 omitted
951
+
952
+ # reduce 77 omitted
953
+
954
+ # reduce 78 omitted
955
+
956
+ # reduce 79 omitted
957
+
958
+ # reduce 80 omitted
959
+
960
+ # reduce 81 omitted
961
+
962
+ # reduce 82 omitted
963
+
964
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 118)
965
+ def _reduce_83(val, _values)
966
+ val.join
967
+ end
968
+ .,.,
969
+
970
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 119)
971
+ def _reduce_84(val, _values)
972
+ val[0]
973
+ end
974
+ .,.,
975
+
976
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 122)
977
+ def _reduce_85(val, _values)
978
+ base, text = val[1].split("|",2)
979
+ text ||= base
980
+ # parser = InlineParser.new
981
+ # text = parser.parse(text).map do |n| n.apply end
982
+ Ruby.new([base, text])
983
+
984
+ end
985
+ .,.,
986
+
987
+ # reduce 86 omitted
988
+
989
+ # reduce 87 omitted
990
+
991
+ # reduce 88 omitted
992
+
993
+ # reduce 89 omitted
994
+
995
+ # reduce 90 omitted
996
+
997
+ # reduce 91 omitted
998
+
999
+ # reduce 92 omitted
1000
+
1001
+ # reduce 93 omitted
1002
+
1003
+ # reduce 94 omitted
1004
+
1005
+ # reduce 95 omitted
1006
+
1007
+ # reduce 96 omitted
1008
+
1009
+ # reduce 97 omitted
1010
+
1011
+ # reduce 98 omitted
1012
+
1013
+ # reduce 99 omitted
1014
+
1015
+ # reduce 100 omitted
1016
+
1017
+ # reduce 101 omitted
1018
+
1019
+ # reduce 102 omitted
1020
+
1021
+ # reduce 103 omitted
1022
+
1023
+ # reduce 104 omitted
1024
+
1025
+ # reduce 105 omitted
1026
+
1027
+ # reduce 106 omitted
1028
+
1029
+ # reduce 107 omitted
1030
+
1031
+ # reduce 108 omitted
1032
+
1033
+ # reduce 109 omitted
1034
+
1035
+ # reduce 110 omitted
1036
+
1037
+ # reduce 111 omitted
1038
+
1039
+ # reduce 112 omitted
1040
+
1041
+ # reduce 113 omitted
1042
+
1043
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 160)
1044
+ def _reduce_114(val, _values)
1045
+ val.join
1046
+ end
1047
+ .,.,
1048
+
1049
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 161)
1050
+ def _reduce_115(val, _values)
1051
+ val[0]
1052
+ end
1053
+ .,.,
1054
+
1055
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 164)
1056
+ def _reduce_116(val, _values)
1057
+ base, text = val[1].split("=",2)
1058
+ @variables ||= {}
1059
+ @variables[base] = text unless text.nil?
1060
+ value = @variables[base]
1061
+ unless value.nil?
1062
+ parser = InlineParser.new
1063
+ value = parser.parse(value).map do |n| n.apply end
1064
+ else # 変数が未定義
1065
+ value = base
1066
+ end
1067
+ Variable.new(value)
1068
+
1069
+ end
1070
+ .,.,
1071
+
1072
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 178)
1073
+ def _reduce_117(val, _values)
1074
+ Manuedo.new(val[1])
1075
+ end
1076
+ .,.,
1077
+
1078
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 183)
1079
+ def _reduce_118(val, _values)
1080
+ val[0]
1081
+ end
1082
+ .,.,
1083
+
1084
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 186)
1085
+ def _reduce_119(val, _values)
1086
+ val.join
1087
+ end
1088
+ .,.,
1089
+
1090
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 187)
1091
+ def _reduce_120(val, _values)
1092
+ val[0]
1093
+ end
1094
+ .,.,
1095
+
1096
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 190)
1097
+ def _reduce_121(val, _values)
1098
+ label, title = val[1].split("|",2)
1099
+ title ||= label
1100
+ @index[:label] ||= []
1101
+ @index[:label] << {:title => title }
1102
+ Label.new([label.to_code, title, @index[:label].size])
1103
+
1104
+ end
1105
+ .,.,
1106
+
1107
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 199)
1108
+ def _reduce_122(val, _values)
1109
+ val[0]
1110
+ end
1111
+ .,.,
1112
+
1113
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 201)
1114
+ def _reduce_123(val, _values)
1115
+ val.join
1116
+ end
1117
+ .,.,
1118
+
1119
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 202)
1120
+ def _reduce_124(val, _values)
1121
+ val[0]
1122
+ end
1123
+ .,.,
1124
+
1125
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 205)
1126
+ def _reduce_125(val, _values)
1127
+ label, title = val[1].split("|",2)
1128
+ title ||= label
1129
+ LabelLink.new([label.to_code, title])
1130
+
1131
+ end
1132
+ .,.,
1133
+
1134
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 212)
1135
+ def _reduce_126(val, _values)
1136
+ val[0]
1137
+ end
1138
+ .,.,
1139
+
1140
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 214)
1141
+ def _reduce_127(val, _values)
1142
+ val.join
1143
+ end
1144
+ .,.,
1145
+
1146
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 215)
1147
+ def _reduce_128(val, _values)
1148
+ val[0]
1149
+ end
1150
+ .,.,
1151
+
1152
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 218)
1153
+ def _reduce_129(val, _values)
1154
+ title, uri = val[1].split("|",2)
1155
+ uri ||= title
1156
+ if uri.strip[-2,2] == ".%" and ! @options[:reference_extension].nil?
1157
+ uri.slice!(-2,2)
1158
+ uri = "#{uri}#{@options[:reference_extension]}"
1159
+ end
1160
+ Reference.new([title, uri])
1161
+
1162
+ end
1163
+ .,.,
1164
+
1165
+ # reduce 130 omitted
1166
+
1167
+ # reduce 131 omitted
1168
+
1169
+ # reduce 132 omitted
1170
+
1171
+ # reduce 133 omitted
1172
+
1173
+ # reduce 134 omitted
1174
+
1175
+ # reduce 135 omitted
1176
+
1177
+ # reduce 136 omitted
1178
+
1179
+ # reduce 137 omitted
1180
+
1181
+ # reduce 138 omitted
1182
+
1183
+ # reduce 139 omitted
1184
+
1185
+ # reduce 140 omitted
1186
+
1187
+ # reduce 141 omitted
1188
+
1189
+ # reduce 142 omitted
1190
+
1191
+ # reduce 143 omitted
1192
+
1193
+ # reduce 144 omitted
1194
+
1195
+ # reduce 145 omitted
1196
+
1197
+ # reduce 146 omitted
1198
+
1199
+ # reduce 147 omitted
1200
+
1201
+ # reduce 148 omitted
1202
+
1203
+ # reduce 149 omitted
1204
+
1205
+ # reduce 150 omitted
1206
+
1207
+ # reduce 151 omitted
1208
+
1209
+ # reduce 152 omitted
1210
+
1211
+ # reduce 153 omitted
1212
+
1213
+ # reduce 154 omitted
1214
+
1215
+ # reduce 155 omitted
1216
+
1217
+ # reduce 156 omitted
1218
+
1219
+ # reduce 157 omitted
1220
+
1221
+ # reduce 158 omitted
1222
+
1223
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 258)
1224
+ def _reduce_159(val, _values)
1225
+ val
1226
+ end
1227
+ .,.,
1228
+
1229
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 260)
1230
+ def _reduce_160(val, _values)
1231
+ Verb.new(val[1])
1232
+ end
1233
+ .,.,
1234
+
1235
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 264)
1236
+ def _reduce_161(val, _values)
1237
+ Plain.new(val[0])
1238
+ end
1239
+ .,.,
1240
+
1241
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 265)
1242
+ def _reduce_162(val, _values)
1243
+ Plain.new([val[0].contents, val[1]])
1244
+ end
1245
+ .,.,
1246
+
1247
+ module_eval(<<'.,.,', 'mokinlineparser.ry', 267)
1248
+ def _reduce_163(val, _values)
1249
+ val[0]
1250
+ end
1251
+ .,.,
1252
+
1253
+ def _reduce_none(val, _values)
1254
+ val[0]
1255
+ end
1256
+
1257
+ end # class InlineParser
1258
+
1259
+ if __FILE__ == $0
1260
+ mok = InlineParser.new
1261
+ src = $stdin.readline
1262
+ nodes = mok.parse(src)
1263
+ puts "----- output -----"
1264
+ nodes.each do |n|
1265
+ puts n.apply
1266
+ end
1267
+ end
1268
+ end # end of module Mok