trenni 3.8.0 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,6 +54,11 @@ extern ID
54
54
  id_key_get,
55
55
  id_new,
56
56
  id_name,
57
+ id_integer,
58
+ id_string,
59
+ id_append,
60
+ id_assign,
61
+ id_pair,
57
62
  id_attributes,
58
63
  id_closed,
59
64
  id_to_s,
@@ -63,10 +68,10 @@ extern ID
63
68
  typedef struct {
64
69
  const char * begin;
65
70
  const char * end;
66
- } Token;
71
+ } Trenni_Token;
67
72
 
68
73
  // Convert a token to a Ruby string.
69
- static inline VALUE Trenni_token(Token token, rb_encoding * encoding) {
74
+ static inline VALUE Trenni_Token_string(Trenni_Token token, rb_encoding * encoding) {
70
75
  return rb_enc_str_new(token.begin, token.end - token.begin, encoding);
71
76
  }
72
77
 
@@ -97,7 +102,7 @@ static inline void Trenni_append(VALUE * buffer, rb_encoding * encoding, VALUE s
97
102
  }
98
103
 
99
104
  // Append a token to a buffer. The buffer may or may not be initialized.
100
- static inline void Trenni_append_token(VALUE * buffer, rb_encoding * encoding, Token token) {
105
+ static inline void Trenni_append_token(VALUE * buffer, rb_encoding * encoding, Trenni_Token token) {
101
106
  if (*buffer == Qnil) {
102
107
  // Allocate a buffer exactly the right size:
103
108
  *buffer = rb_enc_str_new(token.begin, token.end - token.begin, encoding);
@@ -23,3 +23,5 @@
23
23
  require_relative 'trenni/native'
24
24
  require_relative 'trenni/builder'
25
25
  require_relative 'trenni/template'
26
+
27
+ require_relative 'trenni/reference'
@@ -23,7 +23,10 @@
23
23
  require_relative 'buffer'
24
24
 
25
25
  module Trenni
26
- class ParseError < StandardError
26
+ class Error < StandardError
27
+ end
28
+
29
+ class ParseError < Error
27
30
  def initialize(message, buffer, offset)
28
31
  super(message)
29
32
 
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  # line 1 "markup.rl"
4
3
  # Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
@@ -25,423 +24,427 @@
25
24
  # line 207 "markup.rl"
26
25
 
27
26
 
28
- require_relative '../parse_error'
27
+ require_relative '../error'
29
28
 
30
29
  module Trenni
31
30
  module Fallback
32
- # line 33 "markup.rb"
33
- class << self
34
- attr_accessor :_markup_trans_keys
35
- private :_markup_trans_keys, :_markup_trans_keys=
36
- end
37
- self._markup_trans_keys = [
38
- 0, 0, 0, 127, 0, 127,
39
- 0, 127, 0, 127, 62,
40
- 62, 34, 39, 34, 60,
41
- 34, 60, 9, 62, 34, 60,
42
- 9, 62, 38, 60, 38,
43
- 60, 38, 60, 45, 91,
44
- 45, 45, 45, 45, 45, 45,
45
- 45, 62, 79, 79, 67,
46
- 67, 84, 84, 89, 89,
47
- 80, 80, 69, 69, 62, 62,
48
- 67, 67, 68, 68, 65,
49
- 65, 84, 84, 65, 65,
50
- 91, 91, 93, 93, 93, 93,
51
- 62, 93, 0, 127, 0,
52
- 127, 0, 127, 0, 127,
53
- 63, 63, 62, 63, 35, 122,
54
- 48, 120, 48, 59, 48,
55
- 102, 48, 102, 48, 122,
56
- 38, 60, 38, 60, 38, 60,
57
- 38, 60, 38, 60, 38,
58
- 60, 38, 60, 38, 60,
59
- 38, 60, 0, 0, 0
60
- ]
61
-
62
- class << self
63
- attr_accessor :_markup_key_spans
64
- private :_markup_key_spans, :_markup_key_spans=
65
- end
66
- self._markup_key_spans = [
67
- 0, 128, 128, 128, 128, 1, 6, 27,
68
- 27, 54, 27, 54, 23, 23, 23, 47,
69
- 1, 1, 1, 18, 1, 1, 1, 1,
70
- 1, 1, 1, 1, 1, 1, 1, 1,
71
- 1, 1, 1, 32, 128, 128, 128, 128,
72
- 1, 2, 88, 73, 12, 55, 55, 75,
73
- 23, 23, 23, 23, 23, 23, 23, 23,
74
- 23, 0
75
- ]
76
-
77
- class << self
78
- attr_accessor :_markup_index_offsets
79
- private :_markup_index_offsets, :_markup_index_offsets=
80
- end
81
- self._markup_index_offsets = [
82
- 0, 0, 129, 258, 387, 516, 518, 525,
83
- 553, 581, 636, 664, 719, 743, 767, 791,
84
- 839, 841, 843, 845, 864, 866, 868, 870,
85
- 872, 874, 876, 878, 880, 882, 884, 886,
86
- 888, 890, 892, 894, 927, 1056, 1185, 1314,
87
- 1443, 1445, 1448, 1537, 1611, 1624, 1680, 1736,
88
- 1812, 1836, 1860, 1884, 1908, 1932, 1956, 1980,
89
- 2004, 2028
90
- ]
91
-
92
- class << self
93
- attr_accessor :_markup_indicies
94
- private :_markup_indicies, :_markup_indicies=
95
- end
96
- self._markup_indicies = [
97
- 1, 1, 1, 1, 1, 1, 1, 1,
98
- 1, 1, 1, 1, 1, 1, 1, 1,
99
- 1, 1, 1, 1, 1, 1, 1, 1,
100
- 1, 1, 1, 1, 1, 1, 1, 1,
101
- 1, 2, 1, 1, 1, 1, 1, 1,
102
- 1, 1, 1, 1, 1, 0, 0, 3,
103
- 0, 0, 0, 0, 0, 0, 0, 0,
104
- 0, 0, 0, 1, 1, 1, 1, 4,
105
- 1, 0, 0, 0, 0, 0, 0, 0,
106
- 0, 0, 0, 0, 0, 0, 0, 0,
107
- 0, 0, 0, 0, 0, 0, 0, 0,
108
- 0, 0, 0, 1, 1, 1, 1, 0,
109
- 1, 0, 0, 0, 0, 0, 0, 0,
110
- 0, 0, 0, 0, 0, 0, 0, 0,
111
- 0, 0, 0, 0, 0, 0, 0, 0,
112
- 0, 0, 0, 1, 1, 1, 1, 1,
113
- 0, 1, 1, 1, 1, 1, 1, 1,
114
- 1, 1, 6, 6, 6, 6, 6, 1,
115
- 1, 1, 1, 1, 1, 1, 1, 1,
116
- 1, 1, 1, 1, 1, 1, 1, 1,
117
- 1, 6, 1, 1, 1, 1, 1, 1,
118
- 1, 1, 1, 1, 1, 1, 5, 5,
119
- 7, 5, 5, 5, 5, 5, 5, 5,
120
- 5, 5, 5, 5, 1, 1, 1, 8,
121
- 1, 1, 5, 5, 5, 5, 5, 5,
122
- 5, 5, 5, 5, 5, 5, 5, 5,
123
- 5, 5, 5, 5, 5, 5, 5, 5,
124
- 5, 5, 5, 5, 1, 1, 1, 1,
125
- 5, 1, 5, 5, 5, 5, 5, 5,
126
- 5, 5, 5, 5, 5, 5, 5, 5,
127
- 5, 5, 5, 5, 5, 5, 5, 5,
128
- 5, 5, 5, 5, 1, 1, 1, 1,
129
- 1, 5, 1, 1, 1, 1, 1, 1,
130
- 1, 1, 1, 10, 10, 10, 10, 10,
131
- 1, 1, 1, 1, 1, 1, 1, 1,
132
- 1, 1, 1, 1, 1, 1, 1, 1,
133
- 1, 1, 10, 1, 1, 1, 1, 1,
134
- 1, 1, 1, 1, 1, 1, 1, 9,
135
- 9, 11, 9, 9, 9, 9, 9, 9,
136
- 9, 9, 9, 9, 9, 1, 1, 1,
137
- 12, 1, 1, 9, 9, 9, 9, 9,
138
- 9, 9, 9, 9, 9, 9, 9, 9,
139
- 9, 9, 9, 9, 9, 9, 9, 9,
140
- 9, 9, 9, 9, 9, 1, 1, 1,
141
- 1, 9, 1, 9, 9, 9, 9, 9,
142
- 9, 9, 9, 9, 9, 9, 9, 9,
143
- 9, 9, 9, 9, 9, 9, 9, 9,
144
- 9, 9, 9, 9, 9, 1, 1, 1,
145
- 1, 1, 9, 1, 1, 1, 1, 1,
146
- 1, 1, 1, 1, 14, 14, 14, 14,
147
- 14, 1, 1, 1, 1, 1, 1, 1,
148
- 1, 1, 1, 1, 1, 1, 1, 1,
149
- 1, 1, 1, 14, 1, 1, 1, 1,
150
- 1, 1, 1, 1, 1, 1, 1, 1,
151
- 13, 13, 15, 13, 13, 13, 13, 13,
152
- 13, 13, 13, 13, 13, 13, 1, 1,
153
- 16, 17, 1, 1, 13, 13, 13, 13,
154
- 13, 13, 13, 13, 13, 13, 13, 13,
155
- 13, 13, 13, 13, 13, 13, 13, 13,
156
- 13, 13, 13, 13, 13, 13, 1, 1,
157
- 1, 1, 13, 1, 13, 13, 13, 13,
158
- 13, 13, 13, 13, 13, 13, 13, 13,
159
- 13, 13, 13, 13, 13, 13, 13, 13,
160
- 13, 13, 13, 13, 13, 13, 1, 1,
161
- 1, 1, 1, 13, 12, 1, 18, 1,
162
- 1, 1, 1, 19, 1, 21, 20, 20,
163
- 20, 22, 20, 20, 20, 20, 20, 20,
164
- 20, 20, 20, 20, 20, 20, 20, 20,
165
- 20, 20, 20, 20, 20, 20, 20, 1,
166
- 20, 24, 23, 23, 23, 25, 23, 23,
167
- 23, 23, 23, 23, 23, 23, 23, 23,
168
- 23, 23, 23, 23, 23, 23, 23, 23,
169
- 23, 23, 23, 1, 23, 26, 26, 26,
170
- 26, 26, 1, 1, 1, 1, 1, 1,
171
- 1, 1, 1, 1, 1, 1, 1, 1,
172
- 1, 1, 1, 1, 26, 1, 1, 1,
173
- 1, 1, 1, 1, 1, 1, 1, 1,
174
- 1, 1, 1, 27, 1, 1, 1, 1,
175
- 1, 1, 1, 1, 1, 1, 1, 1,
176
- 1, 1, 28, 1, 30, 29, 29, 29,
177
- 31, 29, 29, 29, 29, 29, 29, 29,
178
- 29, 29, 29, 29, 29, 29, 29, 29,
179
- 29, 29, 29, 29, 29, 29, 1, 29,
180
- 32, 32, 32, 32, 32, 1, 1, 1,
181
- 1, 1, 1, 1, 1, 1, 1, 1,
182
- 1, 1, 1, 1, 1, 1, 1, 32,
183
- 1, 1, 1, 1, 1, 1, 1, 1,
184
- 1, 1, 1, 1, 1, 1, 33, 1,
185
- 1, 1, 1, 1, 1, 1, 1, 1,
186
- 1, 1, 1, 1, 1, 34, 1, 36,
187
- 21, 35, 35, 35, 35, 35, 35, 35,
188
- 35, 35, 35, 35, 35, 35, 35, 35,
189
- 35, 35, 35, 35, 35, 1, 35, 38,
190
- 24, 37, 37, 37, 37, 37, 37, 37,
191
- 37, 37, 37, 37, 37, 37, 37, 37,
192
- 37, 37, 37, 37, 37, 1, 37, 40,
193
- 30, 39, 39, 39, 39, 39, 39, 39,
194
- 39, 39, 39, 39, 39, 39, 39, 39,
195
- 39, 39, 39, 39, 39, 1, 39, 41,
196
- 42, 42, 42, 42, 42, 42, 42, 42,
197
- 42, 42, 42, 42, 42, 42, 42, 42,
198
- 42, 42, 42, 42, 42, 42, 43, 42,
199
- 42, 42, 42, 42, 42, 42, 42, 42,
200
- 42, 42, 42, 42, 42, 42, 42, 42,
201
- 42, 42, 42, 42, 42, 44, 42, 45,
202
- 42, 46, 45, 47, 45, 47, 45, 45,
203
- 45, 45, 45, 45, 45, 45, 45, 45,
204
- 45, 45, 45, 45, 45, 45, 48, 45,
205
- 49, 42, 50, 42, 51, 42, 52, 42,
206
- 53, 42, 54, 42, 55, 54, 56, 42,
207
- 57, 42, 58, 42, 59, 42, 60, 42,
208
- 61, 42, 62, 61, 63, 61, 64, 61,
209
- 61, 61, 61, 61, 61, 61, 61, 61,
210
- 61, 61, 61, 61, 61, 61, 61, 61,
211
- 61, 61, 61, 61, 61, 61, 61, 61,
212
- 61, 61, 61, 61, 61, 63, 61, 1,
213
- 1, 1, 1, 1, 1, 1, 1, 1,
214
- 1, 1, 1, 1, 1, 1, 1, 1,
215
- 1, 1, 1, 1, 1, 1, 1, 1,
216
- 1, 1, 1, 1, 1, 1, 1, 1,
217
- 1, 1, 1, 1, 1, 1, 1, 1,
218
- 1, 1, 1, 1, 65, 65, 1, 65,
219
- 65, 65, 65, 65, 65, 65, 65, 65,
220
- 65, 65, 1, 1, 1, 1, 1, 1,
221
- 65, 65, 65, 65, 65, 65, 65, 65,
222
- 65, 65, 65, 65, 65, 65, 65, 65,
223
- 65, 65, 65, 65, 65, 65, 65, 65,
224
- 65, 65, 1, 1, 1, 1, 65, 1,
225
- 65, 65, 65, 65, 65, 65, 65, 65,
226
- 65, 65, 65, 65, 65, 65, 65, 65,
227
- 65, 65, 65, 65, 65, 65, 65, 65,
228
- 65, 65, 1, 1, 1, 1, 1, 65,
229
- 1, 1, 1, 1, 1, 1, 1, 1,
230
- 1, 1, 1, 1, 1, 1, 1, 1,
231
- 1, 1, 1, 1, 1, 1, 1, 1,
232
- 1, 1, 1, 1, 1, 1, 1, 1,
233
- 1, 1, 1, 1, 1, 1, 1, 1,
234
- 1, 1, 1, 1, 1, 66, 66, 1,
235
- 66, 66, 66, 66, 66, 66, 66, 66,
236
- 66, 66, 66, 1, 1, 1, 67, 1,
237
- 1, 66, 66, 66, 66, 66, 66, 66,
238
- 66, 66, 66, 66, 66, 66, 66, 66,
239
- 66, 66, 66, 66, 66, 66, 66, 66,
240
- 66, 66, 66, 1, 1, 1, 1, 66,
241
- 1, 66, 66, 66, 66, 66, 66, 66,
242
- 66, 66, 66, 66, 66, 66, 66, 66,
243
- 66, 66, 66, 66, 66, 66, 66, 66,
244
- 66, 66, 66, 1, 1, 1, 1, 1,
245
- 66, 69, 69, 69, 69, 69, 69, 69,
246
- 69, 69, 69, 69, 69, 69, 69, 69,
247
- 69, 69, 69, 69, 69, 69, 69, 69,
248
- 69, 69, 69, 69, 69, 69, 69, 69,
249
- 69, 69, 69, 69, 69, 69, 69, 69,
250
- 69, 69, 69, 69, 69, 69, 68, 68,
251
- 69, 68, 68, 68, 68, 68, 68, 68,
252
- 68, 68, 68, 68, 69, 69, 69, 69,
253
- 69, 69, 68, 68, 68, 68, 68, 68,
254
- 68, 68, 68, 68, 68, 68, 68, 68,
255
- 68, 68, 68, 68, 68, 68, 68, 68,
256
- 68, 68, 68, 68, 69, 69, 69, 69,
257
- 68, 69, 68, 68, 68, 68, 68, 68,
258
- 68, 68, 68, 68, 68, 68, 68, 68,
259
- 68, 68, 68, 68, 68, 68, 68, 68,
260
- 68, 68, 68, 68, 69, 69, 69, 69,
261
- 69, 68, 69, 69, 69, 69, 69, 69,
262
- 69, 69, 69, 71, 71, 71, 71, 71,
263
- 69, 69, 69, 69, 69, 69, 69, 69,
264
- 69, 69, 69, 69, 69, 69, 69, 69,
265
- 69, 69, 71, 69, 69, 69, 69, 69,
266
- 69, 69, 69, 69, 69, 69, 69, 70,
267
- 70, 69, 70, 70, 70, 70, 70, 70,
268
- 70, 70, 70, 70, 70, 69, 69, 69,
269
- 69, 69, 69, 70, 70, 70, 70, 70,
270
- 70, 70, 70, 70, 70, 70, 70, 70,
271
- 70, 70, 70, 70, 70, 70, 70, 70,
272
- 70, 70, 70, 70, 70, 69, 69, 69,
273
- 69, 70, 69, 70, 70, 70, 70, 70,
274
- 70, 70, 70, 70, 70, 70, 70, 70,
275
- 70, 70, 70, 70, 70, 70, 70, 70,
276
- 70, 70, 70, 70, 70, 69, 69, 69,
277
- 69, 69, 70, 73, 72, 74, 73, 72,
278
- 76, 75, 75, 75, 75, 75, 75, 75,
279
- 75, 75, 75, 75, 75, 77, 77, 77,
280
- 77, 77, 77, 77, 77, 77, 77, 75,
281
- 75, 75, 75, 75, 75, 75, 77, 77,
282
- 77, 77, 77, 77, 77, 77, 77, 77,
283
- 77, 77, 77, 77, 77, 77, 77, 77,
284
- 77, 77, 77, 77, 77, 77, 77, 77,
285
- 75, 75, 75, 75, 75, 75, 77, 77,
286
- 77, 77, 77, 77, 77, 77, 77, 77,
287
- 77, 77, 77, 77, 77, 77, 77, 77,
288
- 77, 77, 77, 77, 77, 77, 77, 77,
289
- 75, 78, 78, 78, 78, 78, 78, 78,
290
- 78, 78, 78, 75, 75, 75, 75, 75,
291
- 75, 75, 75, 75, 75, 75, 75, 75,
292
- 75, 75, 75, 75, 75, 75, 75, 75,
293
- 75, 75, 75, 75, 75, 75, 75, 75,
294
- 75, 75, 75, 75, 75, 75, 75, 75,
295
- 75, 75, 75, 75, 75, 75, 75, 75,
296
- 75, 75, 75, 75, 75, 75, 75, 75,
297
- 75, 75, 75, 75, 75, 75, 75, 75,
298
- 75, 79, 75, 80, 80, 80, 80, 80,
299
- 80, 80, 80, 80, 80, 75, 81, 75,
300
- 82, 82, 82, 82, 82, 82, 82, 82,
301
- 82, 82, 75, 75, 75, 75, 75, 75,
302
- 75, 82, 82, 82, 82, 82, 82, 75,
303
- 75, 75, 75, 75, 75, 75, 75, 75,
304
- 75, 75, 75, 75, 75, 75, 75, 75,
305
- 75, 75, 75, 75, 75, 75, 75, 75,
306
- 75, 82, 82, 82, 82, 82, 82, 75,
307
- 83, 83, 83, 83, 83, 83, 83, 83,
308
- 83, 83, 75, 84, 75, 75, 75, 75,
309
- 75, 83, 83, 83, 83, 83, 83, 75,
310
- 75, 75, 75, 75, 75, 75, 75, 75,
311
- 75, 75, 75, 75, 75, 75, 75, 75,
312
- 75, 75, 75, 75, 75, 75, 75, 75,
313
- 75, 83, 83, 83, 83, 83, 83, 75,
314
- 85, 85, 85, 85, 85, 85, 85, 85,
315
- 85, 85, 75, 86, 75, 75, 75, 75,
316
- 75, 85, 85, 85, 85, 85, 85, 85,
317
- 85, 85, 85, 85, 85, 85, 85, 85,
318
- 85, 85, 85, 85, 85, 85, 85, 85,
319
- 85, 85, 85, 75, 75, 75, 75, 75,
320
- 75, 85, 85, 85, 85, 85, 85, 85,
321
- 85, 85, 85, 85, 85, 85, 85, 85,
322
- 85, 85, 85, 85, 85, 85, 85, 85,
323
- 85, 85, 85, 75, 88, 87, 87, 87,
324
- 87, 87, 87, 87, 87, 87, 87, 87,
325
- 87, 87, 87, 87, 87, 87, 87, 87,
326
- 87, 87, 89, 87, 91, 90, 90, 90,
327
- 90, 90, 90, 90, 90, 90, 90, 90,
328
- 90, 90, 90, 90, 90, 90, 90, 90,
329
- 90, 90, 92, 90, 94, 93, 93, 93,
330
- 93, 93, 93, 93, 93, 93, 93, 93,
331
- 93, 93, 93, 93, 93, 93, 93, 93,
332
- 93, 93, 95, 93, 97, 96, 96, 96,
333
- 96, 96, 96, 96, 96, 96, 96, 96,
334
- 96, 96, 96, 96, 96, 96, 96, 96,
335
- 96, 96, 98, 96, 100, 99, 99, 99,
336
- 99, 99, 99, 99, 99, 99, 99, 99,
337
- 99, 99, 99, 99, 99, 99, 99, 99,
338
- 99, 99, 101, 99, 103, 102, 102, 102,
339
- 102, 102, 102, 102, 102, 102, 102, 102,
340
- 102, 102, 102, 102, 102, 102, 102, 102,
341
- 102, 102, 104, 102, 106, 105, 105, 105,
342
- 105, 105, 105, 105, 105, 105, 105, 105,
343
- 105, 105, 105, 105, 105, 105, 105, 105,
344
- 105, 105, 107, 105, 109, 108, 108, 108,
345
- 108, 108, 108, 108, 108, 108, 108, 108,
346
- 108, 108, 108, 108, 108, 108, 108, 108,
347
- 108, 108, 110, 108, 112, 111, 111, 111,
348
- 111, 111, 111, 111, 111, 111, 111, 111,
349
- 111, 111, 111, 111, 111, 111, 111, 111,
350
- 111, 111, 113, 111, 42, 0
351
- ]
352
-
353
- class << self
354
- attr_accessor :_markup_trans_targs
355
- private :_markup_trans_targs, :_markup_trans_targs=
356
- end
357
- self._markup_trans_targs = [
358
- 2, 0, 15, 36, 38, 2, 3, 5,
359
- 51, 4, 3, 5, 51, 4, 3, 5,
360
- 6, 51, 7, 12, 8, 11, 10, 8,
361
- 9, 10, 3, 5, 51, 8, 9, 10,
362
- 3, 5, 51, 13, 14, 13, 14, 13,
363
- 14, 16, 0, 20, 27, 17, 18, 19,
364
- 52, 21, 22, 23, 24, 25, 26, 53,
365
- 28, 29, 30, 31, 32, 33, 34, 35,
366
- 54, 37, 37, 55, 39, 0, 39, 40,
367
- 40, 41, 56, 0, 43, 47, 44, 45,
368
- 44, 57, 46, 46, 57, 47, 57, 49,
369
- 50, 1, 49, 50, 1, 49, 50, 1,
370
- 49, 50, 1, 49, 50, 1, 49, 50,
371
- 1, 49, 50, 1, 49, 50, 1, 49,
372
- 50, 1
373
- ]
374
-
375
- class << self
376
- attr_accessor :_markup_trans_actions
377
- private :_markup_trans_actions, :_markup_trans_actions=
378
- end
379
- self._markup_trans_actions = [
380
- 2, 1, 0, 0, 0, 0, 3, 4,
381
- 3, 5, 0, 6, 0, 0, 7, 8,
382
- 9, 7, 0, 0, 10, 0, 11, 0,
383
- 12, 13, 14, 15, 14, 16, 17, 18,
384
- 19, 20, 19, 10, 11, 0, 13, 16,
385
- 18, 0, 0, 0, 0, 0, 0, 0,
386
- 0, 0, 0, 0, 0, 0, 0, 0,
387
- 0, 0, 0, 0, 0, 0, 0, 0,
388
- 0, 2, 0, 9, 2, 24, 0, 25,
389
- 0, 26, 0, 27, 0, 28, 28, 0,
390
- 0, 29, 28, 0, 30, 0, 31, 32,
391
- 33, 34, 0, 13, 36, 16, 18, 38,
392
- 40, 41, 42, 44, 45, 46, 48, 49,
393
- 50, 52, 53, 54, 56, 57, 58, 60,
394
- 61, 62
395
- ]
396
-
397
- class << self
398
- attr_accessor :_markup_eof_actions
399
- private :_markup_eof_actions, :_markup_eof_actions=
400
- end
401
- self._markup_eof_actions = [
402
- 0, 1, 1, 1, 1, 1, 1, 1,
403
- 1, 1, 1, 1, 1, 1, 1, 0,
404
- 0, 21, 21, 21, 0, 0, 0, 0,
405
- 0, 0, 22, 0, 0, 0, 0, 0,
406
- 0, 23, 23, 23, 1, 1, 24, 24,
407
- 24, 24, 27, 27, 27, 27, 27, 27,
408
- 0, 35, 37, 39, 43, 47, 51, 55,
409
- 59, 0
410
- ]
411
-
412
- class << self
413
- attr_accessor :markup_start
414
- end
415
- self.markup_start = 48;
416
- class << self
417
- attr_accessor :markup_first_final
418
- end
419
- self.markup_first_final = 48;
420
- class << self
421
- attr_accessor :markup_error
422
- end
423
- self.markup_error = 0;
31
+
32
+ # line 33 "markup.rb"
33
+ class << self
34
+ attr_accessor :_markup_trans_keys
35
+ private :_markup_trans_keys, :_markup_trans_keys=
36
+ end
37
+ self._markup_trans_keys = [
38
+ 0, 0, 0, 127, 0, 127,
39
+ 0, 127, 0, 127, 62,
40
+ 62, 34, 39, 34, 60,
41
+ 34, 60, 9, 62, 34, 60,
42
+ 9, 62, 38, 60, 38,
43
+ 60, 38, 60, 45, 91,
44
+ 45, 45, 45, 45, 45, 45,
45
+ 45, 62, 79, 79, 67,
46
+ 67, 84, 84, 89, 89,
47
+ 80, 80, 69, 69, 62, 62,
48
+ 67, 67, 68, 68, 65,
49
+ 65, 84, 84, 65, 65,
50
+ 91, 91, 93, 93, 93, 93,
51
+ 62, 93, 0, 127, 0,
52
+ 127, 0, 127, 0, 127,
53
+ 63, 63, 62, 63, 35, 122,
54
+ 48, 120, 48, 59, 48,
55
+ 102, 48, 102, 48, 122,
56
+ 38, 60, 38, 60, 38, 60,
57
+ 38, 60, 38, 60, 38,
58
+ 60, 38, 60, 38, 60,
59
+ 38, 60, 0, 0, 0
60
+ ]
61
+
62
+ class << self
63
+ attr_accessor :_markup_key_spans
64
+ private :_markup_key_spans, :_markup_key_spans=
65
+ end
66
+ self._markup_key_spans = [
67
+ 0, 128, 128, 128, 128, 1, 6, 27,
68
+ 27, 54, 27, 54, 23, 23, 23, 47,
69
+ 1, 1, 1, 18, 1, 1, 1, 1,
70
+ 1, 1, 1, 1, 1, 1, 1, 1,
71
+ 1, 1, 1, 32, 128, 128, 128, 128,
72
+ 1, 2, 88, 73, 12, 55, 55, 75,
73
+ 23, 23, 23, 23, 23, 23, 23, 23,
74
+ 23, 0
75
+ ]
76
+
77
+ class << self
78
+ attr_accessor :_markup_index_offsets
79
+ private :_markup_index_offsets, :_markup_index_offsets=
80
+ end
81
+ self._markup_index_offsets = [
82
+ 0, 0, 129, 258, 387, 516, 518, 525,
83
+ 553, 581, 636, 664, 719, 743, 767, 791,
84
+ 839, 841, 843, 845, 864, 866, 868, 870,
85
+ 872, 874, 876, 878, 880, 882, 884, 886,
86
+ 888, 890, 892, 894, 927, 1056, 1185, 1314,
87
+ 1443, 1445, 1448, 1537, 1611, 1624, 1680, 1736,
88
+ 1812, 1836, 1860, 1884, 1908, 1932, 1956, 1980,
89
+ 2004, 2028
90
+ ]
91
+
92
+ class << self
93
+ attr_accessor :_markup_indicies
94
+ private :_markup_indicies, :_markup_indicies=
95
+ end
96
+ self._markup_indicies = [
97
+ 1, 1, 1, 1, 1, 1, 1, 1,
98
+ 1, 1, 1, 1, 1, 1, 1, 1,
99
+ 1, 1, 1, 1, 1, 1, 1, 1,
100
+ 1, 1, 1, 1, 1, 1, 1, 1,
101
+ 1, 2, 1, 1, 1, 1, 1, 1,
102
+ 1, 1, 1, 1, 1, 0, 0, 3,
103
+ 0, 0, 0, 0, 0, 0, 0, 0,
104
+ 0, 0, 0, 1, 1, 1, 1, 4,
105
+ 1, 0, 0, 0, 0, 0, 0, 0,
106
+ 0, 0, 0, 0, 0, 0, 0, 0,
107
+ 0, 0, 0, 0, 0, 0, 0, 0,
108
+ 0, 0, 0, 1, 1, 1, 1, 0,
109
+ 1, 0, 0, 0, 0, 0, 0, 0,
110
+ 0, 0, 0, 0, 0, 0, 0, 0,
111
+ 0, 0, 0, 0, 0, 0, 0, 0,
112
+ 0, 0, 0, 1, 1, 1, 1, 1,
113
+ 0, 1, 1, 1, 1, 1, 1, 1,
114
+ 1, 1, 6, 6, 6, 6, 6, 1,
115
+ 1, 1, 1, 1, 1, 1, 1, 1,
116
+ 1, 1, 1, 1, 1, 1, 1, 1,
117
+ 1, 6, 1, 1, 1, 1, 1, 1,
118
+ 1, 1, 1, 1, 1, 1, 5, 5,
119
+ 7, 5, 5, 5, 5, 5, 5, 5,
120
+ 5, 5, 5, 5, 1, 1, 1, 8,
121
+ 1, 1, 5, 5, 5, 5, 5, 5,
122
+ 5, 5, 5, 5, 5, 5, 5, 5,
123
+ 5, 5, 5, 5, 5, 5, 5, 5,
124
+ 5, 5, 5, 5, 1, 1, 1, 1,
125
+ 5, 1, 5, 5, 5, 5, 5, 5,
126
+ 5, 5, 5, 5, 5, 5, 5, 5,
127
+ 5, 5, 5, 5, 5, 5, 5, 5,
128
+ 5, 5, 5, 5, 1, 1, 1, 1,
129
+ 1, 5, 1, 1, 1, 1, 1, 1,
130
+ 1, 1, 1, 10, 10, 10, 10, 10,
131
+ 1, 1, 1, 1, 1, 1, 1, 1,
132
+ 1, 1, 1, 1, 1, 1, 1, 1,
133
+ 1, 1, 10, 1, 1, 1, 1, 1,
134
+ 1, 1, 1, 1, 1, 1, 1, 9,
135
+ 9, 11, 9, 9, 9, 9, 9, 9,
136
+ 9, 9, 9, 9, 9, 1, 1, 1,
137
+ 12, 1, 1, 9, 9, 9, 9, 9,
138
+ 9, 9, 9, 9, 9, 9, 9, 9,
139
+ 9, 9, 9, 9, 9, 9, 9, 9,
140
+ 9, 9, 9, 9, 9, 1, 1, 1,
141
+ 1, 9, 1, 9, 9, 9, 9, 9,
142
+ 9, 9, 9, 9, 9, 9, 9, 9,
143
+ 9, 9, 9, 9, 9, 9, 9, 9,
144
+ 9, 9, 9, 9, 9, 1, 1, 1,
145
+ 1, 1, 9, 1, 1, 1, 1, 1,
146
+ 1, 1, 1, 1, 14, 14, 14, 14,
147
+ 14, 1, 1, 1, 1, 1, 1, 1,
148
+ 1, 1, 1, 1, 1, 1, 1, 1,
149
+ 1, 1, 1, 14, 1, 1, 1, 1,
150
+ 1, 1, 1, 1, 1, 1, 1, 1,
151
+ 13, 13, 15, 13, 13, 13, 13, 13,
152
+ 13, 13, 13, 13, 13, 13, 1, 1,
153
+ 16, 17, 1, 1, 13, 13, 13, 13,
154
+ 13, 13, 13, 13, 13, 13, 13, 13,
155
+ 13, 13, 13, 13, 13, 13, 13, 13,
156
+ 13, 13, 13, 13, 13, 13, 1, 1,
157
+ 1, 1, 13, 1, 13, 13, 13, 13,
158
+ 13, 13, 13, 13, 13, 13, 13, 13,
159
+ 13, 13, 13, 13, 13, 13, 13, 13,
160
+ 13, 13, 13, 13, 13, 13, 1, 1,
161
+ 1, 1, 1, 13, 12, 1, 18, 1,
162
+ 1, 1, 1, 19, 1, 21, 20, 20,
163
+ 20, 22, 20, 20, 20, 20, 20, 20,
164
+ 20, 20, 20, 20, 20, 20, 20, 20,
165
+ 20, 20, 20, 20, 20, 20, 20, 1,
166
+ 20, 24, 23, 23, 23, 25, 23, 23,
167
+ 23, 23, 23, 23, 23, 23, 23, 23,
168
+ 23, 23, 23, 23, 23, 23, 23, 23,
169
+ 23, 23, 23, 1, 23, 26, 26, 26,
170
+ 26, 26, 1, 1, 1, 1, 1, 1,
171
+ 1, 1, 1, 1, 1, 1, 1, 1,
172
+ 1, 1, 1, 1, 26, 1, 1, 1,
173
+ 1, 1, 1, 1, 1, 1, 1, 1,
174
+ 1, 1, 1, 27, 1, 1, 1, 1,
175
+ 1, 1, 1, 1, 1, 1, 1, 1,
176
+ 1, 1, 28, 1, 30, 29, 29, 29,
177
+ 31, 29, 29, 29, 29, 29, 29, 29,
178
+ 29, 29, 29, 29, 29, 29, 29, 29,
179
+ 29, 29, 29, 29, 29, 29, 1, 29,
180
+ 32, 32, 32, 32, 32, 1, 1, 1,
181
+ 1, 1, 1, 1, 1, 1, 1, 1,
182
+ 1, 1, 1, 1, 1, 1, 1, 32,
183
+ 1, 1, 1, 1, 1, 1, 1, 1,
184
+ 1, 1, 1, 1, 1, 1, 33, 1,
185
+ 1, 1, 1, 1, 1, 1, 1, 1,
186
+ 1, 1, 1, 1, 1, 34, 1, 36,
187
+ 21, 35, 35, 35, 35, 35, 35, 35,
188
+ 35, 35, 35, 35, 35, 35, 35, 35,
189
+ 35, 35, 35, 35, 35, 1, 35, 38,
190
+ 24, 37, 37, 37, 37, 37, 37, 37,
191
+ 37, 37, 37, 37, 37, 37, 37, 37,
192
+ 37, 37, 37, 37, 37, 1, 37, 40,
193
+ 30, 39, 39, 39, 39, 39, 39, 39,
194
+ 39, 39, 39, 39, 39, 39, 39, 39,
195
+ 39, 39, 39, 39, 39, 1, 39, 41,
196
+ 42, 42, 42, 42, 42, 42, 42, 42,
197
+ 42, 42, 42, 42, 42, 42, 42, 42,
198
+ 42, 42, 42, 42, 42, 42, 43, 42,
199
+ 42, 42, 42, 42, 42, 42, 42, 42,
200
+ 42, 42, 42, 42, 42, 42, 42, 42,
201
+ 42, 42, 42, 42, 42, 44, 42, 45,
202
+ 42, 46, 45, 47, 45, 47, 45, 45,
203
+ 45, 45, 45, 45, 45, 45, 45, 45,
204
+ 45, 45, 45, 45, 45, 45, 48, 45,
205
+ 49, 42, 50, 42, 51, 42, 52, 42,
206
+ 53, 42, 54, 42, 55, 54, 56, 42,
207
+ 57, 42, 58, 42, 59, 42, 60, 42,
208
+ 61, 42, 62, 61, 63, 61, 64, 61,
209
+ 61, 61, 61, 61, 61, 61, 61, 61,
210
+ 61, 61, 61, 61, 61, 61, 61, 61,
211
+ 61, 61, 61, 61, 61, 61, 61, 61,
212
+ 61, 61, 61, 61, 61, 63, 61, 1,
213
+ 1, 1, 1, 1, 1, 1, 1, 1,
214
+ 1, 1, 1, 1, 1, 1, 1, 1,
215
+ 1, 1, 1, 1, 1, 1, 1, 1,
216
+ 1, 1, 1, 1, 1, 1, 1, 1,
217
+ 1, 1, 1, 1, 1, 1, 1, 1,
218
+ 1, 1, 1, 1, 65, 65, 1, 65,
219
+ 65, 65, 65, 65, 65, 65, 65, 65,
220
+ 65, 65, 1, 1, 1, 1, 1, 1,
221
+ 65, 65, 65, 65, 65, 65, 65, 65,
222
+ 65, 65, 65, 65, 65, 65, 65, 65,
223
+ 65, 65, 65, 65, 65, 65, 65, 65,
224
+ 65, 65, 1, 1, 1, 1, 65, 1,
225
+ 65, 65, 65, 65, 65, 65, 65, 65,
226
+ 65, 65, 65, 65, 65, 65, 65, 65,
227
+ 65, 65, 65, 65, 65, 65, 65, 65,
228
+ 65, 65, 1, 1, 1, 1, 1, 65,
229
+ 1, 1, 1, 1, 1, 1, 1, 1,
230
+ 1, 1, 1, 1, 1, 1, 1, 1,
231
+ 1, 1, 1, 1, 1, 1, 1, 1,
232
+ 1, 1, 1, 1, 1, 1, 1, 1,
233
+ 1, 1, 1, 1, 1, 1, 1, 1,
234
+ 1, 1, 1, 1, 1, 66, 66, 1,
235
+ 66, 66, 66, 66, 66, 66, 66, 66,
236
+ 66, 66, 66, 1, 1, 1, 67, 1,
237
+ 1, 66, 66, 66, 66, 66, 66, 66,
238
+ 66, 66, 66, 66, 66, 66, 66, 66,
239
+ 66, 66, 66, 66, 66, 66, 66, 66,
240
+ 66, 66, 66, 1, 1, 1, 1, 66,
241
+ 1, 66, 66, 66, 66, 66, 66, 66,
242
+ 66, 66, 66, 66, 66, 66, 66, 66,
243
+ 66, 66, 66, 66, 66, 66, 66, 66,
244
+ 66, 66, 66, 1, 1, 1, 1, 1,
245
+ 66, 69, 69, 69, 69, 69, 69, 69,
246
+ 69, 69, 69, 69, 69, 69, 69, 69,
247
+ 69, 69, 69, 69, 69, 69, 69, 69,
248
+ 69, 69, 69, 69, 69, 69, 69, 69,
249
+ 69, 69, 69, 69, 69, 69, 69, 69,
250
+ 69, 69, 69, 69, 69, 69, 68, 68,
251
+ 69, 68, 68, 68, 68, 68, 68, 68,
252
+ 68, 68, 68, 68, 69, 69, 69, 69,
253
+ 69, 69, 68, 68, 68, 68, 68, 68,
254
+ 68, 68, 68, 68, 68, 68, 68, 68,
255
+ 68, 68, 68, 68, 68, 68, 68, 68,
256
+ 68, 68, 68, 68, 69, 69, 69, 69,
257
+ 68, 69, 68, 68, 68, 68, 68, 68,
258
+ 68, 68, 68, 68, 68, 68, 68, 68,
259
+ 68, 68, 68, 68, 68, 68, 68, 68,
260
+ 68, 68, 68, 68, 69, 69, 69, 69,
261
+ 69, 68, 69, 69, 69, 69, 69, 69,
262
+ 69, 69, 69, 71, 71, 71, 71, 71,
263
+ 69, 69, 69, 69, 69, 69, 69, 69,
264
+ 69, 69, 69, 69, 69, 69, 69, 69,
265
+ 69, 69, 71, 69, 69, 69, 69, 69,
266
+ 69, 69, 69, 69, 69, 69, 69, 70,
267
+ 70, 69, 70, 70, 70, 70, 70, 70,
268
+ 70, 70, 70, 70, 70, 69, 69, 69,
269
+ 69, 69, 69, 70, 70, 70, 70, 70,
270
+ 70, 70, 70, 70, 70, 70, 70, 70,
271
+ 70, 70, 70, 70, 70, 70, 70, 70,
272
+ 70, 70, 70, 70, 70, 69, 69, 69,
273
+ 69, 70, 69, 70, 70, 70, 70, 70,
274
+ 70, 70, 70, 70, 70, 70, 70, 70,
275
+ 70, 70, 70, 70, 70, 70, 70, 70,
276
+ 70, 70, 70, 70, 70, 69, 69, 69,
277
+ 69, 69, 70, 73, 72, 74, 73, 72,
278
+ 76, 75, 75, 75, 75, 75, 75, 75,
279
+ 75, 75, 75, 75, 75, 77, 77, 77,
280
+ 77, 77, 77, 77, 77, 77, 77, 75,
281
+ 75, 75, 75, 75, 75, 75, 77, 77,
282
+ 77, 77, 77, 77, 77, 77, 77, 77,
283
+ 77, 77, 77, 77, 77, 77, 77, 77,
284
+ 77, 77, 77, 77, 77, 77, 77, 77,
285
+ 75, 75, 75, 75, 75, 75, 77, 77,
286
+ 77, 77, 77, 77, 77, 77, 77, 77,
287
+ 77, 77, 77, 77, 77, 77, 77, 77,
288
+ 77, 77, 77, 77, 77, 77, 77, 77,
289
+ 75, 78, 78, 78, 78, 78, 78, 78,
290
+ 78, 78, 78, 75, 75, 75, 75, 75,
291
+ 75, 75, 75, 75, 75, 75, 75, 75,
292
+ 75, 75, 75, 75, 75, 75, 75, 75,
293
+ 75, 75, 75, 75, 75, 75, 75, 75,
294
+ 75, 75, 75, 75, 75, 75, 75, 75,
295
+ 75, 75, 75, 75, 75, 75, 75, 75,
296
+ 75, 75, 75, 75, 75, 75, 75, 75,
297
+ 75, 75, 75, 75, 75, 75, 75, 75,
298
+ 75, 79, 75, 80, 80, 80, 80, 80,
299
+ 80, 80, 80, 80, 80, 75, 81, 75,
300
+ 82, 82, 82, 82, 82, 82, 82, 82,
301
+ 82, 82, 75, 75, 75, 75, 75, 75,
302
+ 75, 82, 82, 82, 82, 82, 82, 75,
303
+ 75, 75, 75, 75, 75, 75, 75, 75,
304
+ 75, 75, 75, 75, 75, 75, 75, 75,
305
+ 75, 75, 75, 75, 75, 75, 75, 75,
306
+ 75, 82, 82, 82, 82, 82, 82, 75,
307
+ 83, 83, 83, 83, 83, 83, 83, 83,
308
+ 83, 83, 75, 84, 75, 75, 75, 75,
309
+ 75, 83, 83, 83, 83, 83, 83, 75,
310
+ 75, 75, 75, 75, 75, 75, 75, 75,
311
+ 75, 75, 75, 75, 75, 75, 75, 75,
312
+ 75, 75, 75, 75, 75, 75, 75, 75,
313
+ 75, 83, 83, 83, 83, 83, 83, 75,
314
+ 85, 85, 85, 85, 85, 85, 85, 85,
315
+ 85, 85, 75, 86, 75, 75, 75, 75,
316
+ 75, 85, 85, 85, 85, 85, 85, 85,
317
+ 85, 85, 85, 85, 85, 85, 85, 85,
318
+ 85, 85, 85, 85, 85, 85, 85, 85,
319
+ 85, 85, 85, 75, 75, 75, 75, 75,
320
+ 75, 85, 85, 85, 85, 85, 85, 85,
321
+ 85, 85, 85, 85, 85, 85, 85, 85,
322
+ 85, 85, 85, 85, 85, 85, 85, 85,
323
+ 85, 85, 85, 75, 88, 87, 87, 87,
324
+ 87, 87, 87, 87, 87, 87, 87, 87,
325
+ 87, 87, 87, 87, 87, 87, 87, 87,
326
+ 87, 87, 89, 87, 91, 90, 90, 90,
327
+ 90, 90, 90, 90, 90, 90, 90, 90,
328
+ 90, 90, 90, 90, 90, 90, 90, 90,
329
+ 90, 90, 92, 90, 94, 93, 93, 93,
330
+ 93, 93, 93, 93, 93, 93, 93, 93,
331
+ 93, 93, 93, 93, 93, 93, 93, 93,
332
+ 93, 93, 95, 93, 97, 96, 96, 96,
333
+ 96, 96, 96, 96, 96, 96, 96, 96,
334
+ 96, 96, 96, 96, 96, 96, 96, 96,
335
+ 96, 96, 98, 96, 100, 99, 99, 99,
336
+ 99, 99, 99, 99, 99, 99, 99, 99,
337
+ 99, 99, 99, 99, 99, 99, 99, 99,
338
+ 99, 99, 101, 99, 103, 102, 102, 102,
339
+ 102, 102, 102, 102, 102, 102, 102, 102,
340
+ 102, 102, 102, 102, 102, 102, 102, 102,
341
+ 102, 102, 104, 102, 106, 105, 105, 105,
342
+ 105, 105, 105, 105, 105, 105, 105, 105,
343
+ 105, 105, 105, 105, 105, 105, 105, 105,
344
+ 105, 105, 107, 105, 109, 108, 108, 108,
345
+ 108, 108, 108, 108, 108, 108, 108, 108,
346
+ 108, 108, 108, 108, 108, 108, 108, 108,
347
+ 108, 108, 110, 108, 112, 111, 111, 111,
348
+ 111, 111, 111, 111, 111, 111, 111, 111,
349
+ 111, 111, 111, 111, 111, 111, 111, 111,
350
+ 111, 111, 113, 111, 42, 0
351
+ ]
352
+
353
+ class << self
354
+ attr_accessor :_markup_trans_targs
355
+ private :_markup_trans_targs, :_markup_trans_targs=
356
+ end
357
+ self._markup_trans_targs = [
358
+ 2, 0, 15, 36, 38, 2, 3, 5,
359
+ 51, 4, 3, 5, 51, 4, 3, 5,
360
+ 6, 51, 7, 12, 8, 11, 10, 8,
361
+ 9, 10, 3, 5, 51, 8, 9, 10,
362
+ 3, 5, 51, 13, 14, 13, 14, 13,
363
+ 14, 16, 0, 20, 27, 17, 18, 19,
364
+ 52, 21, 22, 23, 24, 25, 26, 53,
365
+ 28, 29, 30, 31, 32, 33, 34, 35,
366
+ 54, 37, 37, 55, 39, 0, 39, 40,
367
+ 40, 41, 56, 0, 43, 47, 44, 45,
368
+ 44, 57, 46, 46, 57, 47, 57, 49,
369
+ 50, 1, 49, 50, 1, 49, 50, 1,
370
+ 49, 50, 1, 49, 50, 1, 49, 50,
371
+ 1, 49, 50, 1, 49, 50, 1, 49,
372
+ 50, 1
373
+ ]
374
+
375
+ class << self
376
+ attr_accessor :_markup_trans_actions
377
+ private :_markup_trans_actions, :_markup_trans_actions=
378
+ end
379
+ self._markup_trans_actions = [
380
+ 2, 1, 0, 0, 0, 0, 3, 4,
381
+ 3, 5, 0, 6, 0, 0, 7, 8,
382
+ 9, 7, 0, 0, 10, 0, 11, 0,
383
+ 12, 13, 14, 15, 14, 16, 17, 18,
384
+ 19, 20, 19, 10, 11, 0, 13, 16,
385
+ 18, 0, 0, 0, 0, 0, 0, 0,
386
+ 0, 0, 0, 0, 0, 0, 0, 0,
387
+ 0, 0, 0, 0, 0, 0, 0, 0,
388
+ 0, 2, 0, 9, 2, 24, 0, 25,
389
+ 0, 26, 0, 27, 0, 28, 28, 0,
390
+ 0, 29, 28, 0, 30, 0, 31, 32,
391
+ 33, 34, 0, 13, 36, 16, 18, 38,
392
+ 40, 41, 42, 44, 45, 46, 48, 49,
393
+ 50, 52, 53, 54, 56, 57, 58, 60,
394
+ 61, 62
395
+ ]
396
+
397
+ class << self
398
+ attr_accessor :_markup_eof_actions
399
+ private :_markup_eof_actions, :_markup_eof_actions=
400
+ end
401
+ self._markup_eof_actions = [
402
+ 0, 1, 1, 1, 1, 1, 1, 1,
403
+ 1, 1, 1, 1, 1, 1, 1, 0,
404
+ 0, 21, 21, 21, 0, 0, 0, 0,
405
+ 0, 0, 22, 0, 0, 0, 0, 0,
406
+ 0, 23, 23, 23, 1, 1, 24, 24,
407
+ 24, 24, 27, 27, 27, 27, 27, 27,
408
+ 0, 35, 37, 39, 43, 47, 51, 55,
409
+ 59, 0
410
+ ]
411
+
412
+ class << self
413
+ attr_accessor :markup_start
414
+ end
415
+ self.markup_start = 48;
416
+ class << self
417
+ attr_accessor :markup_first_final
418
+ end
419
+ self.markup_first_final = 48;
420
+ class << self
421
+ attr_accessor :markup_error
422
+ end
423
+ self.markup_error = 0;
424
424
 
425
- class << self
426
- attr_accessor :markup_en_parse_entity
427
- end
428
- self.markup_en_parse_entity = 42;
429
- class << self
430
- attr_accessor :markup_en_main
431
- end
432
- self.markup_en_main = 48;
425
+ class << self
426
+ attr_accessor :markup_en_parse_entity
427
+ end
428
+ self.markup_en_parse_entity = 42;
429
+ class << self
430
+ attr_accessor :markup_en_main
431
+ end
432
+ self.markup_en_main = 48;
433
433
 
434
434
 
435
- # line 214 "markup.rl"
436
- def self.parse_markup(buffer, delegate, entities)
435
+ # line 214 "markup.rl"
436
+
437
+ def self.parse_markup(buffer, delegate, entities)
437
438
  data = buffer.read
438
439
  encoding = buffer.encoding
439
440
  bytes = data.bytes
440
- p = 0
441
+
442
+ p = 0
441
443
  # Must set pe here or it gets incorrectly set to data.length
442
444
  pe = eof = data.bytesize
443
445
  stack = []
444
- pcdata = nil
446
+
447
+ pcdata = nil
445
448
  characters_begin = characters_end = nil
446
449
  entity_begin = entity_end = nil
447
450
  identifier_begin = identifier_end = nil
@@ -450,1180 +453,1223 @@ module Trenni
450
453
  instruction_begin = instruction_end = nil
451
454
  cdata_begin = cdata_end = nil
452
455
  has_entities = has_value = false
453
- # line 458 "markup.rb"
454
- begin
455
- p ||= 0
456
- pe ||= data.length
457
- cs = markup_start
458
- top = 0
459
- end
460
-
461
- # line 235 "markup.rl"
462
- # line 468 "markup.rb"
463
- begin
464
- testEof = false
465
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
466
- _goto_level = 0
467
- _resume = 10
468
- _eof_trans = 15
469
- _again = 20
470
- _test_eof = 30
471
- _out = 40
472
- while true
473
- if _goto_level <= 0
474
- if p == pe
475
- _goto_level = _test_eof
476
- next
477
- end
478
- if cs == 0
479
- _goto_level = _out
480
- next
481
- end
482
- end
483
- if _goto_level <= _resume
484
- _keys = cs << 1
485
- _inds = _markup_index_offsets[cs]
486
- _slen = _markup_key_spans[cs]
487
- _wide = ( bytes[p])
488
- _trans = if ( _slen > 0 &&
489
- _markup_trans_keys[_keys] <= _wide &&
490
- _wide <= _markup_trans_keys[_keys + 1]
491
- ) then
492
- _markup_indicies[ _inds + _wide - _markup_trans_keys[_keys] ]
493
- else
494
- _markup_indicies[ _inds + _slen ]
495
- end
496
- cs = _markup_trans_targs[_trans]
497
- if _markup_trans_actions[_trans] != 0
498
- case _markup_trans_actions[_trans]
499
- when 2 then
500
- # line 24 "markup.rl"
501
- begin
502
-
503
- identifier_begin = p
504
- end
505
- when 9 then
506
- # line 28 "markup.rl"
507
- begin
508
-
509
- identifier_end = p
510
- end
511
- when 17 then
512
- # line 37 "markup.rl"
513
- begin
514
-
515
- end
516
- when 16 then
517
- # line 49 "markup.rl"
518
- begin
519
-
520
- characters_begin = p
521
- end
522
- when 27 then
523
- # line 59 "markup.rl"
524
- begin
525
-
526
- raise ParseError.new("could not parse entity", buffer, p)
527
- end
528
- when 28 then
529
- # line 63 "markup.rl"
530
- begin
531
-
532
- entity_begin = p
533
- end
534
- when 26 then
535
- # line 125 "markup.rl"
536
- begin
537
-
538
- end
539
- when 24 then
540
- # line 132 "markup.rl"
541
- begin
542
-
543
- raise ParseError.new("could not parse instruction", buffer, p)
544
- end
545
- when 6 then
546
- # line 145 "markup.rl"
547
- begin
548
-
549
- self_closing = true
550
- end
551
- when 1 then
552
- # line 185 "markup.rl"
553
- begin
554
-
555
- raise ParseError.new("could not parse tag", buffer, p)
556
- end
557
- when 18 then
558
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
559
- begin
560
- begin
561
- stack[top] = cs
562
- top+= 1
563
- cs = 42
564
- _goto_level = _again
565
- next
566
- end
567
- end
568
- when 25 then
569
- # line 28 "markup.rl"
570
- begin
571
-
572
- identifier_end = p
573
- end
574
- # line 122 "markup.rl"
575
- begin
576
-
577
- end
578
- when 3 then
579
- # line 28 "markup.rl"
580
- begin
581
-
582
- identifier_end = p
583
- end
584
- # line 136 "markup.rl"
585
- begin
586
-
587
- self_closing = false
588
- delegate.open_tag_begin(data.byteslice(identifier_begin...identifier_end), identifier_begin)
589
- end
590
- when 7 then
591
- # line 28 "markup.rl"
592
- begin
593
-
594
- identifier_end = p
595
- end
596
- # line 162 "markup.rl"
597
- begin
598
-
599
- if has_value
600
- pcdata = MarkupString.raw(pcdata) unless has_entities
601
- value = pcdata
602
- else
603
- value = true
604
- end
605
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
606
- end
607
- when 10 then
608
- # line 32 "markup.rl"
609
- begin
610
-
611
- pcdata = String.new.force_encoding(encoding)
612
- has_entities = false
613
- end
614
- # line 49 "markup.rl"
615
- begin
616
-
617
- characters_begin = p
618
- end
619
- when 11 then
620
- # line 32 "markup.rl"
621
- begin
622
-
623
- pcdata = String.new.force_encoding(encoding)
624
- has_entities = false
625
- end
626
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
627
- begin
628
- begin
629
- stack[top] = cs
630
- top+= 1
631
- cs = 42
632
- _goto_level = _again
633
- next
634
- end
635
- end
636
- when 12 then
637
- # line 53 "markup.rl"
638
- begin
639
-
640
- characters_end = p
641
- pcdata << data.byteslice(characters_begin...characters_end)
642
- end
643
- # line 37 "markup.rl"
644
- begin
645
-
646
- end
647
- when 13 then
648
- # line 53 "markup.rl"
649
- begin
650
-
651
- characters_end = p
652
- pcdata << data.byteslice(characters_begin...characters_end)
653
- end
654
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
655
- begin
656
- begin
657
- stack[top] = cs
658
- top+= 1
659
- cs = 42
660
- _goto_level = _again
661
- next
662
- end
663
- end
664
- when 31 then
665
- # line 67 "markup.rl"
666
- begin
667
-
668
- entity_end = p
669
- name = data.byteslice(entity_begin...entity_end)
670
- has_entities = true
671
- pcdata << entities[name]
672
- end
673
- # line 8 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
674
- begin
675
- begin
676
- top -= 1
677
- cs = stack[top]
678
- _goto_level = _again
679
- next
680
- end
681
- end
682
- when 30 then
683
- # line 76 "markup.rl"
684
- begin
685
-
686
- entity_end = p
687
- has_entities = true
688
- pcdata << data.byteslice(entity_begin...entity_end).to_i(16)
689
- end
690
- # line 8 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
691
- begin
692
- begin
693
- top -= 1
694
- cs = stack[top]
695
- _goto_level = _again
696
- next
697
- end
698
- end
699
- when 29 then
700
- # line 83 "markup.rl"
701
- begin
702
-
703
- entity_end = p
704
- has_entities = true
705
- pcdata << data.byteslice(entity_begin...entity_end).to_i(10)
706
- end
707
- # line 8 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
708
- begin
709
- begin
710
- top -= 1
711
- cs = stack[top]
712
- _goto_level = _again
713
- next
714
- end
715
- end
716
- when 5 then
717
- # line 149 "markup.rl"
718
- begin
719
-
720
- has_value = false
721
- pcdata = String.new.force_encoding(encoding)
722
- end
723
- # line 24 "markup.rl"
724
- begin
725
-
726
- identifier_begin = p
727
- end
728
- when 14 then
729
- # line 154 "markup.rl"
730
- begin
731
-
732
- has_value = true
733
- end
734
- # line 162 "markup.rl"
735
- begin
736
-
737
- if has_value
738
- pcdata = MarkupString.raw(pcdata) unless has_entities
739
- value = pcdata
740
- else
741
- value = true
742
- end
743
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
744
- end
745
- when 19 then
746
- # line 158 "markup.rl"
747
- begin
748
-
749
- has_value = true
750
- end
751
- # line 162 "markup.rl"
752
- begin
753
-
754
- if has_value
755
- pcdata = MarkupString.raw(pcdata) unless has_entities
756
- value = pcdata
757
- else
758
- value = true
759
- end
760
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
761
- end
762
- when 4 then
763
- # line 28 "markup.rl"
764
- begin
765
-
766
- identifier_end = p
767
- end
768
- # line 136 "markup.rl"
769
- begin
770
-
771
- self_closing = false
772
- delegate.open_tag_begin(data.byteslice(identifier_begin...identifier_end), identifier_begin)
773
- end
774
- # line 145 "markup.rl"
775
- begin
776
-
777
- self_closing = true
778
- end
779
- when 8 then
780
- # line 28 "markup.rl"
781
- begin
782
-
783
- identifier_end = p
784
- end
785
- # line 162 "markup.rl"
786
- begin
787
-
788
- if has_value
789
- pcdata = MarkupString.raw(pcdata) unless has_entities
790
- value = pcdata
791
- else
792
- value = true
793
- end
794
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
795
- end
796
- # line 145 "markup.rl"
797
- begin
798
-
799
- self_closing = true
800
- end
801
- when 32 then
802
- # line 40 "markup.rl"
803
- begin
804
-
805
- end
806
- # line 32 "markup.rl"
807
- begin
808
-
809
- pcdata = String.new.force_encoding(encoding)
810
- has_entities = false
811
- end
812
- # line 49 "markup.rl"
813
- begin
814
-
815
- characters_begin = p
816
- end
817
- when 33 then
818
- # line 40 "markup.rl"
819
- begin
820
-
821
- end
822
- # line 32 "markup.rl"
823
- begin
824
-
825
- pcdata = String.new.force_encoding(encoding)
826
- has_entities = false
827
- end
828
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
829
- begin
830
- begin
831
- stack[top] = cs
832
- top+= 1
833
- cs = 42
834
- _goto_level = _again
835
- next
836
- end
837
- end
838
- when 15 then
839
- # line 154 "markup.rl"
840
- begin
841
-
842
- has_value = true
843
- end
844
- # line 162 "markup.rl"
845
- begin
846
-
847
- if has_value
848
- pcdata = MarkupString.raw(pcdata) unless has_entities
849
- value = pcdata
850
- else
851
- value = true
852
- end
853
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
854
- end
855
- # line 145 "markup.rl"
856
- begin
857
-
858
- self_closing = true
859
- end
860
- when 20 then
861
- # line 158 "markup.rl"
862
- begin
863
-
864
- has_value = true
865
- end
866
- # line 162 "markup.rl"
867
- begin
868
-
869
- if has_value
870
- pcdata = MarkupString.raw(pcdata) unless has_entities
871
- value = pcdata
872
- else
873
- value = true
874
- end
875
- delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
876
- end
877
- # line 145 "markup.rl"
878
- begin
879
-
880
- self_closing = true
881
- end
882
- when 48 then
883
- # line 94 "markup.rl"
884
- begin
885
-
886
- doctype_end = p
887
- delegate.doctype(data.byteslice(doctype_begin...doctype_end))
888
- end
889
- # line 40 "markup.rl"
890
- begin
891
-
892
- end
893
- # line 32 "markup.rl"
894
- begin
895
-
896
- pcdata = String.new.force_encoding(encoding)
897
- has_entities = false
898
- end
899
- # line 49 "markup.rl"
900
- begin
901
-
902
- characters_begin = p
903
- end
904
- when 49 then
905
- # line 94 "markup.rl"
906
- begin
907
-
908
- doctype_end = p
909
- delegate.doctype(data.byteslice(doctype_begin...doctype_end))
910
- end
911
- # line 40 "markup.rl"
912
- begin
913
-
914
- end
915
- # line 32 "markup.rl"
916
- begin
917
-
918
- pcdata = String.new.force_encoding(encoding)
919
- has_entities = false
920
- end
921
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
922
- begin
923
- begin
924
- stack[top] = cs
925
- top+= 1
926
- cs = 42
927
- _goto_level = _again
928
- next
929
- end
930
- end
931
- when 44 then
932
- # line 108 "markup.rl"
933
- begin
934
-
935
- comment_end = p
936
- delegate.comment(data.byteslice(comment_begin...comment_end))
937
- end
938
- # line 40 "markup.rl"
939
- begin
940
-
941
- end
942
- # line 32 "markup.rl"
943
- begin
944
-
945
- pcdata = String.new.force_encoding(encoding)
946
- has_entities = false
947
- end
948
- # line 49 "markup.rl"
949
- begin
950
-
951
- characters_begin = p
952
- end
953
- when 45 then
954
- # line 108 "markup.rl"
955
- begin
956
-
957
- comment_end = p
958
- delegate.comment(data.byteslice(comment_begin...comment_end))
959
- end
960
- # line 40 "markup.rl"
961
- begin
962
-
963
- end
964
- # line 32 "markup.rl"
965
- begin
966
-
967
- pcdata = String.new.force_encoding(encoding)
968
- has_entities = false
969
- end
970
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
971
- begin
972
- begin
973
- stack[top] = cs
974
- top+= 1
975
- cs = 42
976
- _goto_level = _again
977
- next
978
- end
979
- end
980
- when 60 then
981
- # line 128 "markup.rl"
982
- begin
983
-
984
- delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
985
- end
986
- # line 40 "markup.rl"
987
- begin
988
-
989
- end
990
- # line 32 "markup.rl"
991
- begin
992
-
993
- pcdata = String.new.force_encoding(encoding)
994
- has_entities = false
995
- end
996
- # line 49 "markup.rl"
997
- begin
998
-
999
- characters_begin = p
1000
- end
1001
- when 61 then
1002
- # line 128 "markup.rl"
1003
- begin
1004
-
1005
- delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1006
- end
1007
- # line 40 "markup.rl"
1008
- begin
1009
-
1010
- end
1011
- # line 32 "markup.rl"
1012
- begin
1013
-
1014
- pcdata = String.new.force_encoding(encoding)
1015
- has_entities = false
1016
- end
1017
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
1018
- begin
1019
- begin
1020
- stack[top] = cs
1021
- top+= 1
1022
- cs = 42
1023
- _goto_level = _again
1024
- next
1025
- end
1026
- end
1027
- when 40 then
1028
- # line 174 "markup.rl"
1029
- begin
1030
-
1031
- delegate.open_tag_end(self_closing)
1032
- end
1033
- # line 40 "markup.rl"
1034
- begin
1035
-
1036
- end
1037
- # line 32 "markup.rl"
1038
- begin
1039
-
1040
- pcdata = String.new.force_encoding(encoding)
1041
- has_entities = false
1042
- end
1043
- # line 49 "markup.rl"
1044
- begin
1045
-
1046
- characters_begin = p
1047
- end
1048
- when 41 then
1049
- # line 174 "markup.rl"
1050
- begin
1051
-
1052
- delegate.open_tag_end(self_closing)
1053
- end
1054
- # line 40 "markup.rl"
1055
- begin
1056
-
1057
- end
1058
- # line 32 "markup.rl"
1059
- begin
1060
-
1061
- pcdata = String.new.force_encoding(encoding)
1062
- has_entities = false
1063
- end
1064
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
1065
- begin
1066
- begin
1067
- stack[top] = cs
1068
- top+= 1
1069
- cs = 42
1070
- _goto_level = _again
1071
- next
1072
- end
1073
- end
1074
- when 56 then
1075
- # line 181 "markup.rl"
1076
- begin
1077
-
1078
- delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1079
- end
1080
- # line 40 "markup.rl"
1081
- begin
1082
-
1083
- end
1084
- # line 32 "markup.rl"
1085
- begin
1086
-
1087
- pcdata = String.new.force_encoding(encoding)
1088
- has_entities = false
1089
- end
1090
- # line 49 "markup.rl"
1091
- begin
1092
-
1093
- characters_begin = p
1094
- end
1095
- when 57 then
1096
- # line 181 "markup.rl"
1097
- begin
1098
-
1099
- delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1100
- end
1101
- # line 40 "markup.rl"
1102
- begin
1103
-
1104
- end
1105
- # line 32 "markup.rl"
1106
- begin
1107
-
1108
- pcdata = String.new.force_encoding(encoding)
1109
- has_entities = false
1110
- end
1111
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
1112
- begin
1113
- begin
1114
- stack[top] = cs
1115
- top+= 1
1116
- cs = 42
1117
- _goto_level = _again
1118
- next
1119
- end
1120
- end
1121
- when 52 then
1122
- # line 193 "markup.rl"
1123
- begin
1124
-
1125
- cdata_end = p
1126
- delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1127
- end
1128
- # line 40 "markup.rl"
1129
- begin
1130
-
1131
- end
1132
- # line 32 "markup.rl"
1133
- begin
1134
-
1135
- pcdata = String.new.force_encoding(encoding)
1136
- has_entities = false
1137
- end
1138
- # line 49 "markup.rl"
1139
- begin
1140
-
1141
- characters_begin = p
1142
- end
1143
- when 53 then
1144
- # line 193 "markup.rl"
1145
- begin
1146
-
1147
- cdata_end = p
1148
- delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1149
- end
1150
- # line 40 "markup.rl"
1151
- begin
1152
-
1153
- end
1154
- # line 32 "markup.rl"
1155
- begin
1156
-
1157
- pcdata = String.new.force_encoding(encoding)
1158
- has_entities = false
1159
- end
1160
- # line 10 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
1161
- begin
1162
- begin
1163
- stack[top] = cs
1164
- top+= 1
1165
- cs = 42
1166
- _goto_level = _again
1167
- next
1168
- end
1169
- end
1170
- when 34 then
1171
- # line 142 "markup.rl"
1172
- begin
1173
-
1174
- end
1175
- # line 178 "markup.rl"
1176
- begin
1177
-
1178
- end
1179
- # line 118 "markup.rl"
1180
- begin
1181
-
1182
- instruction_begin = p
1183
- end
1184
- # line 104 "markup.rl"
1185
- begin
1186
-
1187
- comment_begin = p
1188
- end
1189
- # line 90 "markup.rl"
1190
- begin
1191
-
1192
- doctype_begin = p
1193
- end
1194
- # line 189 "markup.rl"
1195
- begin
1196
-
1197
- cdata_begin = p
1198
- end
1199
- when 50 then
1200
- # line 94 "markup.rl"
1201
- begin
1202
-
1203
- doctype_end = p
1204
- delegate.doctype(data.byteslice(doctype_begin...doctype_end))
1205
- end
1206
- # line 142 "markup.rl"
1207
- begin
1208
-
1209
- end
1210
- # line 178 "markup.rl"
1211
- begin
1212
-
1213
- end
1214
- # line 118 "markup.rl"
1215
- begin
1216
-
1217
- instruction_begin = p
1218
- end
1219
- # line 104 "markup.rl"
1220
- begin
1221
-
1222
- comment_begin = p
1223
- end
1224
- # line 90 "markup.rl"
1225
- begin
1226
-
1227
- doctype_begin = p
1228
- end
1229
- # line 189 "markup.rl"
1230
- begin
1231
-
1232
- cdata_begin = p
1233
- end
1234
- when 46 then
1235
- # line 108 "markup.rl"
1236
- begin
1237
-
1238
- comment_end = p
1239
- delegate.comment(data.byteslice(comment_begin...comment_end))
1240
- end
1241
- # line 142 "markup.rl"
1242
- begin
1243
-
1244
- end
1245
- # line 178 "markup.rl"
1246
- begin
1247
-
1248
- end
1249
- # line 118 "markup.rl"
1250
- begin
1251
-
1252
- instruction_begin = p
1253
- end
1254
- # line 104 "markup.rl"
1255
- begin
1256
-
1257
- comment_begin = p
1258
- end
1259
- # line 90 "markup.rl"
1260
- begin
1261
-
1262
- doctype_begin = p
1263
- end
1264
- # line 189 "markup.rl"
1265
- begin
1266
-
1267
- cdata_begin = p
1268
- end
1269
- when 62 then
1270
- # line 128 "markup.rl"
1271
- begin
1272
-
1273
- delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1274
- end
1275
- # line 142 "markup.rl"
1276
- begin
1277
-
1278
- end
1279
- # line 178 "markup.rl"
1280
- begin
1281
-
1282
- end
1283
- # line 118 "markup.rl"
1284
- begin
1285
-
1286
- instruction_begin = p
1287
- end
1288
- # line 104 "markup.rl"
1289
- begin
1290
-
1291
- comment_begin = p
1292
- end
1293
- # line 90 "markup.rl"
1294
- begin
1295
-
1296
- doctype_begin = p
1297
- end
1298
- # line 189 "markup.rl"
1299
- begin
1300
-
1301
- cdata_begin = p
1302
- end
1303
- when 42 then
1304
- # line 174 "markup.rl"
1305
- begin
1306
-
1307
- delegate.open_tag_end(self_closing)
1308
- end
1309
- # line 142 "markup.rl"
1310
- begin
1311
-
1312
- end
1313
- # line 178 "markup.rl"
1314
- begin
1315
-
1316
- end
1317
- # line 118 "markup.rl"
1318
- begin
1319
-
1320
- instruction_begin = p
1321
- end
1322
- # line 104 "markup.rl"
1323
- begin
1324
-
1325
- comment_begin = p
1326
- end
1327
- # line 90 "markup.rl"
1328
- begin
1329
-
1330
- doctype_begin = p
1331
- end
1332
- # line 189 "markup.rl"
1333
- begin
1334
-
1335
- cdata_begin = p
1336
- end
1337
- when 58 then
1338
- # line 181 "markup.rl"
1339
- begin
1340
-
1341
- delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1342
- end
1343
- # line 142 "markup.rl"
1344
- begin
1345
-
1346
- end
1347
- # line 178 "markup.rl"
1348
- begin
1349
-
1350
- end
1351
- # line 118 "markup.rl"
1352
- begin
1353
-
1354
- instruction_begin = p
1355
- end
1356
- # line 104 "markup.rl"
1357
- begin
1358
-
1359
- comment_begin = p
1360
- end
1361
- # line 90 "markup.rl"
1362
- begin
1363
-
1364
- doctype_begin = p
1365
- end
1366
- # line 189 "markup.rl"
1367
- begin
1368
-
1369
- cdata_begin = p
1370
- end
1371
- when 54 then
1372
- # line 193 "markup.rl"
1373
- begin
1374
-
1375
- cdata_end = p
1376
- delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1377
- end
1378
- # line 142 "markup.rl"
1379
- begin
1380
-
1381
- end
1382
- # line 178 "markup.rl"
1383
- begin
1384
-
1385
- end
1386
- # line 118 "markup.rl"
1387
- begin
1388
-
1389
- instruction_begin = p
1390
- end
1391
- # line 104 "markup.rl"
1392
- begin
1393
-
1394
- comment_begin = p
1395
- end
1396
- # line 90 "markup.rl"
1397
- begin
1398
-
1399
- doctype_begin = p
1400
- end
1401
- # line 189 "markup.rl"
1402
- begin
1403
-
1404
- cdata_begin = p
1405
- end
1406
- when 38 then
1407
- # line 37 "markup.rl"
1408
- begin
1409
-
1410
- end
1411
- # line 43 "markup.rl"
1412
- begin
1413
-
1414
- pcdata = MarkupString.raw(pcdata) unless has_entities
1415
- delegate.text(pcdata)
1416
- end
1417
- # line 142 "markup.rl"
1418
- begin
1419
-
1420
- end
1421
- # line 178 "markup.rl"
1422
- begin
1423
-
1424
- end
1425
- # line 118 "markup.rl"
1426
- begin
1427
-
1428
- instruction_begin = p
1429
- end
1430
- # line 104 "markup.rl"
1431
- begin
1432
-
1433
- comment_begin = p
1434
- end
1435
- # line 90 "markup.rl"
1436
- begin
1437
-
1438
- doctype_begin = p
1439
- end
1440
- # line 189 "markup.rl"
1441
- begin
1442
-
1443
- cdata_begin = p
1444
- end
1445
- when 36 then
1446
- # line 53 "markup.rl"
1447
- begin
1448
-
1449
- characters_end = p
1450
- pcdata << data.byteslice(characters_begin...characters_end)
1451
- end
1452
- # line 37 "markup.rl"
1453
- begin
1454
-
1455
- end
1456
- # line 43 "markup.rl"
1457
- begin
1458
-
1459
- pcdata = MarkupString.raw(pcdata) unless has_entities
1460
- delegate.text(pcdata)
1461
- end
1462
- # line 142 "markup.rl"
1463
- begin
1464
-
1465
- end
1466
- # line 178 "markup.rl"
1467
- begin
1468
-
1469
- end
1470
- # line 118 "markup.rl"
1471
- begin
1472
-
1473
- instruction_begin = p
1474
- end
1475
- # line 104 "markup.rl"
1476
- begin
1477
-
1478
- comment_begin = p
1479
- end
1480
- # line 90 "markup.rl"
1481
- begin
1482
-
1483
- doctype_begin = p
1484
- end
1485
- # line 189 "markup.rl"
1486
- begin
1487
-
1488
- cdata_begin = p
1489
- end
1490
- # line 1528 "markup.rb"
1491
- end
1492
- end
1493
- end
1494
- if _goto_level <= _again
1495
- if cs == 0
1496
- _goto_level = _out
1497
- next
1498
- end
1499
- p += 1
1500
- if p != pe
1501
- _goto_level = _resume
1502
- next
1503
- end
1504
- end
1505
- if _goto_level <= _test_eof
1506
- if p == eof
1507
- case _markup_eof_actions[cs]
1508
- when 27 then
1509
- # line 59 "markup.rl"
1510
- begin
1511
-
1512
- raise ParseError.new("could not parse entity", buffer, p)
1513
- end
1514
- when 47 then
1515
- # line 94 "markup.rl"
1516
- begin
1517
-
1518
- doctype_end = p
1519
- delegate.doctype(data.byteslice(doctype_begin...doctype_end))
1520
- end
1521
- when 22 then
1522
- # line 100 "markup.rl"
1523
- begin
1524
-
1525
- raise ParseError.new("could not parse doctype", buffer, p)
1526
- end
1527
- when 43 then
1528
- # line 108 "markup.rl"
1529
- begin
1530
-
1531
- comment_end = p
1532
- delegate.comment(data.byteslice(comment_begin...comment_end))
1533
- end
1534
- when 21 then
1535
- # line 114 "markup.rl"
1536
- begin
1537
-
1538
- raise ParseError.new("could not parse comment", buffer, p)
1539
- end
1540
- when 59 then
1541
- # line 128 "markup.rl"
1542
- begin
1543
-
1544
- delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1545
- end
1546
- when 24 then
1547
- # line 132 "markup.rl"
1548
- begin
1549
-
1550
- raise ParseError.new("could not parse instruction", buffer, p)
1551
- end
1552
- when 39 then
1553
- # line 174 "markup.rl"
1554
- begin
1555
-
1556
- delegate.open_tag_end(self_closing)
1557
- end
1558
- when 55 then
1559
- # line 181 "markup.rl"
1560
- begin
1561
-
1562
- delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1563
- end
1564
- when 1 then
1565
- # line 185 "markup.rl"
1566
- begin
1567
-
1568
- raise ParseError.new("could not parse tag", buffer, p)
1569
- end
1570
- when 51 then
1571
- # line 193 "markup.rl"
1572
- begin
1573
-
1574
- cdata_end = p
1575
- delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1576
- end
1577
- when 23 then
1578
- # line 199 "markup.rl"
1579
- begin
1580
-
1581
- raise ParseError.new("could not parse cdata", buffer, p)
1582
- end
1583
- when 37 then
1584
- # line 37 "markup.rl"
1585
- begin
1586
-
1587
- end
1588
- # line 43 "markup.rl"
1589
- begin
1590
-
1591
- pcdata = MarkupString.raw(pcdata) unless has_entities
1592
- delegate.text(pcdata)
1593
- end
1594
- when 35 then
1595
- # line 53 "markup.rl"
1596
- begin
1597
-
1598
- characters_end = p
1599
- pcdata << data.byteslice(characters_begin...characters_end)
1600
- end
1601
- # line 37 "markup.rl"
1602
- begin
1603
-
1604
- end
1605
- # line 43 "markup.rl"
1606
- begin
1607
-
1608
- pcdata = MarkupString.raw(pcdata) unless has_entities
1609
- delegate.text(pcdata)
1610
- end
1611
- # line 1655 "markup.rb"
1612
- end
1613
- end
1614
-
1615
- end
1616
- if _goto_level <= _out
1617
- break
1618
- end
456
+
457
+
458
+ # line 459 "markup.rb"
459
+ begin
460
+ p ||= 0
461
+ pe ||= data.length
462
+ cs = markup_start
463
+ top = 0
464
+ end
465
+
466
+ # line 236 "markup.rl"
467
+
468
+ # line 469 "markup.rb"
469
+ begin
470
+ testEof = false
471
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
472
+ _goto_level = 0
473
+ _resume = 10
474
+ _eof_trans = 15
475
+ _again = 20
476
+ _test_eof = 30
477
+ _out = 40
478
+ while true
479
+ if _goto_level <= 0
480
+ if p == pe
481
+ _goto_level = _test_eof
482
+ next
483
+ end
484
+ if cs == 0
485
+ _goto_level = _out
486
+ next
487
+ end
488
+ end
489
+ if _goto_level <= _resume
490
+ _keys = cs << 1
491
+ _inds = _markup_index_offsets[cs]
492
+ _slen = _markup_key_spans[cs]
493
+ _wide = ( bytes[p])
494
+ _trans = if ( _slen > 0 &&
495
+ _markup_trans_keys[_keys] <= _wide &&
496
+ _wide <= _markup_trans_keys[_keys + 1]
497
+ ) then
498
+ _markup_indicies[ _inds + _wide - _markup_trans_keys[_keys] ]
499
+ else
500
+ _markup_indicies[ _inds + _slen ]
501
+ end
502
+ cs = _markup_trans_targs[_trans]
503
+ if _markup_trans_actions[_trans] != 0
504
+ case _markup_trans_actions[_trans]
505
+ when 2 then
506
+ # line 24 "markup.rl"
507
+ begin
508
+
509
+ identifier_begin = p
510
+ end
511
+ when 9 then
512
+ # line 28 "markup.rl"
513
+ begin
514
+
515
+ identifier_end = p
516
+ end
517
+ when 17 then
518
+ # line 37 "markup.rl"
519
+ begin
520
+
521
+ end
522
+ when 16 then
523
+ # line 49 "markup.rl"
524
+ begin
525
+
526
+ characters_begin = p
527
+ end
528
+ when 27 then
529
+ # line 59 "markup.rl"
530
+ begin
531
+
532
+ raise ParseError.new("could not parse entity", buffer, p)
533
+ end
534
+ when 28 then
535
+ # line 63 "markup.rl"
536
+ begin
537
+
538
+ entity_begin = p
539
+ end
540
+ when 26 then
541
+ # line 125 "markup.rl"
542
+ begin
543
+
544
+ end
545
+ when 24 then
546
+ # line 132 "markup.rl"
547
+ begin
548
+
549
+ raise ParseError.new("could not parse instruction", buffer, p)
550
+ end
551
+ when 6 then
552
+ # line 145 "markup.rl"
553
+ begin
554
+
555
+ self_closing = true
556
+ end
557
+ when 1 then
558
+ # line 185 "markup.rl"
559
+ begin
560
+
561
+ raise ParseError.new("could not parse tag", buffer, p)
562
+ end
563
+ when 18 then
564
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
565
+ begin
566
+ begin
567
+ stack[top] = cs
568
+ top+= 1
569
+ cs = 42
570
+ _goto_level = _again
571
+ next
572
+ end
573
+ end
574
+ when 25 then
575
+ # line 28 "markup.rl"
576
+ begin
577
+
578
+ identifier_end = p
579
+ end
580
+ # line 122 "markup.rl"
581
+ begin
582
+
583
+ end
584
+ when 3 then
585
+ # line 28 "markup.rl"
586
+ begin
587
+
588
+ identifier_end = p
589
+ end
590
+ # line 136 "markup.rl"
591
+ begin
592
+
593
+ self_closing = false
594
+
595
+ delegate.open_tag_begin(data.byteslice(identifier_begin...identifier_end), identifier_begin)
596
+ end
597
+ when 7 then
598
+ # line 28 "markup.rl"
599
+ begin
600
+
601
+ identifier_end = p
602
+ end
603
+ # line 162 "markup.rl"
604
+ begin
605
+
606
+ if has_value
607
+ pcdata = MarkupString.raw(pcdata) unless has_entities
608
+
609
+ value = pcdata
610
+ else
611
+ value = true
612
+ end
613
+
614
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
615
+ end
616
+ when 10 then
617
+ # line 32 "markup.rl"
618
+ begin
619
+
620
+ pcdata = ""
621
+ has_entities = false
622
+ end
623
+ # line 49 "markup.rl"
624
+ begin
625
+
626
+ characters_begin = p
627
+ end
628
+ when 11 then
629
+ # line 32 "markup.rl"
630
+ begin
631
+
632
+ pcdata = ""
633
+ has_entities = false
634
+ end
635
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
636
+ begin
637
+ begin
638
+ stack[top] = cs
639
+ top+= 1
640
+ cs = 42
641
+ _goto_level = _again
642
+ next
643
+ end
644
+ end
645
+ when 12 then
646
+ # line 53 "markup.rl"
647
+ begin
648
+
649
+ characters_end = p
650
+
651
+ pcdata << data.byteslice(characters_begin...characters_end)
652
+ end
653
+ # line 37 "markup.rl"
654
+ begin
655
+
656
+ end
657
+ when 13 then
658
+ # line 53 "markup.rl"
659
+ begin
660
+
661
+ characters_end = p
662
+
663
+ pcdata << data.byteslice(characters_begin...characters_end)
664
+ end
665
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
666
+ begin
667
+ begin
668
+ stack[top] = cs
669
+ top+= 1
670
+ cs = 42
671
+ _goto_level = _again
672
+ next
673
+ end
674
+ end
675
+ when 31 then
676
+ # line 67 "markup.rl"
677
+ begin
678
+
679
+ entity_end = p
680
+
681
+ name = data.byteslice(entity_begin...entity_end)
682
+
683
+ has_entities = true
684
+ pcdata << entities[name]
685
+ end
686
+ # line 8 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
687
+ begin
688
+ begin
689
+ top -= 1
690
+ cs = stack[top]
691
+ _goto_level = _again
692
+ next
693
+ end
694
+ end
695
+ when 30 then
696
+ # line 76 "markup.rl"
697
+ begin
698
+
699
+ entity_end = p
700
+
701
+ has_entities = true
702
+ pcdata << data.byteslice(entity_begin...entity_end).to_i(16)
703
+ end
704
+ # line 8 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
705
+ begin
706
+ begin
707
+ top -= 1
708
+ cs = stack[top]
709
+ _goto_level = _again
710
+ next
711
+ end
712
+ end
713
+ when 29 then
714
+ # line 83 "markup.rl"
715
+ begin
716
+
717
+ entity_end = p
718
+
719
+ has_entities = true
720
+ pcdata << data.byteslice(entity_begin...entity_end).to_i(10)
721
+ end
722
+ # line 8 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
723
+ begin
724
+ begin
725
+ top -= 1
726
+ cs = stack[top]
727
+ _goto_level = _again
728
+ next
729
+ end
730
+ end
731
+ when 5 then
732
+ # line 149 "markup.rl"
733
+ begin
734
+
735
+ has_value = false
736
+ pcdata = ""
737
+ end
738
+ # line 24 "markup.rl"
739
+ begin
740
+
741
+ identifier_begin = p
742
+ end
743
+ when 14 then
744
+ # line 154 "markup.rl"
745
+ begin
746
+
747
+ has_value = true
748
+ end
749
+ # line 162 "markup.rl"
750
+ begin
751
+
752
+ if has_value
753
+ pcdata = MarkupString.raw(pcdata) unless has_entities
754
+
755
+ value = pcdata
756
+ else
757
+ value = true
758
+ end
759
+
760
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
761
+ end
762
+ when 19 then
763
+ # line 158 "markup.rl"
764
+ begin
765
+
766
+ has_value = true
767
+ end
768
+ # line 162 "markup.rl"
769
+ begin
770
+
771
+ if has_value
772
+ pcdata = MarkupString.raw(pcdata) unless has_entities
773
+
774
+ value = pcdata
775
+ else
776
+ value = true
777
+ end
778
+
779
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
780
+ end
781
+ when 4 then
782
+ # line 28 "markup.rl"
783
+ begin
784
+
785
+ identifier_end = p
786
+ end
787
+ # line 136 "markup.rl"
788
+ begin
789
+
790
+ self_closing = false
791
+
792
+ delegate.open_tag_begin(data.byteslice(identifier_begin...identifier_end), identifier_begin)
793
+ end
794
+ # line 145 "markup.rl"
795
+ begin
796
+
797
+ self_closing = true
798
+ end
799
+ when 8 then
800
+ # line 28 "markup.rl"
801
+ begin
802
+
803
+ identifier_end = p
804
+ end
805
+ # line 162 "markup.rl"
806
+ begin
807
+
808
+ if has_value
809
+ pcdata = MarkupString.raw(pcdata) unless has_entities
810
+
811
+ value = pcdata
812
+ else
813
+ value = true
814
+ end
815
+
816
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
817
+ end
818
+ # line 145 "markup.rl"
819
+ begin
820
+
821
+ self_closing = true
822
+ end
823
+ when 32 then
824
+ # line 40 "markup.rl"
825
+ begin
826
+
827
+ end
828
+ # line 32 "markup.rl"
829
+ begin
830
+
831
+ pcdata = ""
832
+ has_entities = false
833
+ end
834
+ # line 49 "markup.rl"
835
+ begin
836
+
837
+ characters_begin = p
838
+ end
839
+ when 33 then
840
+ # line 40 "markup.rl"
841
+ begin
842
+
843
+ end
844
+ # line 32 "markup.rl"
845
+ begin
846
+
847
+ pcdata = ""
848
+ has_entities = false
849
+ end
850
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
851
+ begin
852
+ begin
853
+ stack[top] = cs
854
+ top+= 1
855
+ cs = 42
856
+ _goto_level = _again
857
+ next
858
+ end
859
+ end
860
+ when 15 then
861
+ # line 154 "markup.rl"
862
+ begin
863
+
864
+ has_value = true
865
+ end
866
+ # line 162 "markup.rl"
867
+ begin
868
+
869
+ if has_value
870
+ pcdata = MarkupString.raw(pcdata) unless has_entities
871
+
872
+ value = pcdata
873
+ else
874
+ value = true
875
+ end
876
+
877
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
878
+ end
879
+ # line 145 "markup.rl"
880
+ begin
881
+
882
+ self_closing = true
883
+ end
884
+ when 20 then
885
+ # line 158 "markup.rl"
886
+ begin
887
+
888
+ has_value = true
889
+ end
890
+ # line 162 "markup.rl"
891
+ begin
892
+
893
+ if has_value
894
+ pcdata = MarkupString.raw(pcdata) unless has_entities
895
+
896
+ value = pcdata
897
+ else
898
+ value = true
899
+ end
900
+
901
+ delegate.attribute(data.byteslice(identifier_begin...identifier_end), value)
902
+ end
903
+ # line 145 "markup.rl"
904
+ begin
905
+
906
+ self_closing = true
907
+ end
908
+ when 48 then
909
+ # line 94 "markup.rl"
910
+ begin
911
+
912
+ doctype_end = p
913
+
914
+ delegate.doctype(data.byteslice(doctype_begin...doctype_end))
915
+ end
916
+ # line 40 "markup.rl"
917
+ begin
918
+
919
+ end
920
+ # line 32 "markup.rl"
921
+ begin
922
+
923
+ pcdata = ""
924
+ has_entities = false
925
+ end
926
+ # line 49 "markup.rl"
927
+ begin
928
+
929
+ characters_begin = p
930
+ end
931
+ when 49 then
932
+ # line 94 "markup.rl"
933
+ begin
934
+
935
+ doctype_end = p
936
+
937
+ delegate.doctype(data.byteslice(doctype_begin...doctype_end))
938
+ end
939
+ # line 40 "markup.rl"
940
+ begin
941
+
942
+ end
943
+ # line 32 "markup.rl"
944
+ begin
945
+
946
+ pcdata = ""
947
+ has_entities = false
948
+ end
949
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
950
+ begin
951
+ begin
952
+ stack[top] = cs
953
+ top+= 1
954
+ cs = 42
955
+ _goto_level = _again
956
+ next
957
+ end
958
+ end
959
+ when 44 then
960
+ # line 108 "markup.rl"
961
+ begin
962
+
963
+ comment_end = p
964
+
965
+ delegate.comment(data.byteslice(comment_begin...comment_end))
966
+ end
967
+ # line 40 "markup.rl"
968
+ begin
969
+
970
+ end
971
+ # line 32 "markup.rl"
972
+ begin
973
+
974
+ pcdata = ""
975
+ has_entities = false
976
+ end
977
+ # line 49 "markup.rl"
978
+ begin
979
+
980
+ characters_begin = p
981
+ end
982
+ when 45 then
983
+ # line 108 "markup.rl"
984
+ begin
985
+
986
+ comment_end = p
987
+
988
+ delegate.comment(data.byteslice(comment_begin...comment_end))
989
+ end
990
+ # line 40 "markup.rl"
991
+ begin
992
+
993
+ end
994
+ # line 32 "markup.rl"
995
+ begin
996
+
997
+ pcdata = ""
998
+ has_entities = false
999
+ end
1000
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
1001
+ begin
1002
+ begin
1003
+ stack[top] = cs
1004
+ top+= 1
1005
+ cs = 42
1006
+ _goto_level = _again
1007
+ next
1008
+ end
1009
+ end
1010
+ when 60 then
1011
+ # line 128 "markup.rl"
1012
+ begin
1013
+
1014
+ delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1015
+ end
1016
+ # line 40 "markup.rl"
1017
+ begin
1018
+
1019
+ end
1020
+ # line 32 "markup.rl"
1021
+ begin
1022
+
1023
+ pcdata = ""
1024
+ has_entities = false
1025
+ end
1026
+ # line 49 "markup.rl"
1027
+ begin
1028
+
1029
+ characters_begin = p
1030
+ end
1031
+ when 61 then
1032
+ # line 128 "markup.rl"
1033
+ begin
1034
+
1035
+ delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1036
+ end
1037
+ # line 40 "markup.rl"
1038
+ begin
1039
+
1040
+ end
1041
+ # line 32 "markup.rl"
1042
+ begin
1043
+
1044
+ pcdata = ""
1045
+ has_entities = false
1046
+ end
1047
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
1048
+ begin
1049
+ begin
1050
+ stack[top] = cs
1051
+ top+= 1
1052
+ cs = 42
1053
+ _goto_level = _again
1054
+ next
1055
+ end
1056
+ end
1057
+ when 40 then
1058
+ # line 174 "markup.rl"
1059
+ begin
1060
+
1061
+ delegate.open_tag_end(self_closing)
1062
+ end
1063
+ # line 40 "markup.rl"
1064
+ begin
1065
+
1066
+ end
1067
+ # line 32 "markup.rl"
1068
+ begin
1069
+
1070
+ pcdata = ""
1071
+ has_entities = false
1072
+ end
1073
+ # line 49 "markup.rl"
1074
+ begin
1075
+
1076
+ characters_begin = p
1077
+ end
1078
+ when 41 then
1079
+ # line 174 "markup.rl"
1080
+ begin
1081
+
1082
+ delegate.open_tag_end(self_closing)
1083
+ end
1084
+ # line 40 "markup.rl"
1085
+ begin
1086
+
1087
+ end
1088
+ # line 32 "markup.rl"
1089
+ begin
1090
+
1091
+ pcdata = ""
1092
+ has_entities = false
1093
+ end
1094
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
1095
+ begin
1096
+ begin
1097
+ stack[top] = cs
1098
+ top+= 1
1099
+ cs = 42
1100
+ _goto_level = _again
1101
+ next
1102
+ end
1103
+ end
1104
+ when 56 then
1105
+ # line 181 "markup.rl"
1106
+ begin
1107
+
1108
+ delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1109
+ end
1110
+ # line 40 "markup.rl"
1111
+ begin
1112
+
1619
1113
  end
1114
+ # line 32 "markup.rl"
1115
+ begin
1116
+
1117
+ pcdata = ""
1118
+ has_entities = false
1119
+ end
1120
+ # line 49 "markup.rl"
1121
+ begin
1122
+
1123
+ characters_begin = p
1124
+ end
1125
+ when 57 then
1126
+ # line 181 "markup.rl"
1127
+ begin
1128
+
1129
+ delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1130
+ end
1131
+ # line 40 "markup.rl"
1132
+ begin
1133
+
1134
+ end
1135
+ # line 32 "markup.rl"
1136
+ begin
1137
+
1138
+ pcdata = ""
1139
+ has_entities = false
1140
+ end
1141
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
1142
+ begin
1143
+ begin
1144
+ stack[top] = cs
1145
+ top+= 1
1146
+ cs = 42
1147
+ _goto_level = _again
1148
+ next
1149
+ end
1620
1150
  end
1151
+ when 52 then
1152
+ # line 193 "markup.rl"
1153
+ begin
1154
+
1155
+ cdata_end = p
1156
+
1157
+ delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1158
+ end
1159
+ # line 40 "markup.rl"
1160
+ begin
1621
1161
 
1622
- # line 236 "markup.rl"
1623
- if p != eof
1624
- raise ParseError.new("could not consume all input", buffer, p)
1162
+ end
1163
+ # line 32 "markup.rl"
1164
+ begin
1165
+
1166
+ pcdata = ""
1167
+ has_entities = false
1168
+ end
1169
+ # line 49 "markup.rl"
1170
+ begin
1171
+
1172
+ characters_begin = p
1173
+ end
1174
+ when 53 then
1175
+ # line 193 "markup.rl"
1176
+ begin
1177
+
1178
+ cdata_end = p
1179
+
1180
+ delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1181
+ end
1182
+ # line 40 "markup.rl"
1183
+ begin
1184
+
1185
+ end
1186
+ # line 32 "markup.rl"
1187
+ begin
1188
+
1189
+ pcdata = ""
1190
+ has_entities = false
1191
+ end
1192
+ # line 10 "/home/samuel/Documents/ioquatix/trenni/parsers/trenni/entities.rl"
1193
+ begin
1194
+ begin
1195
+ stack[top] = cs
1196
+ top+= 1
1197
+ cs = 42
1198
+ _goto_level = _again
1199
+ next
1200
+ end
1625
1201
  end
1626
- return nil
1202
+ when 34 then
1203
+ # line 142 "markup.rl"
1204
+ begin
1205
+
1206
+ end
1207
+ # line 178 "markup.rl"
1208
+ begin
1209
+
1210
+ end
1211
+ # line 118 "markup.rl"
1212
+ begin
1213
+
1214
+ instruction_begin = p
1215
+ end
1216
+ # line 104 "markup.rl"
1217
+ begin
1218
+
1219
+ comment_begin = p
1220
+ end
1221
+ # line 90 "markup.rl"
1222
+ begin
1223
+
1224
+ doctype_begin = p
1225
+ end
1226
+ # line 189 "markup.rl"
1227
+ begin
1228
+
1229
+ cdata_begin = p
1230
+ end
1231
+ when 50 then
1232
+ # line 94 "markup.rl"
1233
+ begin
1234
+
1235
+ doctype_end = p
1236
+
1237
+ delegate.doctype(data.byteslice(doctype_begin...doctype_end))
1238
+ end
1239
+ # line 142 "markup.rl"
1240
+ begin
1241
+
1242
+ end
1243
+ # line 178 "markup.rl"
1244
+ begin
1245
+
1246
+ end
1247
+ # line 118 "markup.rl"
1248
+ begin
1249
+
1250
+ instruction_begin = p
1251
+ end
1252
+ # line 104 "markup.rl"
1253
+ begin
1254
+
1255
+ comment_begin = p
1256
+ end
1257
+ # line 90 "markup.rl"
1258
+ begin
1259
+
1260
+ doctype_begin = p
1261
+ end
1262
+ # line 189 "markup.rl"
1263
+ begin
1264
+
1265
+ cdata_begin = p
1266
+ end
1267
+ when 46 then
1268
+ # line 108 "markup.rl"
1269
+ begin
1270
+
1271
+ comment_end = p
1272
+
1273
+ delegate.comment(data.byteslice(comment_begin...comment_end))
1274
+ end
1275
+ # line 142 "markup.rl"
1276
+ begin
1277
+
1278
+ end
1279
+ # line 178 "markup.rl"
1280
+ begin
1281
+
1282
+ end
1283
+ # line 118 "markup.rl"
1284
+ begin
1285
+
1286
+ instruction_begin = p
1287
+ end
1288
+ # line 104 "markup.rl"
1289
+ begin
1290
+
1291
+ comment_begin = p
1292
+ end
1293
+ # line 90 "markup.rl"
1294
+ begin
1295
+
1296
+ doctype_begin = p
1297
+ end
1298
+ # line 189 "markup.rl"
1299
+ begin
1300
+
1301
+ cdata_begin = p
1302
+ end
1303
+ when 62 then
1304
+ # line 128 "markup.rl"
1305
+ begin
1306
+
1307
+ delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1308
+ end
1309
+ # line 142 "markup.rl"
1310
+ begin
1311
+
1312
+ end
1313
+ # line 178 "markup.rl"
1314
+ begin
1315
+
1316
+ end
1317
+ # line 118 "markup.rl"
1318
+ begin
1319
+
1320
+ instruction_begin = p
1321
+ end
1322
+ # line 104 "markup.rl"
1323
+ begin
1324
+
1325
+ comment_begin = p
1326
+ end
1327
+ # line 90 "markup.rl"
1328
+ begin
1329
+
1330
+ doctype_begin = p
1331
+ end
1332
+ # line 189 "markup.rl"
1333
+ begin
1334
+
1335
+ cdata_begin = p
1336
+ end
1337
+ when 42 then
1338
+ # line 174 "markup.rl"
1339
+ begin
1340
+
1341
+ delegate.open_tag_end(self_closing)
1342
+ end
1343
+ # line 142 "markup.rl"
1344
+ begin
1345
+
1346
+ end
1347
+ # line 178 "markup.rl"
1348
+ begin
1349
+
1350
+ end
1351
+ # line 118 "markup.rl"
1352
+ begin
1353
+
1354
+ instruction_begin = p
1355
+ end
1356
+ # line 104 "markup.rl"
1357
+ begin
1358
+
1359
+ comment_begin = p
1360
+ end
1361
+ # line 90 "markup.rl"
1362
+ begin
1363
+
1364
+ doctype_begin = p
1365
+ end
1366
+ # line 189 "markup.rl"
1367
+ begin
1368
+
1369
+ cdata_begin = p
1370
+ end
1371
+ when 58 then
1372
+ # line 181 "markup.rl"
1373
+ begin
1374
+
1375
+ delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1376
+ end
1377
+ # line 142 "markup.rl"
1378
+ begin
1379
+
1380
+ end
1381
+ # line 178 "markup.rl"
1382
+ begin
1383
+
1384
+ end
1385
+ # line 118 "markup.rl"
1386
+ begin
1387
+
1388
+ instruction_begin = p
1389
+ end
1390
+ # line 104 "markup.rl"
1391
+ begin
1392
+
1393
+ comment_begin = p
1394
+ end
1395
+ # line 90 "markup.rl"
1396
+ begin
1397
+
1398
+ doctype_begin = p
1399
+ end
1400
+ # line 189 "markup.rl"
1401
+ begin
1402
+
1403
+ cdata_begin = p
1404
+ end
1405
+ when 54 then
1406
+ # line 193 "markup.rl"
1407
+ begin
1408
+
1409
+ cdata_end = p
1410
+
1411
+ delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1412
+ end
1413
+ # line 142 "markup.rl"
1414
+ begin
1415
+
1416
+ end
1417
+ # line 178 "markup.rl"
1418
+ begin
1419
+
1420
+ end
1421
+ # line 118 "markup.rl"
1422
+ begin
1423
+
1424
+ instruction_begin = p
1425
+ end
1426
+ # line 104 "markup.rl"
1427
+ begin
1428
+
1429
+ comment_begin = p
1430
+ end
1431
+ # line 90 "markup.rl"
1432
+ begin
1433
+
1434
+ doctype_begin = p
1435
+ end
1436
+ # line 189 "markup.rl"
1437
+ begin
1438
+
1439
+ cdata_begin = p
1440
+ end
1441
+ when 38 then
1442
+ # line 37 "markup.rl"
1443
+ begin
1444
+
1445
+ end
1446
+ # line 43 "markup.rl"
1447
+ begin
1448
+
1449
+ pcdata = MarkupString.raw(pcdata) unless has_entities
1450
+
1451
+ delegate.text(pcdata)
1452
+ end
1453
+ # line 142 "markup.rl"
1454
+ begin
1455
+
1456
+ end
1457
+ # line 178 "markup.rl"
1458
+ begin
1459
+
1460
+ end
1461
+ # line 118 "markup.rl"
1462
+ begin
1463
+
1464
+ instruction_begin = p
1465
+ end
1466
+ # line 104 "markup.rl"
1467
+ begin
1468
+
1469
+ comment_begin = p
1470
+ end
1471
+ # line 90 "markup.rl"
1472
+ begin
1473
+
1474
+ doctype_begin = p
1475
+ end
1476
+ # line 189 "markup.rl"
1477
+ begin
1478
+
1479
+ cdata_begin = p
1480
+ end
1481
+ when 36 then
1482
+ # line 53 "markup.rl"
1483
+ begin
1484
+
1485
+ characters_end = p
1486
+
1487
+ pcdata << data.byteslice(characters_begin...characters_end)
1488
+ end
1489
+ # line 37 "markup.rl"
1490
+ begin
1491
+
1492
+ end
1493
+ # line 43 "markup.rl"
1494
+ begin
1495
+
1496
+ pcdata = MarkupString.raw(pcdata) unless has_entities
1497
+
1498
+ delegate.text(pcdata)
1499
+ end
1500
+ # line 142 "markup.rl"
1501
+ begin
1502
+
1503
+ end
1504
+ # line 178 "markup.rl"
1505
+ begin
1506
+
1507
+ end
1508
+ # line 118 "markup.rl"
1509
+ begin
1510
+
1511
+ instruction_begin = p
1512
+ end
1513
+ # line 104 "markup.rl"
1514
+ begin
1515
+
1516
+ comment_begin = p
1517
+ end
1518
+ # line 90 "markup.rl"
1519
+ begin
1520
+
1521
+ doctype_begin = p
1522
+ end
1523
+ # line 189 "markup.rl"
1524
+ begin
1525
+
1526
+ cdata_begin = p
1527
+ end
1528
+ # line 1529 "markup.rb"
1529
+ end
1530
+ end
1531
+ end
1532
+ if _goto_level <= _again
1533
+ if cs == 0
1534
+ _goto_level = _out
1535
+ next
1536
+ end
1537
+ p += 1
1538
+ if p != pe
1539
+ _goto_level = _resume
1540
+ next
1541
+ end
1542
+ end
1543
+ if _goto_level <= _test_eof
1544
+ if p == eof
1545
+ case _markup_eof_actions[cs]
1546
+ when 27 then
1547
+ # line 59 "markup.rl"
1548
+ begin
1549
+
1550
+ raise ParseError.new("could not parse entity", buffer, p)
1551
+ end
1552
+ when 47 then
1553
+ # line 94 "markup.rl"
1554
+ begin
1555
+
1556
+ doctype_end = p
1557
+
1558
+ delegate.doctype(data.byteslice(doctype_begin...doctype_end))
1559
+ end
1560
+ when 22 then
1561
+ # line 100 "markup.rl"
1562
+ begin
1563
+
1564
+ raise ParseError.new("could not parse doctype", buffer, p)
1565
+ end
1566
+ when 43 then
1567
+ # line 108 "markup.rl"
1568
+ begin
1569
+
1570
+ comment_end = p
1571
+
1572
+ delegate.comment(data.byteslice(comment_begin...comment_end))
1573
+ end
1574
+ when 21 then
1575
+ # line 114 "markup.rl"
1576
+ begin
1577
+
1578
+ raise ParseError.new("could not parse comment", buffer, p)
1579
+ end
1580
+ when 59 then
1581
+ # line 128 "markup.rl"
1582
+ begin
1583
+
1584
+ delegate.instruction(data.byteslice(instruction_begin, p-instruction_begin))
1585
+ end
1586
+ when 24 then
1587
+ # line 132 "markup.rl"
1588
+ begin
1589
+
1590
+ raise ParseError.new("could not parse instruction", buffer, p)
1591
+ end
1592
+ when 39 then
1593
+ # line 174 "markup.rl"
1594
+ begin
1595
+
1596
+ delegate.open_tag_end(self_closing)
1597
+ end
1598
+ when 55 then
1599
+ # line 181 "markup.rl"
1600
+ begin
1601
+
1602
+ delegate.close_tag(data.byteslice(identifier_begin...identifier_end), identifier_begin)
1603
+ end
1604
+ when 1 then
1605
+ # line 185 "markup.rl"
1606
+ begin
1607
+
1608
+ raise ParseError.new("could not parse tag", buffer, p)
1609
+ end
1610
+ when 51 then
1611
+ # line 193 "markup.rl"
1612
+ begin
1613
+
1614
+ cdata_end = p
1615
+
1616
+ delegate.cdata(data.byteslice(cdata_begin...cdata_end))
1617
+ end
1618
+ when 23 then
1619
+ # line 199 "markup.rl"
1620
+ begin
1621
+
1622
+ raise ParseError.new("could not parse cdata", buffer, p)
1623
+ end
1624
+ when 37 then
1625
+ # line 37 "markup.rl"
1626
+ begin
1627
+
1628
+ end
1629
+ # line 43 "markup.rl"
1630
+ begin
1631
+
1632
+ pcdata = MarkupString.raw(pcdata) unless has_entities
1633
+
1634
+ delegate.text(pcdata)
1635
+ end
1636
+ when 35 then
1637
+ # line 53 "markup.rl"
1638
+ begin
1639
+
1640
+ characters_end = p
1641
+
1642
+ pcdata << data.byteslice(characters_begin...characters_end)
1643
+ end
1644
+ # line 37 "markup.rl"
1645
+ begin
1646
+
1647
+ end
1648
+ # line 43 "markup.rl"
1649
+ begin
1650
+
1651
+ pcdata = MarkupString.raw(pcdata) unless has_entities
1652
+
1653
+ delegate.text(pcdata)
1654
+ end
1655
+ # line 1656 "markup.rb"
1656
+ end
1657
+ end
1658
+
1659
+ end
1660
+ if _goto_level <= _out
1661
+ break
1627
1662
  end
1628
1663
  end
1664
+ end
1665
+
1666
+ # line 237 "markup.rl"
1667
+
1668
+ if p != eof
1669
+ raise ParseError.new("could not consume all input", buffer, p)
1670
+ end
1671
+
1672
+ return nil
1673
+ end
1674
+ end
1629
1675
  end