oga 0.2.0-java → 0.2.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/doc/changelog.md +47 -0
- data/ext/c/lexer.c +847 -639
- data/ext/c/lexer.rl +39 -14
- data/ext/java/org/liboga/xml/Lexer.java +369 -263
- data/ext/java/org/liboga/xml/Lexer.rl +36 -0
- data/ext/ragel/base_lexer.rl +93 -35
- data/lib/liboga.jar +0 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/document.rb +7 -0
- data/lib/oga/xml/element.rb +3 -6
- data/lib/oga/xml/entities.rb +13 -4
- data/lib/oga/xml/lexer.rb +17 -0
- data/lib/oga/xml/parser.rb +95 -84
- data/lib/oga/xml/text.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eba2093654a3446533c54c2077185581ba77553
|
4
|
+
data.tar.gz: fb6a501ec0e2fd789022cc04650d38bcf632b3d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ace82fa4d37e5d310c973f6ddcf370555f3019363c293614d530674aba6b335deba67b4ad9b7e63fe765835e68b13b3b7c6e3d73c264ec50a09f1bef988025f1
|
7
|
+
data.tar.gz: 54de717743d17f300bf29ac3383a26f090a44a2801b9fbf258cb4cd9afd927c5739cd3f42b35b6657ebccf1b76679e03b1dd66bcf2087208fcffdc40e8478fa1
|
data/README.md
CHANGED
@@ -44,6 +44,16 @@ Parsing an IO handle using the pull parser:
|
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
+
Using an Enumerator to download and parse an XML document on the fly:
|
48
|
+
|
49
|
+
enum = Enumerator.new do |yielder|
|
50
|
+
HTTPClient.get('http://some-website.com/some-big-file.xml') do |chunk|
|
51
|
+
yielder << chunk
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
document = Oga.parse_xml(enum)
|
56
|
+
|
47
57
|
Parse a string of XML using the SAX parser:
|
48
58
|
|
49
59
|
class ElementNames
|
data/doc/changelog.md
CHANGED
@@ -3,6 +3,53 @@
|
|
3
3
|
This document contains details of the various releases and their release dates.
|
4
4
|
Dates are in the format `yyyy-mm-dd`.
|
5
5
|
|
6
|
+
## 0.2.1 - 2015-03-02
|
7
|
+
|
8
|
+
### Proper HTML serializing support for script tags
|
9
|
+
|
10
|
+
When serializing an HTML document back to HTML (as a String) the contents of
|
11
|
+
`<script>` tags are serialized correctly. Previously XML unsafe characters
|
12
|
+
(e.g. `<`) would be converted to XML entities, which results in invalid
|
13
|
+
Javascript syntax. This has been changed so that `<script>` tags in HTML
|
14
|
+
documents _don't_ have their contents converted, ensuring proper Javascript
|
15
|
+
syntax upon output.
|
16
|
+
|
17
|
+
See commit 874d7124af540f0bc78e6c586868bbffb4310c5d and issue
|
18
|
+
<https://github.com/YorickPeterse/oga/issues/79> for more information.
|
19
|
+
|
20
|
+
### Proper lexing support for script tags
|
21
|
+
|
22
|
+
When lexing HTML documents the XML lexer is now capable of lexing the contents
|
23
|
+
of `<script>` tags properly. Previously input such as `<script>x >y</script>`
|
24
|
+
would result in incorrect tokens being emitted. See commit
|
25
|
+
ba2177e2cfda958ea12c5b04dbf60907aaa8816d and issue
|
26
|
+
<https://github.com/YorickPeterse/oga/issues/70> for more information.
|
27
|
+
|
28
|
+
### Element Inner Text
|
29
|
+
|
30
|
+
When setting the inner text of an element using `Oga::XML::Element#inner_text=`
|
31
|
+
_all_ child nodes of the element are now removed first, instead of only text
|
32
|
+
nodes being removed.
|
33
|
+
|
34
|
+
See <https://github.com/YorickPeterse/oga/issues/64> for more information.
|
35
|
+
|
36
|
+
### Support for extra XML entities
|
37
|
+
|
38
|
+
Support for encoding/decoding extra XML entities was added by Dmitry
|
39
|
+
Krasnoukhov. This includes entities such as `<`, `"`, etc. See commit
|
40
|
+
26baf89440d97bd9dd5e50ec3d6d9b7ab3bdf737 for more information.
|
41
|
+
|
42
|
+
### Support for inline doctypes with newlines in IO input
|
43
|
+
|
44
|
+
The XML lexer (and thus the parser) can now handle inline doctypes containing
|
45
|
+
newlines when using an IO object as the input. For example:
|
46
|
+
|
47
|
+
<!DOCTYPE html[foo
|
48
|
+
bar]>
|
49
|
+
|
50
|
+
Previously this would result in incorrect tokens being emitted by the lexer. See
|
51
|
+
commit cbb2815146a79805b8da483d2ef48d17e2959e72 for more information.
|
52
|
+
|
6
53
|
## 0.2.0 - 2014-11-17
|
7
54
|
|
8
55
|
### CSS Selector Support
|
data/ext/c/lexer.c
CHANGED
@@ -18,14 +18,14 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
18
18
|
#define callback_simple(name) \
|
19
19
|
liboga_xml_lexer_callback_simple(self, name);
|
20
20
|
|
21
|
-
#define
|
22
|
-
|
21
|
+
#define advance_line(amount) \
|
22
|
+
rb_funcall(self, id_advance_line, 1, INT2NUM(amount));
|
23
23
|
|
24
|
-
#define
|
25
|
-
|
24
|
+
#define inside_html_script_p() \
|
25
|
+
rb_funcall(self, id_inside_html_script_p, 0) == Qtrue
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
ID id_advance_line;
|
28
|
+
ID id_inside_html_script_p;
|
29
29
|
|
30
30
|
|
31
31
|
#line 29 "ext/c/lexer.rl"
|
@@ -41,16 +41,15 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
41
41
|
*/
|
42
42
|
void liboga_xml_lexer_callback(
|
43
43
|
VALUE self,
|
44
|
-
|
44
|
+
VALUE name,
|
45
45
|
rb_encoding *encoding,
|
46
46
|
const char *ts,
|
47
47
|
const char *te
|
48
48
|
)
|
49
49
|
{
|
50
|
-
VALUE value
|
51
|
-
VALUE method = rb_intern(name);
|
50
|
+
VALUE value = rb_enc_str_new(ts, te - ts, encoding);
|
52
51
|
|
53
|
-
rb_funcall(self,
|
52
|
+
rb_funcall(self, name, 1, value);
|
54
53
|
}
|
55
54
|
|
56
55
|
/**
|
@@ -60,31 +59,31 @@ void liboga_xml_lexer_callback(
|
|
60
59
|
* @example
|
61
60
|
* liboga_xml_lexer_callback_simple(self, "on_cdata_start");
|
62
61
|
*/
|
63
|
-
void liboga_xml_lexer_callback_simple(VALUE self,
|
62
|
+
void liboga_xml_lexer_callback_simple(VALUE self, VALUE name)
|
64
63
|
{
|
65
|
-
|
66
|
-
|
67
|
-
rb_funcall(self, method, 0);
|
64
|
+
rb_funcall(self, name, 0);
|
68
65
|
}
|
69
66
|
|
70
67
|
|
71
|
-
#line
|
72
|
-
static const int c_lexer_start =
|
73
|
-
static const int c_lexer_first_final =
|
68
|
+
#line 69 "ext/c/lexer.c"
|
69
|
+
static const int c_lexer_start = 34;
|
70
|
+
static const int c_lexer_first_final = 34;
|
74
71
|
static const int c_lexer_error = 0;
|
75
72
|
|
76
|
-
static const int c_lexer_en_proc_ins_body =
|
77
|
-
static const int c_lexer_en_string_squote =
|
78
|
-
static const int c_lexer_en_string_dquote =
|
79
|
-
static const int
|
80
|
-
static const int
|
81
|
-
static const int
|
82
|
-
static const int
|
83
|
-
static const int
|
84
|
-
static const int
|
73
|
+
static const int c_lexer_en_proc_ins_body = 40;
|
74
|
+
static const int c_lexer_en_string_squote = 42;
|
75
|
+
static const int c_lexer_en_string_dquote = 44;
|
76
|
+
static const int c_lexer_en_doctype_inline = 46;
|
77
|
+
static const int c_lexer_en_doctype = 48;
|
78
|
+
static const int c_lexer_en_xml_decl = 60;
|
79
|
+
static const int c_lexer_en_element_name = 63;
|
80
|
+
static const int c_lexer_en_element_head = 65;
|
81
|
+
static const int c_lexer_en_text = 67;
|
82
|
+
static const int c_lexer_en_script_text = 71;
|
83
|
+
static const int c_lexer_en_main = 34;
|
85
84
|
|
86
85
|
|
87
|
-
#line
|
86
|
+
#line 65 "ext/c/lexer.rl"
|
88
87
|
|
89
88
|
/**
|
90
89
|
* Lexes the String specifies as the method argument. Token values have the
|
@@ -113,8 +112,33 @@ VALUE oga_xml_lexer_advance(VALUE self, VALUE data_block)
|
|
113
112
|
|
114
113
|
int lines = state->lines;
|
115
114
|
|
115
|
+
ID id_advance_line = rb_intern("advance_line");
|
116
|
+
ID id_on_attribute = rb_intern("on_attribute");
|
117
|
+
ID id_on_attribute_ns = rb_intern("on_attribute_ns");
|
118
|
+
ID id_on_cdata = rb_intern("on_cdata");
|
119
|
+
ID id_on_comment = rb_intern("on_comment");
|
120
|
+
ID id_on_doctype_end = rb_intern("on_doctype_end");
|
121
|
+
ID id_on_doctype_inline = rb_intern("on_doctype_inline");
|
122
|
+
ID id_on_doctype_name = rb_intern("on_doctype_name");
|
123
|
+
ID id_on_doctype_start = rb_intern("on_doctype_start");
|
124
|
+
ID id_on_doctype_type = rb_intern("on_doctype_type");
|
125
|
+
ID id_on_element_end = rb_intern("on_element_end");
|
126
|
+
ID id_on_element_name = rb_intern("on_element_name");
|
127
|
+
ID id_on_element_ns = rb_intern("on_element_ns");
|
128
|
+
ID id_on_element_open_end = rb_intern("on_element_open_end");
|
129
|
+
ID id_on_element_start = rb_intern("on_element_start");
|
130
|
+
ID id_on_proc_ins_end = rb_intern("on_proc_ins_end");
|
131
|
+
ID id_on_proc_ins_name = rb_intern("on_proc_ins_name");
|
132
|
+
ID id_on_proc_ins_start = rb_intern("on_proc_ins_start");
|
133
|
+
ID id_on_string_body = rb_intern("on_string_body");
|
134
|
+
ID id_on_string_dquote = rb_intern("on_string_dquote");
|
135
|
+
ID id_on_string_squote = rb_intern("on_string_squote");
|
136
|
+
ID id_on_text = rb_intern("on_text");
|
137
|
+
ID id_on_xml_decl_end = rb_intern("on_xml_decl_end");
|
138
|
+
ID id_on_xml_decl_start = rb_intern("on_xml_decl_start");
|
139
|
+
|
116
140
|
|
117
|
-
#line
|
141
|
+
#line 142 "ext/c/lexer.c"
|
118
142
|
{
|
119
143
|
if ( p == pe )
|
120
144
|
goto _test_eof;
|
@@ -122,8 +146,8 @@ VALUE oga_xml_lexer_advance(VALUE self, VALUE data_block)
|
|
122
146
|
|
123
147
|
_again:
|
124
148
|
switch ( ( state->cs) ) {
|
125
|
-
case
|
126
|
-
case
|
149
|
+
case 34: goto st34;
|
150
|
+
case 35: goto st35;
|
127
151
|
case 1: goto st1;
|
128
152
|
case 2: goto st2;
|
129
153
|
case 3: goto st3;
|
@@ -136,7 +160,7 @@ _again:
|
|
136
160
|
case 10: goto st10;
|
137
161
|
case 11: goto st11;
|
138
162
|
case 12: goto st12;
|
139
|
-
case
|
163
|
+
case 36: goto st36;
|
140
164
|
case 13: goto st13;
|
141
165
|
case 14: goto st14;
|
142
166
|
case 15: goto st15;
|
@@ -149,17 +173,11 @@ _again:
|
|
149
173
|
case 22: goto st22;
|
150
174
|
case 23: goto st23;
|
151
175
|
case 24: goto st24;
|
152
|
-
case 32: goto st32;
|
153
|
-
case 33: goto st33;
|
154
|
-
case 34: goto st34;
|
155
|
-
case 35: goto st35;
|
156
|
-
case 36: goto st36;
|
157
176
|
case 37: goto st37;
|
158
177
|
case 38: goto st38;
|
159
178
|
case 39: goto st39;
|
160
179
|
case 40: goto st40;
|
161
180
|
case 41: goto st41;
|
162
|
-
case 0: goto st0;
|
163
181
|
case 42: goto st42;
|
164
182
|
case 43: goto st43;
|
165
183
|
case 44: goto st44;
|
@@ -167,25 +185,40 @@ _again:
|
|
167
185
|
case 46: goto st46;
|
168
186
|
case 47: goto st47;
|
169
187
|
case 48: goto st48;
|
188
|
+
case 0: goto st0;
|
170
189
|
case 49: goto st49;
|
171
190
|
case 50: goto st50;
|
172
191
|
case 51: goto st51;
|
173
192
|
case 52: goto st52;
|
174
|
-
case 25: goto st25;
|
175
|
-
case 26: goto st26;
|
176
193
|
case 53: goto st53;
|
177
194
|
case 54: goto st54;
|
178
195
|
case 55: goto st55;
|
179
196
|
case 56: goto st56;
|
180
197
|
case 57: goto st57;
|
181
198
|
case 58: goto st58;
|
182
|
-
case 27: goto st27;
|
183
199
|
case 59: goto st59;
|
184
|
-
case 28: goto st28;
|
185
200
|
case 60: goto st60;
|
186
201
|
case 61: goto st61;
|
187
202
|
case 62: goto st62;
|
188
203
|
case 63: goto st63;
|
204
|
+
case 64: goto st64;
|
205
|
+
case 65: goto st65;
|
206
|
+
case 25: goto st25;
|
207
|
+
case 66: goto st66;
|
208
|
+
case 26: goto st26;
|
209
|
+
case 67: goto st67;
|
210
|
+
case 68: goto st68;
|
211
|
+
case 69: goto st69;
|
212
|
+
case 70: goto st70;
|
213
|
+
case 71: goto st71;
|
214
|
+
case 72: goto st72;
|
215
|
+
case 27: goto st27;
|
216
|
+
case 28: goto st28;
|
217
|
+
case 29: goto st29;
|
218
|
+
case 30: goto st30;
|
219
|
+
case 31: goto st31;
|
220
|
+
case 32: goto st32;
|
221
|
+
case 33: goto st33;
|
189
222
|
default: break;
|
190
223
|
}
|
191
224
|
|
@@ -195,136 +228,136 @@ _resume:
|
|
195
228
|
switch ( ( state->cs) )
|
196
229
|
{
|
197
230
|
tr0:
|
198
|
-
( state->cs) =
|
199
|
-
#line
|
231
|
+
( state->cs) = 34;
|
232
|
+
#line 358 "ext/ragel/base_lexer.rl"
|
200
233
|
{{p = ((te))-1;}{
|
201
234
|
p--;
|
202
|
-
( state->cs) =
|
235
|
+
( state->cs) = 67;
|
203
236
|
}}
|
204
237
|
goto _again;
|
205
238
|
tr7:
|
206
|
-
#line
|
239
|
+
#line 72 "ext/ragel/base_lexer.rl"
|
207
240
|
{te = p+1;{
|
208
|
-
callback(
|
241
|
+
callback(id_on_comment, data, encoding, ts + 4, te - 3);
|
209
242
|
}}
|
210
|
-
goto
|
243
|
+
goto st34;
|
211
244
|
tr23:
|
212
|
-
#line
|
245
|
+
#line 88 "ext/ragel/base_lexer.rl"
|
213
246
|
{te = p+1;{
|
214
|
-
callback(
|
247
|
+
callback(id_on_cdata, data, encoding, ts + 9, te - 3);
|
215
248
|
}}
|
216
|
-
goto
|
249
|
+
goto st34;
|
217
250
|
tr26:
|
218
|
-
#line
|
251
|
+
#line 289 "ext/ragel/base_lexer.rl"
|
219
252
|
{te = p+1;{
|
220
|
-
callback_simple(
|
253
|
+
callback_simple(id_on_element_end);
|
221
254
|
}}
|
222
|
-
goto
|
223
|
-
|
224
|
-
( state->cs) =
|
225
|
-
#line
|
255
|
+
goto st34;
|
256
|
+
tr40:
|
257
|
+
( state->cs) = 34;
|
258
|
+
#line 358 "ext/ragel/base_lexer.rl"
|
226
259
|
{te = p+1;{
|
227
260
|
p--;
|
228
|
-
( state->cs) =
|
261
|
+
( state->cs) = 67;
|
229
262
|
}}
|
230
263
|
goto _again;
|
231
|
-
|
232
|
-
( state->cs) =
|
233
|
-
#line
|
264
|
+
tr42:
|
265
|
+
( state->cs) = 34;
|
266
|
+
#line 358 "ext/ragel/base_lexer.rl"
|
234
267
|
{te = p;p--;{
|
235
268
|
p--;
|
236
|
-
( state->cs) =
|
269
|
+
( state->cs) = 67;
|
237
270
|
}}
|
238
271
|
goto _again;
|
239
|
-
|
240
|
-
( state->cs) =
|
241
|
-
#line
|
272
|
+
tr44:
|
273
|
+
( state->cs) = 34;
|
274
|
+
#line 283 "ext/ragel/base_lexer.rl"
|
242
275
|
{te = p+1;{
|
243
|
-
callback_simple(
|
276
|
+
callback_simple(id_on_element_start);
|
244
277
|
p--;
|
245
|
-
( state->cs) =
|
278
|
+
( state->cs) = 63;
|
246
279
|
}}
|
247
280
|
goto _again;
|
248
|
-
|
249
|
-
( state->cs) =
|
250
|
-
#line
|
281
|
+
tr46:
|
282
|
+
( state->cs) = 34;
|
283
|
+
#line 192 "ext/ragel/base_lexer.rl"
|
251
284
|
{te = p;p--;{
|
252
|
-
callback_simple(
|
253
|
-
( state->cs) =
|
285
|
+
callback_simple(id_on_doctype_start);
|
286
|
+
( state->cs) = 48;
|
254
287
|
}}
|
255
288
|
goto _again;
|
256
|
-
|
257
|
-
( state->cs) =
|
289
|
+
tr47:
|
290
|
+
( state->cs) = 34;
|
258
291
|
#line 1 "NONE"
|
259
292
|
{ switch( ( state->act) ) {
|
260
|
-
case
|
293
|
+
case 36:
|
261
294
|
{{p = ((te))-1;}
|
262
|
-
callback_simple(
|
263
|
-
( state->cs) =
|
295
|
+
callback_simple(id_on_xml_decl_start);
|
296
|
+
( state->cs) = 60;
|
264
297
|
}
|
265
298
|
break;
|
266
|
-
case
|
299
|
+
case 39:
|
267
300
|
{{p = ((te))-1;}
|
268
|
-
callback_simple(
|
269
|
-
callback(
|
301
|
+
callback_simple(id_on_proc_ins_start);
|
302
|
+
callback(id_on_proc_ins_name, data, encoding, ts + 2, te);
|
270
303
|
|
271
304
|
mark = te;
|
272
305
|
|
273
|
-
( state->cs) =
|
306
|
+
( state->cs) = 40;
|
274
307
|
}
|
275
308
|
break;
|
276
309
|
}
|
277
310
|
}
|
278
311
|
goto _again;
|
279
|
-
|
280
|
-
( state->cs) =
|
281
|
-
#line
|
312
|
+
tr48:
|
313
|
+
( state->cs) = 34;
|
314
|
+
#line 106 "ext/ragel/base_lexer.rl"
|
282
315
|
{te = p;p--;{
|
283
|
-
callback_simple(
|
284
|
-
callback(
|
316
|
+
callback_simple(id_on_proc_ins_start);
|
317
|
+
callback(id_on_proc_ins_name, data, encoding, ts + 2, te);
|
285
318
|
|
286
319
|
mark = te;
|
287
320
|
|
288
|
-
( state->cs) =
|
321
|
+
( state->cs) = 40;
|
289
322
|
}}
|
290
323
|
goto _again;
|
291
|
-
|
324
|
+
st34:
|
292
325
|
#line 1 "NONE"
|
293
326
|
{ts = 0;}
|
294
327
|
if ( ++p == pe )
|
295
|
-
goto
|
296
|
-
case
|
328
|
+
goto _test_eof34;
|
329
|
+
case 34:
|
297
330
|
#line 1 "NONE"
|
298
331
|
{ts = p;}
|
299
|
-
#line
|
332
|
+
#line 333 "ext/c/lexer.c"
|
300
333
|
if ( (*p) == 60 )
|
301
|
-
goto
|
302
|
-
goto
|
303
|
-
|
334
|
+
goto tr41;
|
335
|
+
goto tr40;
|
336
|
+
tr41:
|
304
337
|
#line 1 "NONE"
|
305
338
|
{te = p+1;}
|
306
|
-
goto
|
307
|
-
|
339
|
+
goto st35;
|
340
|
+
st35:
|
308
341
|
if ( ++p == pe )
|
309
|
-
goto
|
310
|
-
case
|
311
|
-
#line
|
342
|
+
goto _test_eof35;
|
343
|
+
case 35:
|
344
|
+
#line 345 "ext/c/lexer.c"
|
312
345
|
switch( (*p) ) {
|
313
346
|
case 33: goto st1;
|
314
|
-
case 45: goto
|
347
|
+
case 45: goto tr44;
|
315
348
|
case 47: goto st22;
|
316
349
|
case 63: goto st24;
|
317
|
-
case 95: goto
|
350
|
+
case 95: goto tr44;
|
318
351
|
}
|
319
352
|
if ( (*p) < 65 ) {
|
320
353
|
if ( 48 <= (*p) && (*p) <= 57 )
|
321
|
-
goto
|
354
|
+
goto tr44;
|
322
355
|
} else if ( (*p) > 90 ) {
|
323
356
|
if ( 97 <= (*p) && (*p) <= 122 )
|
324
|
-
goto
|
357
|
+
goto tr44;
|
325
358
|
} else
|
326
|
-
goto
|
327
|
-
goto
|
359
|
+
goto tr44;
|
360
|
+
goto tr42;
|
328
361
|
st1:
|
329
362
|
if ( ++p == pe )
|
330
363
|
goto _test_eof1;
|
@@ -425,19 +458,19 @@ st12:
|
|
425
458
|
goto _test_eof12;
|
426
459
|
case 12:
|
427
460
|
switch( (*p) ) {
|
428
|
-
case 9: goto
|
429
|
-
case 32: goto
|
461
|
+
case 9: goto st36;
|
462
|
+
case 32: goto st36;
|
430
463
|
}
|
431
464
|
goto tr0;
|
432
|
-
|
465
|
+
st36:
|
433
466
|
if ( ++p == pe )
|
434
|
-
goto
|
435
|
-
case
|
467
|
+
goto _test_eof36;
|
468
|
+
case 36:
|
436
469
|
switch( (*p) ) {
|
437
|
-
case 9: goto
|
438
|
-
case 32: goto
|
470
|
+
case 9: goto st36;
|
471
|
+
case 32: goto st36;
|
439
472
|
}
|
440
|
-
goto
|
473
|
+
goto tr46;
|
441
474
|
st13:
|
442
475
|
if ( ++p == pe )
|
443
476
|
goto _test_eof13;
|
@@ -546,7 +579,7 @@ case 24:
|
|
546
579
|
switch( (*p) ) {
|
547
580
|
case 45: goto tr27;
|
548
581
|
case 95: goto tr27;
|
549
|
-
case 120: goto
|
582
|
+
case 120: goto st38;
|
550
583
|
}
|
551
584
|
if ( (*p) < 65 ) {
|
552
585
|
if ( 48 <= (*p) && (*p) <= 57 )
|
@@ -560,20 +593,20 @@ case 24:
|
|
560
593
|
tr27:
|
561
594
|
#line 1 "NONE"
|
562
595
|
{te = p+1;}
|
563
|
-
#line
|
564
|
-
{( state->act) =
|
565
|
-
goto
|
566
|
-
|
596
|
+
#line 106 "ext/ragel/base_lexer.rl"
|
597
|
+
{( state->act) = 39;}
|
598
|
+
goto st37;
|
599
|
+
tr50:
|
567
600
|
#line 1 "NONE"
|
568
601
|
{te = p+1;}
|
569
|
-
#line
|
570
|
-
{( state->act) =
|
571
|
-
goto
|
572
|
-
|
602
|
+
#line 248 "ext/ragel/base_lexer.rl"
|
603
|
+
{( state->act) = 36;}
|
604
|
+
goto st37;
|
605
|
+
st37:
|
573
606
|
if ( ++p == pe )
|
574
|
-
goto
|
575
|
-
case
|
576
|
-
#line
|
607
|
+
goto _test_eof37;
|
608
|
+
case 37:
|
609
|
+
#line 610 "ext/c/lexer.c"
|
577
610
|
switch( (*p) ) {
|
578
611
|
case 45: goto tr27;
|
579
612
|
case 95: goto tr27;
|
@@ -586,15 +619,15 @@ case 32:
|
|
586
619
|
goto tr27;
|
587
620
|
} else
|
588
621
|
goto tr27;
|
589
|
-
goto
|
590
|
-
|
622
|
+
goto tr47;
|
623
|
+
st38:
|
591
624
|
if ( ++p == pe )
|
592
|
-
goto
|
593
|
-
case
|
625
|
+
goto _test_eof38;
|
626
|
+
case 38:
|
594
627
|
switch( (*p) ) {
|
595
628
|
case 45: goto tr27;
|
596
629
|
case 95: goto tr27;
|
597
|
-
case 109: goto
|
630
|
+
case 109: goto st39;
|
598
631
|
}
|
599
632
|
if ( (*p) < 65 ) {
|
600
633
|
if ( 48 <= (*p) && (*p) <= 57 )
|
@@ -604,15 +637,15 @@ case 33:
|
|
604
637
|
goto tr27;
|
605
638
|
} else
|
606
639
|
goto tr27;
|
607
|
-
goto
|
608
|
-
|
640
|
+
goto tr48;
|
641
|
+
st39:
|
609
642
|
if ( ++p == pe )
|
610
|
-
goto
|
611
|
-
case
|
643
|
+
goto _test_eof39;
|
644
|
+
case 39:
|
612
645
|
switch( (*p) ) {
|
613
646
|
case 45: goto tr27;
|
614
647
|
case 95: goto tr27;
|
615
|
-
case 108: goto
|
648
|
+
case 108: goto tr50;
|
616
649
|
}
|
617
650
|
if ( (*p) < 65 ) {
|
618
651
|
if ( 48 <= (*p) && (*p) <= 57 )
|
@@ -622,58 +655,58 @@ case 34:
|
|
622
655
|
goto tr27;
|
623
656
|
} else
|
624
657
|
goto tr27;
|
625
|
-
goto
|
626
|
-
|
627
|
-
#line
|
658
|
+
goto tr48;
|
659
|
+
tr51:
|
660
|
+
#line 125 "ext/ragel/base_lexer.rl"
|
628
661
|
{te = p+1;}
|
629
|
-
goto
|
630
|
-
|
631
|
-
#line
|
662
|
+
goto st40;
|
663
|
+
tr53:
|
664
|
+
#line 125 "ext/ragel/base_lexer.rl"
|
632
665
|
{te = p;p--;}
|
633
|
-
goto
|
634
|
-
|
635
|
-
( state->cs) =
|
636
|
-
#line
|
666
|
+
goto st40;
|
667
|
+
tr54:
|
668
|
+
( state->cs) = 40;
|
669
|
+
#line 116 "ext/ragel/base_lexer.rl"
|
637
670
|
{te = p+1;{
|
638
|
-
callback(
|
639
|
-
callback_simple(
|
671
|
+
callback(id_on_text, data, encoding, mark, ts);
|
672
|
+
callback_simple(id_on_proc_ins_end);
|
640
673
|
|
641
674
|
mark = 0;
|
642
675
|
|
643
|
-
( state->cs) =
|
676
|
+
( state->cs) = 34;
|
644
677
|
}}
|
645
678
|
goto _again;
|
646
|
-
|
679
|
+
st40:
|
647
680
|
#line 1 "NONE"
|
648
681
|
{ts = 0;}
|
649
682
|
if ( ++p == pe )
|
650
|
-
goto
|
651
|
-
case
|
683
|
+
goto _test_eof40;
|
684
|
+
case 40:
|
652
685
|
#line 1 "NONE"
|
653
686
|
{ts = p;}
|
654
|
-
#line
|
687
|
+
#line 688 "ext/c/lexer.c"
|
655
688
|
if ( (*p) == 63 )
|
656
|
-
goto
|
657
|
-
goto
|
658
|
-
|
689
|
+
goto st41;
|
690
|
+
goto tr51;
|
691
|
+
st41:
|
659
692
|
if ( ++p == pe )
|
660
|
-
goto
|
661
|
-
case
|
693
|
+
goto _test_eof41;
|
694
|
+
case 41:
|
662
695
|
if ( (*p) == 62 )
|
663
|
-
goto
|
664
|
-
goto
|
665
|
-
|
666
|
-
#line
|
696
|
+
goto tr54;
|
697
|
+
goto tr53;
|
698
|
+
tr56:
|
699
|
+
#line 163 "ext/ragel/base_lexer.rl"
|
667
700
|
{te = p+1;{
|
668
|
-
callback_simple(
|
701
|
+
callback_simple(id_on_string_squote);
|
669
702
|
|
670
703
|
{( state->cs) = ( state->stack)[--( state->top)];goto _again;}
|
671
704
|
}}
|
672
|
-
goto
|
673
|
-
|
674
|
-
#line
|
705
|
+
goto st42;
|
706
|
+
tr57:
|
707
|
+
#line 137 "ext/ragel/base_lexer.rl"
|
675
708
|
{te = p;p--;{
|
676
|
-
callback(
|
709
|
+
callback(id_on_string_body, data, encoding, ts, te);
|
677
710
|
|
678
711
|
if ( lines > 0 )
|
679
712
|
{
|
@@ -682,45 +715,45 @@ tr51:
|
|
682
715
|
lines = 0;
|
683
716
|
}
|
684
717
|
}}
|
685
|
-
goto
|
686
|
-
|
718
|
+
goto st42;
|
719
|
+
st42:
|
687
720
|
#line 1 "NONE"
|
688
721
|
{ts = 0;}
|
689
722
|
if ( ++p == pe )
|
690
|
-
goto
|
691
|
-
case
|
723
|
+
goto _test_eof42;
|
724
|
+
case 42:
|
692
725
|
#line 1 "NONE"
|
693
726
|
{ts = p;}
|
694
|
-
#line
|
727
|
+
#line 728 "ext/c/lexer.c"
|
695
728
|
if ( (*p) == 39 )
|
696
|
-
goto
|
697
|
-
goto
|
698
|
-
|
699
|
-
#line
|
729
|
+
goto tr56;
|
730
|
+
goto tr55;
|
731
|
+
tr55:
|
732
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
700
733
|
{
|
701
734
|
if ( (*p) == '\n' ) lines++;
|
702
735
|
}
|
703
|
-
goto
|
704
|
-
|
736
|
+
goto st43;
|
737
|
+
st43:
|
705
738
|
if ( ++p == pe )
|
706
|
-
goto
|
707
|
-
case
|
708
|
-
#line
|
739
|
+
goto _test_eof43;
|
740
|
+
case 43:
|
741
|
+
#line 742 "ext/c/lexer.c"
|
709
742
|
if ( (*p) == 39 )
|
710
|
-
goto
|
711
|
-
goto
|
712
|
-
|
713
|
-
#line
|
743
|
+
goto tr57;
|
744
|
+
goto tr55;
|
745
|
+
tr59:
|
746
|
+
#line 173 "ext/ragel/base_lexer.rl"
|
714
747
|
{te = p+1;{
|
715
|
-
callback_simple(
|
748
|
+
callback_simple(id_on_string_dquote);
|
716
749
|
|
717
750
|
{( state->cs) = ( state->stack)[--( state->top)];goto _again;}
|
718
751
|
}}
|
719
|
-
goto
|
720
|
-
|
721
|
-
#line
|
752
|
+
goto st44;
|
753
|
+
tr60:
|
754
|
+
#line 137 "ext/ragel/base_lexer.rl"
|
722
755
|
{te = p;p--;{
|
723
|
-
callback(
|
756
|
+
callback(id_on_string_body, data, encoding, ts, te);
|
724
757
|
|
725
758
|
if ( lines > 0 )
|
726
759
|
{
|
@@ -729,607 +762,648 @@ tr54:
|
|
729
762
|
lines = 0;
|
730
763
|
}
|
731
764
|
}}
|
732
|
-
goto
|
733
|
-
|
765
|
+
goto st44;
|
766
|
+
st44:
|
734
767
|
#line 1 "NONE"
|
735
768
|
{ts = 0;}
|
736
769
|
if ( ++p == pe )
|
737
|
-
goto
|
738
|
-
case
|
770
|
+
goto _test_eof44;
|
771
|
+
case 44:
|
739
772
|
#line 1 "NONE"
|
740
773
|
{ts = p;}
|
741
|
-
#line
|
774
|
+
#line 775 "ext/c/lexer.c"
|
742
775
|
if ( (*p) == 34 )
|
743
|
-
goto
|
744
|
-
goto
|
745
|
-
|
746
|
-
#line
|
776
|
+
goto tr59;
|
777
|
+
goto tr58;
|
778
|
+
tr58:
|
779
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
747
780
|
{
|
748
781
|
if ( (*p) == '\n' ) lines++;
|
749
782
|
}
|
750
|
-
goto
|
751
|
-
|
783
|
+
goto st45;
|
784
|
+
st45:
|
752
785
|
if ( ++p == pe )
|
753
|
-
goto
|
754
|
-
case
|
755
|
-
#line
|
786
|
+
goto _test_eof45;
|
787
|
+
case 45:
|
788
|
+
#line 789 "ext/c/lexer.c"
|
756
789
|
if ( (*p) == 34 )
|
757
|
-
goto
|
758
|
-
goto
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
790
|
+
goto tr60;
|
791
|
+
goto tr58;
|
792
|
+
tr62:
|
793
|
+
( state->cs) = 46;
|
794
|
+
#line 210 "ext/ragel/base_lexer.rl"
|
795
|
+
{te = p+1;{ ( state->cs) = 48; }}
|
796
|
+
goto _again;
|
797
|
+
tr63:
|
798
|
+
#line 199 "ext/ragel/base_lexer.rl"
|
799
|
+
{te = p;p--;{
|
800
|
+
callback(id_on_doctype_inline, data, encoding, ts, te);
|
801
|
+
|
802
|
+
if ( lines > 0 )
|
803
|
+
{
|
804
|
+
advance_line(lines);
|
805
|
+
|
806
|
+
lines = 0;
|
807
|
+
}
|
763
808
|
}}
|
764
|
-
goto
|
765
|
-
|
766
|
-
#line
|
809
|
+
goto st46;
|
810
|
+
st46:
|
811
|
+
#line 1 "NONE"
|
812
|
+
{ts = 0;}
|
813
|
+
if ( ++p == pe )
|
814
|
+
goto _test_eof46;
|
815
|
+
case 46:
|
816
|
+
#line 1 "NONE"
|
817
|
+
{ts = p;}
|
818
|
+
#line 819 "ext/c/lexer.c"
|
819
|
+
if ( (*p) == 93 )
|
820
|
+
goto tr62;
|
821
|
+
goto tr61;
|
822
|
+
tr61:
|
823
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
824
|
+
{
|
825
|
+
if ( (*p) == '\n' ) lines++;
|
826
|
+
}
|
827
|
+
goto st47;
|
828
|
+
st47:
|
829
|
+
if ( ++p == pe )
|
830
|
+
goto _test_eof47;
|
831
|
+
case 47:
|
832
|
+
#line 833 "ext/c/lexer.c"
|
833
|
+
if ( (*p) == 93 )
|
834
|
+
goto tr63;
|
835
|
+
goto tr61;
|
836
|
+
tr64:
|
837
|
+
#line 229 "ext/ragel/base_lexer.rl"
|
767
838
|
{te = p+1;}
|
768
|
-
goto
|
769
|
-
|
770
|
-
#line
|
839
|
+
goto st48;
|
840
|
+
tr65:
|
841
|
+
#line 154 "ext/ragel/base_lexer.rl"
|
771
842
|
{te = p+1;{
|
772
|
-
callback_simple(
|
843
|
+
callback_simple(id_on_string_dquote);
|
773
844
|
|
774
|
-
{( state->stack)[( state->top)++] =
|
845
|
+
{( state->stack)[( state->top)++] = 48; goto st44;}
|
775
846
|
}}
|
776
|
-
goto
|
777
|
-
|
778
|
-
#line
|
847
|
+
goto st48;
|
848
|
+
tr66:
|
849
|
+
#line 148 "ext/ragel/base_lexer.rl"
|
779
850
|
{te = p+1;{
|
780
|
-
callback_simple(
|
851
|
+
callback_simple(id_on_string_squote);
|
781
852
|
|
782
|
-
{( state->stack)[( state->top)++] =
|
853
|
+
{( state->stack)[( state->top)++] = 48; goto st42;}
|
783
854
|
}}
|
784
|
-
goto
|
785
|
-
|
786
|
-
( state->cs) =
|
787
|
-
#line
|
855
|
+
goto st48;
|
856
|
+
tr68:
|
857
|
+
( state->cs) = 48;
|
858
|
+
#line 235 "ext/ragel/base_lexer.rl"
|
788
859
|
{te = p+1;{
|
789
|
-
callback_simple(
|
790
|
-
( state->cs) =
|
860
|
+
callback_simple(id_on_doctype_end);
|
861
|
+
( state->cs) = 34;
|
791
862
|
}}
|
792
863
|
goto _again;
|
793
|
-
|
864
|
+
tr71:
|
865
|
+
( state->cs) = 48;
|
866
|
+
#line 221 "ext/ragel/base_lexer.rl"
|
867
|
+
{te = p+1;{ ( state->cs) = 46; }}
|
868
|
+
goto _again;
|
869
|
+
tr72:
|
794
870
|
#line 1 "NONE"
|
795
871
|
{ switch( ( state->act) ) {
|
796
|
-
case
|
872
|
+
case 9:
|
797
873
|
{{p = ((te))-1;}
|
798
|
-
callback(
|
874
|
+
callback(id_on_doctype_type, data, encoding, ts, te);
|
799
875
|
}
|
800
876
|
break;
|
801
|
-
case
|
877
|
+
case 14:
|
802
878
|
{{p = ((te))-1;}
|
803
|
-
callback(
|
879
|
+
callback(id_on_doctype_name, data, encoding, ts, te);
|
804
880
|
}
|
805
881
|
break;
|
806
882
|
}
|
807
883
|
}
|
808
|
-
goto
|
809
|
-
|
810
|
-
#line
|
884
|
+
goto st48;
|
885
|
+
tr73:
|
886
|
+
#line 231 "ext/ragel/base_lexer.rl"
|
811
887
|
{te = p;p--;{
|
812
|
-
callback(
|
888
|
+
callback(id_on_doctype_name, data, encoding, ts, te);
|
813
889
|
}}
|
814
|
-
goto
|
815
|
-
|
890
|
+
goto st48;
|
891
|
+
st48:
|
816
892
|
#line 1 "NONE"
|
817
893
|
{ts = 0;}
|
818
894
|
if ( ++p == pe )
|
819
|
-
goto
|
820
|
-
case
|
895
|
+
goto _test_eof48;
|
896
|
+
case 48:
|
821
897
|
#line 1 "NONE"
|
822
898
|
{ts = p;}
|
823
|
-
#line
|
899
|
+
#line 900 "ext/c/lexer.c"
|
824
900
|
switch( (*p) ) {
|
825
|
-
case 9: goto
|
826
|
-
case 32: goto
|
827
|
-
case 34: goto
|
828
|
-
case 39: goto
|
829
|
-
case 45: goto
|
830
|
-
case 62: goto
|
831
|
-
case 80: goto
|
832
|
-
case 83: goto
|
833
|
-
case 91: goto
|
834
|
-
case 95: goto
|
901
|
+
case 9: goto tr64;
|
902
|
+
case 32: goto tr64;
|
903
|
+
case 34: goto tr65;
|
904
|
+
case 39: goto tr66;
|
905
|
+
case 45: goto tr67;
|
906
|
+
case 62: goto tr68;
|
907
|
+
case 80: goto st50;
|
908
|
+
case 83: goto st55;
|
909
|
+
case 91: goto tr71;
|
910
|
+
case 95: goto tr67;
|
835
911
|
}
|
836
912
|
if ( (*p) < 65 ) {
|
837
913
|
if ( 48 <= (*p) && (*p) <= 57 )
|
838
|
-
goto
|
914
|
+
goto tr67;
|
839
915
|
} else if ( (*p) > 90 ) {
|
840
916
|
if ( 97 <= (*p) && (*p) <= 122 )
|
841
|
-
goto
|
917
|
+
goto tr67;
|
842
918
|
} else
|
843
|
-
goto
|
919
|
+
goto tr67;
|
844
920
|
goto st0;
|
845
921
|
st0:
|
846
922
|
( state->cs) = 0;
|
847
923
|
goto _out;
|
848
|
-
|
924
|
+
tr67:
|
849
925
|
#line 1 "NONE"
|
850
926
|
{te = p+1;}
|
851
|
-
#line
|
852
|
-
{( state->act) =
|
853
|
-
goto
|
854
|
-
|
927
|
+
#line 231 "ext/ragel/base_lexer.rl"
|
928
|
+
{( state->act) = 14;}
|
929
|
+
goto st49;
|
930
|
+
tr78:
|
855
931
|
#line 1 "NONE"
|
856
932
|
{te = p+1;}
|
857
|
-
#line
|
858
|
-
{( state->act) =
|
859
|
-
goto
|
860
|
-
|
933
|
+
#line 216 "ext/ragel/base_lexer.rl"
|
934
|
+
{( state->act) = 9;}
|
935
|
+
goto st49;
|
936
|
+
st49:
|
861
937
|
if ( ++p == pe )
|
862
|
-
goto
|
863
|
-
case
|
864
|
-
#line
|
938
|
+
goto _test_eof49;
|
939
|
+
case 49:
|
940
|
+
#line 941 "ext/c/lexer.c"
|
865
941
|
switch( (*p) ) {
|
866
|
-
case 45: goto
|
867
|
-
case 95: goto
|
942
|
+
case 45: goto tr67;
|
943
|
+
case 95: goto tr67;
|
868
944
|
}
|
869
945
|
if ( (*p) < 65 ) {
|
870
946
|
if ( 48 <= (*p) && (*p) <= 57 )
|
871
|
-
goto
|
947
|
+
goto tr67;
|
872
948
|
} else if ( (*p) > 90 ) {
|
873
949
|
if ( 97 <= (*p) && (*p) <= 122 )
|
874
|
-
goto
|
950
|
+
goto tr67;
|
875
951
|
} else
|
876
|
-
goto
|
877
|
-
goto
|
878
|
-
|
952
|
+
goto tr67;
|
953
|
+
goto tr72;
|
954
|
+
st50:
|
879
955
|
if ( ++p == pe )
|
880
|
-
goto
|
881
|
-
case
|
956
|
+
goto _test_eof50;
|
957
|
+
case 50:
|
882
958
|
switch( (*p) ) {
|
883
|
-
case 45: goto
|
884
|
-
case 85: goto
|
885
|
-
case 95: goto
|
959
|
+
case 45: goto tr67;
|
960
|
+
case 85: goto st51;
|
961
|
+
case 95: goto tr67;
|
886
962
|
}
|
887
963
|
if ( (*p) < 65 ) {
|
888
964
|
if ( 48 <= (*p) && (*p) <= 57 )
|
889
|
-
goto
|
965
|
+
goto tr67;
|
890
966
|
} else if ( (*p) > 90 ) {
|
891
967
|
if ( 97 <= (*p) && (*p) <= 122 )
|
892
|
-
goto
|
968
|
+
goto tr67;
|
893
969
|
} else
|
894
|
-
goto
|
895
|
-
goto
|
896
|
-
|
970
|
+
goto tr67;
|
971
|
+
goto tr73;
|
972
|
+
st51:
|
897
973
|
if ( ++p == pe )
|
898
|
-
goto
|
899
|
-
case
|
974
|
+
goto _test_eof51;
|
975
|
+
case 51:
|
900
976
|
switch( (*p) ) {
|
901
|
-
case 45: goto
|
902
|
-
case 66: goto
|
903
|
-
case 95: goto
|
977
|
+
case 45: goto tr67;
|
978
|
+
case 66: goto st52;
|
979
|
+
case 95: goto tr67;
|
904
980
|
}
|
905
981
|
if ( (*p) < 65 ) {
|
906
982
|
if ( 48 <= (*p) && (*p) <= 57 )
|
907
|
-
goto
|
983
|
+
goto tr67;
|
908
984
|
} else if ( (*p) > 90 ) {
|
909
985
|
if ( 97 <= (*p) && (*p) <= 122 )
|
910
|
-
goto
|
986
|
+
goto tr67;
|
911
987
|
} else
|
912
|
-
goto
|
913
|
-
goto
|
914
|
-
|
988
|
+
goto tr67;
|
989
|
+
goto tr73;
|
990
|
+
st52:
|
915
991
|
if ( ++p == pe )
|
916
|
-
goto
|
917
|
-
case
|
992
|
+
goto _test_eof52;
|
993
|
+
case 52:
|
918
994
|
switch( (*p) ) {
|
919
|
-
case 45: goto
|
920
|
-
case 76: goto
|
921
|
-
case 95: goto
|
995
|
+
case 45: goto tr67;
|
996
|
+
case 76: goto st53;
|
997
|
+
case 95: goto tr67;
|
922
998
|
}
|
923
999
|
if ( (*p) < 65 ) {
|
924
1000
|
if ( 48 <= (*p) && (*p) <= 57 )
|
925
|
-
goto
|
1001
|
+
goto tr67;
|
926
1002
|
} else if ( (*p) > 90 ) {
|
927
1003
|
if ( 97 <= (*p) && (*p) <= 122 )
|
928
|
-
goto
|
1004
|
+
goto tr67;
|
929
1005
|
} else
|
930
|
-
goto
|
931
|
-
goto
|
932
|
-
|
1006
|
+
goto tr67;
|
1007
|
+
goto tr73;
|
1008
|
+
st53:
|
933
1009
|
if ( ++p == pe )
|
934
|
-
goto
|
935
|
-
case
|
1010
|
+
goto _test_eof53;
|
1011
|
+
case 53:
|
936
1012
|
switch( (*p) ) {
|
937
|
-
case 45: goto
|
938
|
-
case 73: goto
|
939
|
-
case 95: goto
|
1013
|
+
case 45: goto tr67;
|
1014
|
+
case 73: goto st54;
|
1015
|
+
case 95: goto tr67;
|
940
1016
|
}
|
941
1017
|
if ( (*p) < 65 ) {
|
942
1018
|
if ( 48 <= (*p) && (*p) <= 57 )
|
943
|
-
goto
|
1019
|
+
goto tr67;
|
944
1020
|
} else if ( (*p) > 90 ) {
|
945
1021
|
if ( 97 <= (*p) && (*p) <= 122 )
|
946
|
-
goto
|
1022
|
+
goto tr67;
|
947
1023
|
} else
|
948
|
-
goto
|
949
|
-
goto
|
950
|
-
|
1024
|
+
goto tr67;
|
1025
|
+
goto tr73;
|
1026
|
+
st54:
|
951
1027
|
if ( ++p == pe )
|
952
|
-
goto
|
953
|
-
case
|
1028
|
+
goto _test_eof54;
|
1029
|
+
case 54:
|
954
1030
|
switch( (*p) ) {
|
955
|
-
case 45: goto
|
956
|
-
case 67: goto
|
957
|
-
case 95: goto
|
1031
|
+
case 45: goto tr67;
|
1032
|
+
case 67: goto tr78;
|
1033
|
+
case 95: goto tr67;
|
958
1034
|
}
|
959
1035
|
if ( (*p) < 65 ) {
|
960
1036
|
if ( 48 <= (*p) && (*p) <= 57 )
|
961
|
-
goto
|
1037
|
+
goto tr67;
|
962
1038
|
} else if ( (*p) > 90 ) {
|
963
1039
|
if ( 97 <= (*p) && (*p) <= 122 )
|
964
|
-
goto
|
1040
|
+
goto tr67;
|
965
1041
|
} else
|
966
|
-
goto
|
967
|
-
goto
|
968
|
-
|
1042
|
+
goto tr67;
|
1043
|
+
goto tr73;
|
1044
|
+
st55:
|
969
1045
|
if ( ++p == pe )
|
970
|
-
goto
|
971
|
-
case
|
1046
|
+
goto _test_eof55;
|
1047
|
+
case 55:
|
972
1048
|
switch( (*p) ) {
|
973
|
-
case 45: goto
|
974
|
-
case 89: goto
|
975
|
-
case 95: goto
|
1049
|
+
case 45: goto tr67;
|
1050
|
+
case 89: goto st56;
|
1051
|
+
case 95: goto tr67;
|
976
1052
|
}
|
977
1053
|
if ( (*p) < 65 ) {
|
978
1054
|
if ( 48 <= (*p) && (*p) <= 57 )
|
979
|
-
goto
|
1055
|
+
goto tr67;
|
980
1056
|
} else if ( (*p) > 90 ) {
|
981
1057
|
if ( 97 <= (*p) && (*p) <= 122 )
|
982
|
-
goto
|
1058
|
+
goto tr67;
|
983
1059
|
} else
|
984
|
-
goto
|
985
|
-
goto
|
986
|
-
|
1060
|
+
goto tr67;
|
1061
|
+
goto tr73;
|
1062
|
+
st56:
|
987
1063
|
if ( ++p == pe )
|
988
|
-
goto
|
989
|
-
case
|
1064
|
+
goto _test_eof56;
|
1065
|
+
case 56:
|
990
1066
|
switch( (*p) ) {
|
991
|
-
case 45: goto
|
992
|
-
case 83: goto
|
993
|
-
case 95: goto
|
1067
|
+
case 45: goto tr67;
|
1068
|
+
case 83: goto st57;
|
1069
|
+
case 95: goto tr67;
|
994
1070
|
}
|
995
1071
|
if ( (*p) < 65 ) {
|
996
1072
|
if ( 48 <= (*p) && (*p) <= 57 )
|
997
|
-
goto
|
1073
|
+
goto tr67;
|
998
1074
|
} else if ( (*p) > 90 ) {
|
999
1075
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1000
|
-
goto
|
1076
|
+
goto tr67;
|
1001
1077
|
} else
|
1002
|
-
goto
|
1003
|
-
goto
|
1004
|
-
|
1078
|
+
goto tr67;
|
1079
|
+
goto tr73;
|
1080
|
+
st57:
|
1005
1081
|
if ( ++p == pe )
|
1006
|
-
goto
|
1007
|
-
case
|
1082
|
+
goto _test_eof57;
|
1083
|
+
case 57:
|
1008
1084
|
switch( (*p) ) {
|
1009
|
-
case 45: goto
|
1010
|
-
case 84: goto
|
1011
|
-
case 95: goto
|
1085
|
+
case 45: goto tr67;
|
1086
|
+
case 84: goto st58;
|
1087
|
+
case 95: goto tr67;
|
1012
1088
|
}
|
1013
1089
|
if ( (*p) < 65 ) {
|
1014
1090
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1015
|
-
goto
|
1091
|
+
goto tr67;
|
1016
1092
|
} else if ( (*p) > 90 ) {
|
1017
1093
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1018
|
-
goto
|
1094
|
+
goto tr67;
|
1019
1095
|
} else
|
1020
|
-
goto
|
1021
|
-
goto
|
1022
|
-
|
1096
|
+
goto tr67;
|
1097
|
+
goto tr73;
|
1098
|
+
st58:
|
1023
1099
|
if ( ++p == pe )
|
1024
|
-
goto
|
1025
|
-
case
|
1100
|
+
goto _test_eof58;
|
1101
|
+
case 58:
|
1026
1102
|
switch( (*p) ) {
|
1027
|
-
case 45: goto
|
1028
|
-
case 69: goto
|
1029
|
-
case 95: goto
|
1103
|
+
case 45: goto tr67;
|
1104
|
+
case 69: goto st59;
|
1105
|
+
case 95: goto tr67;
|
1030
1106
|
}
|
1031
1107
|
if ( (*p) < 65 ) {
|
1032
1108
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1033
|
-
goto
|
1109
|
+
goto tr67;
|
1034
1110
|
} else if ( (*p) > 90 ) {
|
1035
1111
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1036
|
-
goto
|
1112
|
+
goto tr67;
|
1037
1113
|
} else
|
1038
|
-
goto
|
1039
|
-
goto
|
1040
|
-
|
1114
|
+
goto tr67;
|
1115
|
+
goto tr73;
|
1116
|
+
st59:
|
1041
1117
|
if ( ++p == pe )
|
1042
|
-
goto
|
1043
|
-
case
|
1118
|
+
goto _test_eof59;
|
1119
|
+
case 59:
|
1044
1120
|
switch( (*p) ) {
|
1045
|
-
case 45: goto
|
1046
|
-
case 77: goto
|
1047
|
-
case 95: goto
|
1121
|
+
case 45: goto tr67;
|
1122
|
+
case 77: goto tr78;
|
1123
|
+
case 95: goto tr67;
|
1048
1124
|
}
|
1049
1125
|
if ( (*p) < 65 ) {
|
1050
1126
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1051
|
-
goto
|
1127
|
+
goto tr67;
|
1052
1128
|
} else if ( (*p) > 90 ) {
|
1053
1129
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1054
|
-
goto
|
1130
|
+
goto tr67;
|
1055
1131
|
} else
|
1056
|
-
goto
|
1057
|
-
goto
|
1058
|
-
|
1059
|
-
|
1060
|
-
goto _test_eof25;
|
1061
|
-
case 25:
|
1062
|
-
goto st26;
|
1063
|
-
st26:
|
1064
|
-
if ( ++p == pe )
|
1065
|
-
goto _test_eof26;
|
1066
|
-
case 26:
|
1067
|
-
if ( (*p) == 93 )
|
1068
|
-
goto tr30;
|
1069
|
-
goto st26;
|
1070
|
-
tr74:
|
1071
|
-
#line 244 "ext/ragel/base_lexer.rl"
|
1132
|
+
goto tr67;
|
1133
|
+
goto tr73;
|
1134
|
+
tr83:
|
1135
|
+
#line 268 "ext/ragel/base_lexer.rl"
|
1072
1136
|
{te = p+1;}
|
1073
|
-
goto
|
1074
|
-
|
1075
|
-
#line
|
1137
|
+
goto st60;
|
1138
|
+
tr84:
|
1139
|
+
#line 154 "ext/ragel/base_lexer.rl"
|
1076
1140
|
{te = p+1;{
|
1077
|
-
callback_simple(
|
1141
|
+
callback_simple(id_on_string_dquote);
|
1078
1142
|
|
1079
|
-
{( state->stack)[( state->top)++] =
|
1143
|
+
{( state->stack)[( state->top)++] = 60; goto st44;}
|
1080
1144
|
}}
|
1081
|
-
goto
|
1082
|
-
|
1083
|
-
#line
|
1145
|
+
goto st60;
|
1146
|
+
tr85:
|
1147
|
+
#line 148 "ext/ragel/base_lexer.rl"
|
1084
1148
|
{te = p+1;{
|
1085
|
-
callback_simple(
|
1149
|
+
callback_simple(id_on_string_squote);
|
1086
1150
|
|
1087
|
-
{( state->stack)[( state->top)++] =
|
1151
|
+
{( state->stack)[( state->top)++] = 60; goto st42;}
|
1088
1152
|
}}
|
1089
|
-
goto
|
1090
|
-
|
1091
|
-
#line
|
1153
|
+
goto st60;
|
1154
|
+
tr88:
|
1155
|
+
#line 261 "ext/ragel/base_lexer.rl"
|
1092
1156
|
{te = p;p--;{
|
1093
|
-
callback(
|
1157
|
+
callback(id_on_attribute, data, encoding, ts, te);
|
1094
1158
|
}}
|
1095
|
-
goto
|
1096
|
-
|
1097
|
-
#line
|
1159
|
+
goto st60;
|
1160
|
+
tr89:
|
1161
|
+
#line 268 "ext/ragel/base_lexer.rl"
|
1098
1162
|
{te = p;p--;}
|
1099
|
-
goto
|
1100
|
-
|
1101
|
-
( state->cs) =
|
1102
|
-
#line
|
1163
|
+
goto st60;
|
1164
|
+
tr90:
|
1165
|
+
( state->cs) = 60;
|
1166
|
+
#line 255 "ext/ragel/base_lexer.rl"
|
1103
1167
|
{te = p+1;{
|
1104
|
-
callback_simple(
|
1105
|
-
( state->cs) =
|
1168
|
+
callback_simple(id_on_xml_decl_end);
|
1169
|
+
( state->cs) = 34;
|
1106
1170
|
}}
|
1107
1171
|
goto _again;
|
1108
|
-
|
1172
|
+
st60:
|
1109
1173
|
#line 1 "NONE"
|
1110
1174
|
{ts = 0;}
|
1111
1175
|
if ( ++p == pe )
|
1112
|
-
goto
|
1113
|
-
case
|
1176
|
+
goto _test_eof60;
|
1177
|
+
case 60:
|
1114
1178
|
#line 1 "NONE"
|
1115
1179
|
{ts = p;}
|
1116
|
-
#line
|
1180
|
+
#line 1181 "ext/c/lexer.c"
|
1117
1181
|
switch( (*p) ) {
|
1118
|
-
case 34: goto
|
1119
|
-
case 39: goto
|
1120
|
-
case 45: goto
|
1121
|
-
case 63: goto
|
1122
|
-
case 95: goto
|
1182
|
+
case 34: goto tr84;
|
1183
|
+
case 39: goto tr85;
|
1184
|
+
case 45: goto st61;
|
1185
|
+
case 63: goto st62;
|
1186
|
+
case 95: goto st61;
|
1123
1187
|
}
|
1124
1188
|
if ( (*p) < 65 ) {
|
1125
1189
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1126
|
-
goto
|
1190
|
+
goto st61;
|
1127
1191
|
} else if ( (*p) > 90 ) {
|
1128
1192
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1129
|
-
goto
|
1193
|
+
goto st61;
|
1130
1194
|
} else
|
1131
|
-
goto
|
1132
|
-
goto
|
1133
|
-
|
1195
|
+
goto st61;
|
1196
|
+
goto tr83;
|
1197
|
+
st61:
|
1134
1198
|
if ( ++p == pe )
|
1135
|
-
goto
|
1136
|
-
case
|
1199
|
+
goto _test_eof61;
|
1200
|
+
case 61:
|
1137
1201
|
switch( (*p) ) {
|
1138
|
-
case 45: goto
|
1139
|
-
case 95: goto
|
1202
|
+
case 45: goto st61;
|
1203
|
+
case 95: goto st61;
|
1140
1204
|
}
|
1141
1205
|
if ( (*p) < 65 ) {
|
1142
1206
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1143
|
-
goto
|
1207
|
+
goto st61;
|
1144
1208
|
} else if ( (*p) > 90 ) {
|
1145
1209
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1146
|
-
goto
|
1210
|
+
goto st61;
|
1147
1211
|
} else
|
1148
|
-
goto
|
1149
|
-
goto
|
1150
|
-
|
1212
|
+
goto st61;
|
1213
|
+
goto tr88;
|
1214
|
+
st62:
|
1151
1215
|
if ( ++p == pe )
|
1152
|
-
goto
|
1153
|
-
case
|
1216
|
+
goto _test_eof62;
|
1217
|
+
case 62:
|
1154
1218
|
if ( (*p) == 62 )
|
1155
|
-
goto
|
1156
|
-
goto
|
1157
|
-
|
1158
|
-
( state->cs) =
|
1159
|
-
#line
|
1219
|
+
goto tr90;
|
1220
|
+
goto tr89;
|
1221
|
+
tr92:
|
1222
|
+
( state->cs) = 63;
|
1223
|
+
#line 299 "ext/ragel/base_lexer.rl"
|
1160
1224
|
{te = p;p--;{
|
1161
|
-
callback(
|
1162
|
-
( state->cs) =
|
1225
|
+
callback(id_on_element_name, data, encoding, ts, te);
|
1226
|
+
( state->cs) = 65;
|
1163
1227
|
}}
|
1164
1228
|
goto _again;
|
1165
|
-
|
1166
|
-
#line
|
1229
|
+
tr93:
|
1230
|
+
#line 295 "ext/ragel/base_lexer.rl"
|
1167
1231
|
{te = p+1;{
|
1168
|
-
callback(
|
1232
|
+
callback(id_on_element_ns, data, encoding, ts, te - 1);
|
1169
1233
|
}}
|
1170
|
-
goto
|
1171
|
-
|
1234
|
+
goto st63;
|
1235
|
+
st63:
|
1172
1236
|
#line 1 "NONE"
|
1173
1237
|
{ts = 0;}
|
1174
1238
|
if ( ++p == pe )
|
1175
|
-
goto
|
1176
|
-
case
|
1239
|
+
goto _test_eof63;
|
1240
|
+
case 63:
|
1177
1241
|
#line 1 "NONE"
|
1178
1242
|
{ts = p;}
|
1179
|
-
#line
|
1243
|
+
#line 1244 "ext/c/lexer.c"
|
1180
1244
|
switch( (*p) ) {
|
1181
|
-
case 45: goto
|
1182
|
-
case 95: goto
|
1245
|
+
case 45: goto st64;
|
1246
|
+
case 95: goto st64;
|
1183
1247
|
}
|
1184
1248
|
if ( (*p) < 65 ) {
|
1185
1249
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1186
|
-
goto
|
1250
|
+
goto st64;
|
1187
1251
|
} else if ( (*p) > 90 ) {
|
1188
1252
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1189
|
-
goto
|
1253
|
+
goto st64;
|
1190
1254
|
} else
|
1191
|
-
goto
|
1255
|
+
goto st64;
|
1192
1256
|
goto st0;
|
1193
|
-
|
1257
|
+
st64:
|
1194
1258
|
if ( ++p == pe )
|
1195
|
-
goto
|
1196
|
-
case
|
1259
|
+
goto _test_eof64;
|
1260
|
+
case 64:
|
1197
1261
|
switch( (*p) ) {
|
1198
|
-
case 45: goto
|
1199
|
-
case 58: goto
|
1200
|
-
case 95: goto
|
1262
|
+
case 45: goto st64;
|
1263
|
+
case 58: goto tr93;
|
1264
|
+
case 95: goto st64;
|
1201
1265
|
}
|
1202
1266
|
if ( (*p) < 65 ) {
|
1203
1267
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1204
|
-
goto
|
1268
|
+
goto st64;
|
1205
1269
|
} else if ( (*p) > 90 ) {
|
1206
1270
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1207
|
-
goto
|
1271
|
+
goto st64;
|
1208
1272
|
} else
|
1209
|
-
goto
|
1210
|
-
goto
|
1211
|
-
|
1212
|
-
#line
|
1273
|
+
goto st64;
|
1274
|
+
goto tr92;
|
1275
|
+
tr29:
|
1276
|
+
#line 310 "ext/ragel/base_lexer.rl"
|
1213
1277
|
{te = p+1;{
|
1214
|
-
callback_simple(
|
1278
|
+
callback_simple(id_advance_line);
|
1215
1279
|
}}
|
1216
|
-
goto
|
1217
|
-
|
1218
|
-
( state->cs) =
|
1219
|
-
#line
|
1280
|
+
goto st65;
|
1281
|
+
tr31:
|
1282
|
+
( state->cs) = 65;
|
1283
|
+
#line 344 "ext/ragel/base_lexer.rl"
|
1220
1284
|
{te = p+1;{
|
1221
|
-
callback_simple(
|
1222
|
-
( state->cs) =
|
1285
|
+
callback_simple(id_on_element_end);
|
1286
|
+
( state->cs) = 34;
|
1223
1287
|
}}
|
1224
1288
|
goto _again;
|
1225
|
-
|
1226
|
-
#line
|
1289
|
+
tr94:
|
1290
|
+
#line 308 "ext/ragel/base_lexer.rl"
|
1227
1291
|
{te = p+1;}
|
1228
|
-
goto
|
1229
|
-
|
1230
|
-
#line
|
1292
|
+
goto st65;
|
1293
|
+
tr96:
|
1294
|
+
#line 154 "ext/ragel/base_lexer.rl"
|
1231
1295
|
{te = p+1;{
|
1232
|
-
callback_simple(
|
1296
|
+
callback_simple(id_on_string_dquote);
|
1233
1297
|
|
1234
|
-
{( state->stack)[( state->top)++] =
|
1298
|
+
{( state->stack)[( state->top)++] = 65; goto st44;}
|
1235
1299
|
}}
|
1236
|
-
goto
|
1237
|
-
|
1238
|
-
#line
|
1300
|
+
goto st65;
|
1301
|
+
tr97:
|
1302
|
+
#line 148 "ext/ragel/base_lexer.rl"
|
1239
1303
|
{te = p+1;{
|
1240
|
-
callback_simple(
|
1304
|
+
callback_simple(id_on_string_squote);
|
1241
1305
|
|
1242
|
-
{( state->stack)[( state->top)++] =
|
1306
|
+
{( state->stack)[( state->top)++] = 65; goto st42;}
|
1243
1307
|
}}
|
1244
|
-
goto
|
1245
|
-
|
1246
|
-
( state->cs) =
|
1247
|
-
#line
|
1308
|
+
goto st65;
|
1309
|
+
tr100:
|
1310
|
+
( state->cs) = 65;
|
1311
|
+
#line 328 "ext/ragel/base_lexer.rl"
|
1248
1312
|
{te = p+1;{
|
1249
|
-
callback_simple(
|
1250
|
-
|
1313
|
+
callback_simple(id_on_element_open_end);
|
1314
|
+
|
1315
|
+
if ( inside_html_script_p() )
|
1316
|
+
{
|
1317
|
+
mark = ts + 1;
|
1318
|
+
|
1319
|
+
( state->cs) = 71;
|
1320
|
+
}
|
1321
|
+
else
|
1322
|
+
{
|
1323
|
+
( state->cs) = 34;
|
1324
|
+
}
|
1251
1325
|
}}
|
1252
1326
|
goto _again;
|
1253
|
-
|
1254
|
-
#line
|
1327
|
+
tr101:
|
1328
|
+
#line 319 "ext/ragel/base_lexer.rl"
|
1255
1329
|
{te = p;p--;{
|
1256
|
-
callback(
|
1330
|
+
callback(id_on_attribute, data, encoding, ts, te);
|
1257
1331
|
}}
|
1258
|
-
goto
|
1259
|
-
|
1260
|
-
#line
|
1332
|
+
goto st65;
|
1333
|
+
tr102:
|
1334
|
+
#line 315 "ext/ragel/base_lexer.rl"
|
1261
1335
|
{te = p+1;{
|
1262
|
-
callback(
|
1336
|
+
callback(id_on_attribute_ns, data, encoding, ts, te - 1);
|
1263
1337
|
}}
|
1264
|
-
goto
|
1265
|
-
|
1338
|
+
goto st65;
|
1339
|
+
st65:
|
1266
1340
|
#line 1 "NONE"
|
1267
1341
|
{ts = 0;}
|
1268
1342
|
if ( ++p == pe )
|
1269
|
-
goto
|
1270
|
-
case
|
1343
|
+
goto _test_eof65;
|
1344
|
+
case 65:
|
1271
1345
|
#line 1 "NONE"
|
1272
1346
|
{ts = p;}
|
1273
|
-
#line
|
1347
|
+
#line 1348 "ext/c/lexer.c"
|
1274
1348
|
switch( (*p) ) {
|
1275
|
-
case 9: goto
|
1276
|
-
case 10: goto
|
1277
|
-
case 13: goto
|
1278
|
-
case 32: goto
|
1279
|
-
case 34: goto
|
1280
|
-
case 39: goto
|
1281
|
-
case 45: goto
|
1282
|
-
case 47: goto
|
1283
|
-
case 61: goto
|
1284
|
-
case 62: goto
|
1285
|
-
case 95: goto
|
1349
|
+
case 9: goto tr94;
|
1350
|
+
case 10: goto tr29;
|
1351
|
+
case 13: goto st25;
|
1352
|
+
case 32: goto tr94;
|
1353
|
+
case 34: goto tr96;
|
1354
|
+
case 39: goto tr97;
|
1355
|
+
case 45: goto st66;
|
1356
|
+
case 47: goto st26;
|
1357
|
+
case 61: goto tr94;
|
1358
|
+
case 62: goto tr100;
|
1359
|
+
case 95: goto st66;
|
1286
1360
|
}
|
1287
1361
|
if ( (*p) < 65 ) {
|
1288
1362
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1289
|
-
goto
|
1363
|
+
goto st66;
|
1290
1364
|
} else if ( (*p) > 90 ) {
|
1291
1365
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1292
|
-
goto
|
1366
|
+
goto st66;
|
1293
1367
|
} else
|
1294
|
-
goto
|
1368
|
+
goto st66;
|
1295
1369
|
goto st0;
|
1296
|
-
|
1370
|
+
st25:
|
1297
1371
|
if ( ++p == pe )
|
1298
|
-
goto
|
1299
|
-
case
|
1372
|
+
goto _test_eof25;
|
1373
|
+
case 25:
|
1300
1374
|
if ( (*p) == 10 )
|
1301
|
-
goto
|
1375
|
+
goto tr29;
|
1302
1376
|
goto st0;
|
1303
|
-
|
1377
|
+
st66:
|
1304
1378
|
if ( ++p == pe )
|
1305
|
-
goto
|
1306
|
-
case
|
1379
|
+
goto _test_eof66;
|
1380
|
+
case 66:
|
1307
1381
|
switch( (*p) ) {
|
1308
|
-
case 45: goto
|
1309
|
-
case 58: goto
|
1310
|
-
case 95: goto
|
1382
|
+
case 45: goto st66;
|
1383
|
+
case 58: goto tr102;
|
1384
|
+
case 95: goto st66;
|
1311
1385
|
}
|
1312
1386
|
if ( (*p) < 65 ) {
|
1313
1387
|
if ( 48 <= (*p) && (*p) <= 57 )
|
1314
|
-
goto
|
1388
|
+
goto st66;
|
1315
1389
|
} else if ( (*p) > 90 ) {
|
1316
1390
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1317
|
-
goto
|
1391
|
+
goto st66;
|
1318
1392
|
} else
|
1319
|
-
goto
|
1320
|
-
goto
|
1321
|
-
|
1393
|
+
goto st66;
|
1394
|
+
goto tr101;
|
1395
|
+
st26:
|
1322
1396
|
if ( ++p == pe )
|
1323
|
-
goto
|
1324
|
-
case
|
1397
|
+
goto _test_eof26;
|
1398
|
+
case 26:
|
1325
1399
|
if ( (*p) == 62 )
|
1326
|
-
goto
|
1400
|
+
goto tr31;
|
1327
1401
|
goto st0;
|
1328
|
-
|
1329
|
-
( state->cs) =
|
1330
|
-
#line
|
1402
|
+
tr105:
|
1403
|
+
( state->cs) = 67;
|
1404
|
+
#line 373 "ext/ragel/base_lexer.rl"
|
1331
1405
|
{te = p;p--;{
|
1332
|
-
callback(
|
1406
|
+
callback(id_on_text, data, encoding, ts, te);
|
1333
1407
|
|
1334
1408
|
if ( lines > 0 )
|
1335
1409
|
{
|
@@ -1338,14 +1412,14 @@ tr96:
|
|
1338
1412
|
lines = 0;
|
1339
1413
|
}
|
1340
1414
|
|
1341
|
-
( state->cs) =
|
1415
|
+
( state->cs) = 34;
|
1342
1416
|
}}
|
1343
1417
|
goto _again;
|
1344
|
-
|
1345
|
-
( state->cs) =
|
1346
|
-
#line
|
1418
|
+
tr107:
|
1419
|
+
( state->cs) = 67;
|
1420
|
+
#line 387 "ext/ragel/base_lexer.rl"
|
1347
1421
|
{te = p+1;{
|
1348
|
-
callback(
|
1422
|
+
callback(id_on_text, data, encoding, ts, mark);
|
1349
1423
|
|
1350
1424
|
p = mark - 1;
|
1351
1425
|
mark = 0;
|
@@ -1357,14 +1431,14 @@ tr98:
|
|
1357
1431
|
lines = 0;
|
1358
1432
|
}
|
1359
1433
|
|
1360
|
-
( state->cs) =
|
1434
|
+
( state->cs) = 34;
|
1361
1435
|
}}
|
1362
1436
|
goto _again;
|
1363
|
-
|
1364
|
-
( state->cs) =
|
1365
|
-
#line
|
1437
|
+
tr108:
|
1438
|
+
( state->cs) = 67;
|
1439
|
+
#line 373 "ext/ragel/base_lexer.rl"
|
1366
1440
|
{te = p+1;{
|
1367
|
-
callback(
|
1441
|
+
callback(id_on_text, data, encoding, ts, te);
|
1368
1442
|
|
1369
1443
|
if ( lines > 0 )
|
1370
1444
|
{
|
@@ -1373,96 +1447,209 @@ tr99:
|
|
1373
1447
|
lines = 0;
|
1374
1448
|
}
|
1375
1449
|
|
1376
|
-
( state->cs) =
|
1450
|
+
( state->cs) = 34;
|
1377
1451
|
}}
|
1378
1452
|
goto _again;
|
1379
|
-
|
1453
|
+
st67:
|
1380
1454
|
#line 1 "NONE"
|
1381
1455
|
{ts = 0;}
|
1382
1456
|
if ( ++p == pe )
|
1383
|
-
goto
|
1384
|
-
case
|
1457
|
+
goto _test_eof67;
|
1458
|
+
case 67:
|
1385
1459
|
#line 1 "NONE"
|
1386
1460
|
{ts = p;}
|
1387
|
-
#line
|
1461
|
+
#line 1462 "ext/c/lexer.c"
|
1388
1462
|
if ( (*p) == 60 )
|
1389
|
-
goto
|
1390
|
-
goto
|
1391
|
-
|
1392
|
-
#line
|
1463
|
+
goto tr104;
|
1464
|
+
goto tr103;
|
1465
|
+
tr103:
|
1466
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
1393
1467
|
{
|
1394
1468
|
if ( (*p) == '\n' ) lines++;
|
1395
1469
|
}
|
1396
|
-
goto
|
1397
|
-
|
1470
|
+
goto st68;
|
1471
|
+
st68:
|
1398
1472
|
if ( ++p == pe )
|
1399
|
-
goto
|
1400
|
-
case
|
1401
|
-
#line
|
1473
|
+
goto _test_eof68;
|
1474
|
+
case 68:
|
1475
|
+
#line 1476 "ext/c/lexer.c"
|
1402
1476
|
if ( (*p) == 60 )
|
1403
|
-
goto
|
1404
|
-
goto
|
1405
|
-
|
1406
|
-
#line
|
1477
|
+
goto tr106;
|
1478
|
+
goto tr103;
|
1479
|
+
tr106:
|
1480
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
1407
1481
|
{
|
1408
1482
|
if ( (*p) == '\n' ) lines++;
|
1409
1483
|
}
|
1410
|
-
#line
|
1484
|
+
#line 387 "ext/ragel/base_lexer.rl"
|
1411
1485
|
{ mark = p; }
|
1412
|
-
goto
|
1413
|
-
|
1486
|
+
goto st69;
|
1487
|
+
st69:
|
1414
1488
|
if ( ++p == pe )
|
1415
|
-
goto
|
1416
|
-
case
|
1417
|
-
#line
|
1489
|
+
goto _test_eof69;
|
1490
|
+
case 69:
|
1491
|
+
#line 1492 "ext/c/lexer.c"
|
1418
1492
|
switch( (*p) ) {
|
1419
|
-
case 33: goto
|
1420
|
-
case 45: goto
|
1421
|
-
case 60: goto
|
1422
|
-
case 63: goto
|
1423
|
-
case 95: goto
|
1493
|
+
case 33: goto tr107;
|
1494
|
+
case 45: goto tr107;
|
1495
|
+
case 60: goto tr106;
|
1496
|
+
case 63: goto tr107;
|
1497
|
+
case 95: goto tr107;
|
1424
1498
|
}
|
1425
1499
|
if ( (*p) < 65 ) {
|
1426
1500
|
if ( 47 <= (*p) && (*p) <= 57 )
|
1427
|
-
goto
|
1501
|
+
goto tr107;
|
1428
1502
|
} else if ( (*p) > 90 ) {
|
1429
1503
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1430
|
-
goto
|
1504
|
+
goto tr107;
|
1431
1505
|
} else
|
1432
|
-
goto
|
1433
|
-
goto
|
1434
|
-
|
1435
|
-
#line
|
1506
|
+
goto tr107;
|
1507
|
+
goto tr103;
|
1508
|
+
tr104:
|
1509
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
1436
1510
|
{
|
1437
1511
|
if ( (*p) == '\n' ) lines++;
|
1438
1512
|
}
|
1439
|
-
#line
|
1513
|
+
#line 387 "ext/ragel/base_lexer.rl"
|
1440
1514
|
{ mark = p; }
|
1441
|
-
goto
|
1442
|
-
|
1515
|
+
goto st70;
|
1516
|
+
st70:
|
1443
1517
|
if ( ++p == pe )
|
1444
|
-
goto
|
1445
|
-
case
|
1446
|
-
#line
|
1518
|
+
goto _test_eof70;
|
1519
|
+
case 70:
|
1520
|
+
#line 1521 "ext/c/lexer.c"
|
1447
1521
|
switch( (*p) ) {
|
1448
|
-
case 33: goto
|
1449
|
-
case 45: goto
|
1450
|
-
case 60: goto
|
1451
|
-
case 63: goto
|
1452
|
-
case 95: goto
|
1522
|
+
case 33: goto tr108;
|
1523
|
+
case 45: goto tr108;
|
1524
|
+
case 60: goto tr106;
|
1525
|
+
case 63: goto tr108;
|
1526
|
+
case 95: goto tr108;
|
1453
1527
|
}
|
1454
1528
|
if ( (*p) < 65 ) {
|
1455
1529
|
if ( 47 <= (*p) && (*p) <= 57 )
|
1456
|
-
goto
|
1530
|
+
goto tr108;
|
1457
1531
|
} else if ( (*p) > 90 ) {
|
1458
1532
|
if ( 97 <= (*p) && (*p) <= 122 )
|
1459
|
-
goto
|
1533
|
+
goto tr108;
|
1460
1534
|
} else
|
1461
|
-
goto
|
1462
|
-
goto
|
1535
|
+
goto tr108;
|
1536
|
+
goto tr103;
|
1537
|
+
tr32:
|
1538
|
+
#line 425 "ext/ragel/base_lexer.rl"
|
1539
|
+
{{p = ((te))-1;}}
|
1540
|
+
goto st71;
|
1541
|
+
tr39:
|
1542
|
+
( state->cs) = 71;
|
1543
|
+
#line 408 "ext/ragel/base_lexer.rl"
|
1544
|
+
{te = p+1;{
|
1545
|
+
callback(id_on_text, data, encoding, mark, ts);
|
1546
|
+
|
1547
|
+
mark = 0;
|
1548
|
+
|
1549
|
+
if ( lines > 0 )
|
1550
|
+
{
|
1551
|
+
advance_line(lines);
|
1552
|
+
|
1553
|
+
lines = 0;
|
1554
|
+
}
|
1555
|
+
|
1556
|
+
callback_simple(id_on_element_end);
|
1557
|
+
|
1558
|
+
( state->cs) = 34;
|
1559
|
+
}}
|
1560
|
+
goto _again;
|
1561
|
+
tr109:
|
1562
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
1563
|
+
{
|
1564
|
+
if ( (*p) == '\n' ) lines++;
|
1565
|
+
}
|
1566
|
+
#line 425 "ext/ragel/base_lexer.rl"
|
1567
|
+
{te = p+1;}
|
1568
|
+
goto st71;
|
1569
|
+
tr111:
|
1570
|
+
#line 425 "ext/ragel/base_lexer.rl"
|
1571
|
+
{te = p;p--;}
|
1572
|
+
goto st71;
|
1573
|
+
st71:
|
1574
|
+
#line 1 "NONE"
|
1575
|
+
{ts = 0;}
|
1576
|
+
if ( ++p == pe )
|
1577
|
+
goto _test_eof71;
|
1578
|
+
case 71:
|
1579
|
+
#line 1 "NONE"
|
1580
|
+
{ts = p;}
|
1581
|
+
#line 1582 "ext/c/lexer.c"
|
1582
|
+
if ( (*p) == 60 )
|
1583
|
+
goto tr110;
|
1584
|
+
goto tr109;
|
1585
|
+
tr110:
|
1586
|
+
#line 1 "NONE"
|
1587
|
+
{te = p+1;}
|
1588
|
+
#line 51 "ext/ragel/base_lexer.rl"
|
1589
|
+
{
|
1590
|
+
if ( (*p) == '\n' ) lines++;
|
1591
|
+
}
|
1592
|
+
goto st72;
|
1593
|
+
st72:
|
1594
|
+
if ( ++p == pe )
|
1595
|
+
goto _test_eof72;
|
1596
|
+
case 72:
|
1597
|
+
#line 1598 "ext/c/lexer.c"
|
1598
|
+
if ( (*p) == 47 )
|
1599
|
+
goto st27;
|
1600
|
+
goto tr111;
|
1601
|
+
st27:
|
1602
|
+
if ( ++p == pe )
|
1603
|
+
goto _test_eof27;
|
1604
|
+
case 27:
|
1605
|
+
if ( (*p) == 115 )
|
1606
|
+
goto st28;
|
1607
|
+
goto tr32;
|
1608
|
+
st28:
|
1609
|
+
if ( ++p == pe )
|
1610
|
+
goto _test_eof28;
|
1611
|
+
case 28:
|
1612
|
+
if ( (*p) == 99 )
|
1613
|
+
goto st29;
|
1614
|
+
goto tr32;
|
1615
|
+
st29:
|
1616
|
+
if ( ++p == pe )
|
1617
|
+
goto _test_eof29;
|
1618
|
+
case 29:
|
1619
|
+
if ( (*p) == 114 )
|
1620
|
+
goto st30;
|
1621
|
+
goto tr32;
|
1622
|
+
st30:
|
1623
|
+
if ( ++p == pe )
|
1624
|
+
goto _test_eof30;
|
1625
|
+
case 30:
|
1626
|
+
if ( (*p) == 105 )
|
1627
|
+
goto st31;
|
1628
|
+
goto tr32;
|
1629
|
+
st31:
|
1630
|
+
if ( ++p == pe )
|
1631
|
+
goto _test_eof31;
|
1632
|
+
case 31:
|
1633
|
+
if ( (*p) == 112 )
|
1634
|
+
goto st32;
|
1635
|
+
goto tr32;
|
1636
|
+
st32:
|
1637
|
+
if ( ++p == pe )
|
1638
|
+
goto _test_eof32;
|
1639
|
+
case 32:
|
1640
|
+
if ( (*p) == 116 )
|
1641
|
+
goto st33;
|
1642
|
+
goto tr32;
|
1643
|
+
st33:
|
1644
|
+
if ( ++p == pe )
|
1645
|
+
goto _test_eof33;
|
1646
|
+
case 33:
|
1647
|
+
if ( (*p) == 62 )
|
1648
|
+
goto tr39;
|
1649
|
+
goto tr32;
|
1463
1650
|
}
|
1464
|
-
|
1465
|
-
|
1651
|
+
_test_eof34: ( state->cs) = 34; goto _test_eof;
|
1652
|
+
_test_eof35: ( state->cs) = 35; goto _test_eof;
|
1466
1653
|
_test_eof1: ( state->cs) = 1; goto _test_eof;
|
1467
1654
|
_test_eof2: ( state->cs) = 2; goto _test_eof;
|
1468
1655
|
_test_eof3: ( state->cs) = 3; goto _test_eof;
|
@@ -1475,7 +1662,7 @@ case 63:
|
|
1475
1662
|
_test_eof10: ( state->cs) = 10; goto _test_eof;
|
1476
1663
|
_test_eof11: ( state->cs) = 11; goto _test_eof;
|
1477
1664
|
_test_eof12: ( state->cs) = 12; goto _test_eof;
|
1478
|
-
|
1665
|
+
_test_eof36: ( state->cs) = 36; goto _test_eof;
|
1479
1666
|
_test_eof13: ( state->cs) = 13; goto _test_eof;
|
1480
1667
|
_test_eof14: ( state->cs) = 14; goto _test_eof;
|
1481
1668
|
_test_eof15: ( state->cs) = 15; goto _test_eof;
|
@@ -1488,11 +1675,6 @@ case 63:
|
|
1488
1675
|
_test_eof22: ( state->cs) = 22; goto _test_eof;
|
1489
1676
|
_test_eof23: ( state->cs) = 23; goto _test_eof;
|
1490
1677
|
_test_eof24: ( state->cs) = 24; goto _test_eof;
|
1491
|
-
_test_eof32: ( state->cs) = 32; goto _test_eof;
|
1492
|
-
_test_eof33: ( state->cs) = 33; goto _test_eof;
|
1493
|
-
_test_eof34: ( state->cs) = 34; goto _test_eof;
|
1494
|
-
_test_eof35: ( state->cs) = 35; goto _test_eof;
|
1495
|
-
_test_eof36: ( state->cs) = 36; goto _test_eof;
|
1496
1678
|
_test_eof37: ( state->cs) = 37; goto _test_eof;
|
1497
1679
|
_test_eof38: ( state->cs) = 38; goto _test_eof;
|
1498
1680
|
_test_eof39: ( state->cs) = 39; goto _test_eof;
|
@@ -1509,27 +1691,41 @@ case 63:
|
|
1509
1691
|
_test_eof50: ( state->cs) = 50; goto _test_eof;
|
1510
1692
|
_test_eof51: ( state->cs) = 51; goto _test_eof;
|
1511
1693
|
_test_eof52: ( state->cs) = 52; goto _test_eof;
|
1512
|
-
_test_eof25: ( state->cs) = 25; goto _test_eof;
|
1513
|
-
_test_eof26: ( state->cs) = 26; goto _test_eof;
|
1514
1694
|
_test_eof53: ( state->cs) = 53; goto _test_eof;
|
1515
1695
|
_test_eof54: ( state->cs) = 54; goto _test_eof;
|
1516
1696
|
_test_eof55: ( state->cs) = 55; goto _test_eof;
|
1517
1697
|
_test_eof56: ( state->cs) = 56; goto _test_eof;
|
1518
1698
|
_test_eof57: ( state->cs) = 57; goto _test_eof;
|
1519
1699
|
_test_eof58: ( state->cs) = 58; goto _test_eof;
|
1520
|
-
_test_eof27: ( state->cs) = 27; goto _test_eof;
|
1521
1700
|
_test_eof59: ( state->cs) = 59; goto _test_eof;
|
1522
|
-
_test_eof28: ( state->cs) = 28; goto _test_eof;
|
1523
1701
|
_test_eof60: ( state->cs) = 60; goto _test_eof;
|
1524
1702
|
_test_eof61: ( state->cs) = 61; goto _test_eof;
|
1525
1703
|
_test_eof62: ( state->cs) = 62; goto _test_eof;
|
1526
1704
|
_test_eof63: ( state->cs) = 63; goto _test_eof;
|
1705
|
+
_test_eof64: ( state->cs) = 64; goto _test_eof;
|
1706
|
+
_test_eof65: ( state->cs) = 65; goto _test_eof;
|
1707
|
+
_test_eof25: ( state->cs) = 25; goto _test_eof;
|
1708
|
+
_test_eof66: ( state->cs) = 66; goto _test_eof;
|
1709
|
+
_test_eof26: ( state->cs) = 26; goto _test_eof;
|
1710
|
+
_test_eof67: ( state->cs) = 67; goto _test_eof;
|
1711
|
+
_test_eof68: ( state->cs) = 68; goto _test_eof;
|
1712
|
+
_test_eof69: ( state->cs) = 69; goto _test_eof;
|
1713
|
+
_test_eof70: ( state->cs) = 70; goto _test_eof;
|
1714
|
+
_test_eof71: ( state->cs) = 71; goto _test_eof;
|
1715
|
+
_test_eof72: ( state->cs) = 72; goto _test_eof;
|
1716
|
+
_test_eof27: ( state->cs) = 27; goto _test_eof;
|
1717
|
+
_test_eof28: ( state->cs) = 28; goto _test_eof;
|
1718
|
+
_test_eof29: ( state->cs) = 29; goto _test_eof;
|
1719
|
+
_test_eof30: ( state->cs) = 30; goto _test_eof;
|
1720
|
+
_test_eof31: ( state->cs) = 31; goto _test_eof;
|
1721
|
+
_test_eof32: ( state->cs) = 32; goto _test_eof;
|
1722
|
+
_test_eof33: ( state->cs) = 33; goto _test_eof;
|
1527
1723
|
|
1528
1724
|
_test_eof: {}
|
1529
1725
|
if ( p == eof )
|
1530
1726
|
{
|
1531
1727
|
switch ( ( state->cs) ) {
|
1532
|
-
case
|
1728
|
+
case 35: goto tr42;
|
1533
1729
|
case 1: goto tr0;
|
1534
1730
|
case 2: goto tr0;
|
1535
1731
|
case 3: goto tr0;
|
@@ -1542,7 +1738,7 @@ case 63:
|
|
1542
1738
|
case 10: goto tr0;
|
1543
1739
|
case 11: goto tr0;
|
1544
1740
|
case 12: goto tr0;
|
1545
|
-
case
|
1741
|
+
case 36: goto tr46;
|
1546
1742
|
case 13: goto tr0;
|
1547
1743
|
case 14: goto tr0;
|
1548
1744
|
case 15: goto tr0;
|
@@ -1555,37 +1751,46 @@ case 63:
|
|
1555
1751
|
case 22: goto tr0;
|
1556
1752
|
case 23: goto tr0;
|
1557
1753
|
case 24: goto tr0;
|
1558
|
-
case
|
1559
|
-
case
|
1560
|
-
case
|
1561
|
-
case
|
1562
|
-
case
|
1563
|
-
case
|
1564
|
-
case
|
1565
|
-
case
|
1566
|
-
case
|
1567
|
-
case
|
1568
|
-
case
|
1569
|
-
case
|
1570
|
-
case
|
1571
|
-
case
|
1572
|
-
case
|
1573
|
-
case
|
1574
|
-
case
|
1575
|
-
case
|
1576
|
-
case
|
1577
|
-
case
|
1578
|
-
case
|
1579
|
-
case
|
1580
|
-
case
|
1581
|
-
case
|
1754
|
+
case 37: goto tr47;
|
1755
|
+
case 38: goto tr48;
|
1756
|
+
case 39: goto tr48;
|
1757
|
+
case 41: goto tr53;
|
1758
|
+
case 43: goto tr57;
|
1759
|
+
case 45: goto tr60;
|
1760
|
+
case 47: goto tr63;
|
1761
|
+
case 49: goto tr72;
|
1762
|
+
case 50: goto tr73;
|
1763
|
+
case 51: goto tr73;
|
1764
|
+
case 52: goto tr73;
|
1765
|
+
case 53: goto tr73;
|
1766
|
+
case 54: goto tr73;
|
1767
|
+
case 55: goto tr73;
|
1768
|
+
case 56: goto tr73;
|
1769
|
+
case 57: goto tr73;
|
1770
|
+
case 58: goto tr73;
|
1771
|
+
case 59: goto tr73;
|
1772
|
+
case 61: goto tr88;
|
1773
|
+
case 62: goto tr89;
|
1774
|
+
case 64: goto tr92;
|
1775
|
+
case 66: goto tr101;
|
1776
|
+
case 68: goto tr105;
|
1777
|
+
case 69: goto tr105;
|
1778
|
+
case 70: goto tr105;
|
1779
|
+
case 72: goto tr111;
|
1780
|
+
case 27: goto tr32;
|
1781
|
+
case 28: goto tr32;
|
1782
|
+
case 29: goto tr32;
|
1783
|
+
case 30: goto tr32;
|
1784
|
+
case 31: goto tr32;
|
1785
|
+
case 32: goto tr32;
|
1786
|
+
case 33: goto tr32;
|
1582
1787
|
}
|
1583
1788
|
}
|
1584
1789
|
|
1585
1790
|
_out: {}
|
1586
1791
|
}
|
1587
1792
|
|
1588
|
-
#line
|
1793
|
+
#line 119 "ext/c/lexer.rl"
|
1589
1794
|
|
1590
1795
|
state->lines = lines;
|
1591
1796
|
|
@@ -1629,7 +1834,7 @@ VALUE oga_xml_lexer_allocate(VALUE klass)
|
|
1629
1834
|
}
|
1630
1835
|
|
1631
1836
|
|
1632
|
-
#line
|
1837
|
+
#line 168 "ext/c/lexer.rl"
|
1633
1838
|
|
1634
1839
|
|
1635
1840
|
void Init_liboga_xml_lexer()
|
@@ -1638,6 +1843,9 @@ void Init_liboga_xml_lexer()
|
|
1638
1843
|
VALUE mXML = rb_const_get(mOga, rb_intern("XML"));
|
1639
1844
|
VALUE cLexer = rb_define_class_under(mXML, "Lexer", rb_cObject);
|
1640
1845
|
|
1846
|
+
id_advance_line = rb_intern("advance_line");
|
1847
|
+
id_inside_html_script_p = rb_intern("inside_html_script?");
|
1848
|
+
|
1641
1849
|
rb_define_method(cLexer, "advance_native", oga_xml_lexer_advance, 1);
|
1642
1850
|
rb_define_method(cLexer, "reset_native", oga_xml_lexer_reset, 0);
|
1643
1851
|
|