oga 0.2.0-java → 0.2.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9782988adade6a2371ac845c67f0ae696edad6d9
4
- data.tar.gz: 48ac5e0451a531619468f235ec8496f3e44e53a9
3
+ metadata.gz: 7eba2093654a3446533c54c2077185581ba77553
4
+ data.tar.gz: fb6a501ec0e2fd789022cc04650d38bcf632b3d6
5
5
  SHA512:
6
- metadata.gz: a274aba2a8947588a0508dc30e3e5ea6a1ed59fa08a48357a75d07d0726984d943b5fd8b60188753d8e3bd23938f4b04dbba9eacdec9548102c5689b2ca9bcca
7
- data.tar.gz: 1c4032a4842006752246a19d49b020fff48693430486387466215127ce0f29ef59f9645ce5d41802cbac7cd4c45021ed4aa15685dd8b30f31fdd86c4118a0671
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 `&#60`, `&#34`, 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 oga_ivar_get(owner, name) \
22
- rb_ivar_get(owner, rb_intern(name))
21
+ #define advance_line(amount) \
22
+ rb_funcall(self, id_advance_line, 1, INT2NUM(amount));
23
23
 
24
- #define oga_ivar_set(owner, name, value) \
25
- rb_ivar_set(owner, rb_intern(name), value)
24
+ #define inside_html_script_p() \
25
+ rb_funcall(self, id_inside_html_script_p, 0) == Qtrue
26
26
 
27
- #define advance_line(amount) \
28
- rb_funcall(self, rb_intern("advance_line"), 1, INT2NUM(amount));
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
- const char *name,
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 = rb_enc_str_new(ts, te - ts, encoding);
51
- VALUE method = rb_intern(name);
50
+ VALUE value = rb_enc_str_new(ts, te - ts, encoding);
52
51
 
53
- rb_funcall(self, method, 1, value);
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, const char *name)
62
+ void liboga_xml_lexer_callback_simple(VALUE self, VALUE name)
64
63
  {
65
- VALUE method = rb_intern(name);
66
-
67
- rb_funcall(self, method, 0);
64
+ rb_funcall(self, name, 0);
68
65
  }
69
66
 
70
67
 
71
- #line 72 "ext/c/lexer.c"
72
- static const int c_lexer_start = 29;
73
- static const int c_lexer_first_final = 29;
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 = 35;
77
- static const int c_lexer_en_string_squote = 37;
78
- static const int c_lexer_en_string_dquote = 39;
79
- static const int c_lexer_en_doctype = 41;
80
- static const int c_lexer_en_xml_decl = 53;
81
- static const int c_lexer_en_element_name = 56;
82
- static const int c_lexer_en_element_head = 58;
83
- static const int c_lexer_en_text = 60;
84
- static const int c_lexer_en_main = 29;
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 68 "ext/c/lexer.rl"
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 118 "ext/c/lexer.c"
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 29: goto st29;
126
- case 30: goto st30;
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 31: goto st31;
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) = 29;
199
- #line 324 "ext/ragel/base_lexer.rl"
231
+ ( state->cs) = 34;
232
+ #line 358 "ext/ragel/base_lexer.rl"
200
233
  {{p = ((te))-1;}{
201
234
  p--;
202
- ( state->cs) = 60;
235
+ ( state->cs) = 67;
203
236
  }}
204
237
  goto _again;
205
238
  tr7:
206
- #line 61 "ext/ragel/base_lexer.rl"
239
+ #line 72 "ext/ragel/base_lexer.rl"
207
240
  {te = p+1;{
208
- callback("on_comment", data, encoding, ts + 4, te - 3);
241
+ callback(id_on_comment, data, encoding, ts + 4, te - 3);
209
242
  }}
210
- goto st29;
243
+ goto st34;
211
244
  tr23:
212
- #line 77 "ext/ragel/base_lexer.rl"
245
+ #line 88 "ext/ragel/base_lexer.rl"
213
246
  {te = p+1;{
214
- callback("on_cdata", data, encoding, ts + 9, te - 3);
247
+ callback(id_on_cdata, data, encoding, ts + 9, te - 3);
215
248
  }}
216
- goto st29;
249
+ goto st34;
217
250
  tr26:
218
- #line 265 "ext/ragel/base_lexer.rl"
251
+ #line 289 "ext/ragel/base_lexer.rl"
219
252
  {te = p+1;{
220
- callback_simple("on_element_end");
253
+ callback_simple(id_on_element_end);
221
254
  }}
222
- goto st29;
223
- tr34:
224
- ( state->cs) = 29;
225
- #line 324 "ext/ragel/base_lexer.rl"
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) = 60;
261
+ ( state->cs) = 67;
229
262
  }}
230
263
  goto _again;
231
- tr36:
232
- ( state->cs) = 29;
233
- #line 324 "ext/ragel/base_lexer.rl"
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) = 60;
269
+ ( state->cs) = 67;
237
270
  }}
238
271
  goto _again;
239
- tr38:
240
- ( state->cs) = 29;
241
- #line 259 "ext/ragel/base_lexer.rl"
272
+ tr44:
273
+ ( state->cs) = 34;
274
+ #line 283 "ext/ragel/base_lexer.rl"
242
275
  {te = p+1;{
243
- callback_simple("on_element_start");
276
+ callback_simple(id_on_element_start);
244
277
  p--;
245
- ( state->cs) = 56;
278
+ ( state->cs) = 63;
246
279
  }}
247
280
  goto _again;
248
- tr40:
249
- ( state->cs) = 29;
250
- #line 181 "ext/ragel/base_lexer.rl"
281
+ tr46:
282
+ ( state->cs) = 34;
283
+ #line 192 "ext/ragel/base_lexer.rl"
251
284
  {te = p;p--;{
252
- callback_simple("on_doctype_start");
253
- ( state->cs) = 41;
285
+ callback_simple(id_on_doctype_start);
286
+ ( state->cs) = 48;
254
287
  }}
255
288
  goto _again;
256
- tr41:
257
- ( state->cs) = 29;
289
+ tr47:
290
+ ( state->cs) = 34;
258
291
  #line 1 "NONE"
259
292
  { switch( ( state->act) ) {
260
- case 32:
293
+ case 36:
261
294
  {{p = ((te))-1;}
262
- callback_simple("on_xml_decl_start");
263
- ( state->cs) = 53;
295
+ callback_simple(id_on_xml_decl_start);
296
+ ( state->cs) = 60;
264
297
  }
265
298
  break;
266
- case 35:
299
+ case 39:
267
300
  {{p = ((te))-1;}
268
- callback_simple("on_proc_ins_start");
269
- callback("on_proc_ins_name", data, encoding, ts + 2, te);
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) = 35;
306
+ ( state->cs) = 40;
274
307
  }
275
308
  break;
276
309
  }
277
310
  }
278
311
  goto _again;
279
- tr42:
280
- ( state->cs) = 29;
281
- #line 95 "ext/ragel/base_lexer.rl"
312
+ tr48:
313
+ ( state->cs) = 34;
314
+ #line 106 "ext/ragel/base_lexer.rl"
282
315
  {te = p;p--;{
283
- callback_simple("on_proc_ins_start");
284
- callback("on_proc_ins_name", data, encoding, ts + 2, te);
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) = 35;
321
+ ( state->cs) = 40;
289
322
  }}
290
323
  goto _again;
291
- st29:
324
+ st34:
292
325
  #line 1 "NONE"
293
326
  {ts = 0;}
294
327
  if ( ++p == pe )
295
- goto _test_eof29;
296
- case 29:
328
+ goto _test_eof34;
329
+ case 34:
297
330
  #line 1 "NONE"
298
331
  {ts = p;}
299
- #line 300 "ext/c/lexer.c"
332
+ #line 333 "ext/c/lexer.c"
300
333
  if ( (*p) == 60 )
301
- goto tr35;
302
- goto tr34;
303
- tr35:
334
+ goto tr41;
335
+ goto tr40;
336
+ tr41:
304
337
  #line 1 "NONE"
305
338
  {te = p+1;}
306
- goto st30;
307
- st30:
339
+ goto st35;
340
+ st35:
308
341
  if ( ++p == pe )
309
- goto _test_eof30;
310
- case 30:
311
- #line 312 "ext/c/lexer.c"
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 tr38;
347
+ case 45: goto tr44;
315
348
  case 47: goto st22;
316
349
  case 63: goto st24;
317
- case 95: goto tr38;
350
+ case 95: goto tr44;
318
351
  }
319
352
  if ( (*p) < 65 ) {
320
353
  if ( 48 <= (*p) && (*p) <= 57 )
321
- goto tr38;
354
+ goto tr44;
322
355
  } else if ( (*p) > 90 ) {
323
356
  if ( 97 <= (*p) && (*p) <= 122 )
324
- goto tr38;
357
+ goto tr44;
325
358
  } else
326
- goto tr38;
327
- goto tr36;
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 st31;
429
- case 32: goto st31;
461
+ case 9: goto st36;
462
+ case 32: goto st36;
430
463
  }
431
464
  goto tr0;
432
- st31:
465
+ st36:
433
466
  if ( ++p == pe )
434
- goto _test_eof31;
435
- case 31:
467
+ goto _test_eof36;
468
+ case 36:
436
469
  switch( (*p) ) {
437
- case 9: goto st31;
438
- case 32: goto st31;
470
+ case 9: goto st36;
471
+ case 32: goto st36;
439
472
  }
440
- goto tr40;
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 st33;
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 95 "ext/ragel/base_lexer.rl"
564
- {( state->act) = 35;}
565
- goto st32;
566
- tr44:
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 224 "ext/ragel/base_lexer.rl"
570
- {( state->act) = 32;}
571
- goto st32;
572
- st32:
602
+ #line 248 "ext/ragel/base_lexer.rl"
603
+ {( state->act) = 36;}
604
+ goto st37;
605
+ st37:
573
606
  if ( ++p == pe )
574
- goto _test_eof32;
575
- case 32:
576
- #line 577 "ext/c/lexer.c"
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 tr41;
590
- st33:
622
+ goto tr47;
623
+ st38:
591
624
  if ( ++p == pe )
592
- goto _test_eof33;
593
- case 33:
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 st34;
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 tr42;
608
- st34:
640
+ goto tr48;
641
+ st39:
609
642
  if ( ++p == pe )
610
- goto _test_eof34;
611
- case 34:
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 tr44;
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 tr42;
626
- tr45:
627
- #line 114 "ext/ragel/base_lexer.rl"
658
+ goto tr48;
659
+ tr51:
660
+ #line 125 "ext/ragel/base_lexer.rl"
628
661
  {te = p+1;}
629
- goto st35;
630
- tr47:
631
- #line 114 "ext/ragel/base_lexer.rl"
662
+ goto st40;
663
+ tr53:
664
+ #line 125 "ext/ragel/base_lexer.rl"
632
665
  {te = p;p--;}
633
- goto st35;
634
- tr48:
635
- ( state->cs) = 35;
636
- #line 105 "ext/ragel/base_lexer.rl"
666
+ goto st40;
667
+ tr54:
668
+ ( state->cs) = 40;
669
+ #line 116 "ext/ragel/base_lexer.rl"
637
670
  {te = p+1;{
638
- callback("on_text", data, encoding, mark, ts);
639
- callback_simple("on_proc_ins_end");
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) = 29;
676
+ ( state->cs) = 34;
644
677
  }}
645
678
  goto _again;
646
- st35:
679
+ st40:
647
680
  #line 1 "NONE"
648
681
  {ts = 0;}
649
682
  if ( ++p == pe )
650
- goto _test_eof35;
651
- case 35:
683
+ goto _test_eof40;
684
+ case 40:
652
685
  #line 1 "NONE"
653
686
  {ts = p;}
654
- #line 655 "ext/c/lexer.c"
687
+ #line 688 "ext/c/lexer.c"
655
688
  if ( (*p) == 63 )
656
- goto st36;
657
- goto tr45;
658
- st36:
689
+ goto st41;
690
+ goto tr51;
691
+ st41:
659
692
  if ( ++p == pe )
660
- goto _test_eof36;
661
- case 36:
693
+ goto _test_eof41;
694
+ case 41:
662
695
  if ( (*p) == 62 )
663
- goto tr48;
664
- goto tr47;
665
- tr50:
666
- #line 152 "ext/ragel/base_lexer.rl"
696
+ goto tr54;
697
+ goto tr53;
698
+ tr56:
699
+ #line 163 "ext/ragel/base_lexer.rl"
667
700
  {te = p+1;{
668
- callback_simple("on_string_squote");
701
+ callback_simple(id_on_string_squote);
669
702
 
670
703
  {( state->cs) = ( state->stack)[--( state->top)];goto _again;}
671
704
  }}
672
- goto st37;
673
- tr51:
674
- #line 126 "ext/ragel/base_lexer.rl"
705
+ goto st42;
706
+ tr57:
707
+ #line 137 "ext/ragel/base_lexer.rl"
675
708
  {te = p;p--;{
676
- callback("on_string_body", data, encoding, ts, te);
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 st37;
686
- st37:
718
+ goto st42;
719
+ st42:
687
720
  #line 1 "NONE"
688
721
  {ts = 0;}
689
722
  if ( ++p == pe )
690
- goto _test_eof37;
691
- case 37:
723
+ goto _test_eof42;
724
+ case 42:
692
725
  #line 1 "NONE"
693
726
  {ts = p;}
694
- #line 695 "ext/c/lexer.c"
727
+ #line 728 "ext/c/lexer.c"
695
728
  if ( (*p) == 39 )
696
- goto tr50;
697
- goto tr49;
698
- tr49:
699
- #line 40 "ext/ragel/base_lexer.rl"
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 st38;
704
- st38:
736
+ goto st43;
737
+ st43:
705
738
  if ( ++p == pe )
706
- goto _test_eof38;
707
- case 38:
708
- #line 709 "ext/c/lexer.c"
739
+ goto _test_eof43;
740
+ case 43:
741
+ #line 742 "ext/c/lexer.c"
709
742
  if ( (*p) == 39 )
710
- goto tr51;
711
- goto tr49;
712
- tr53:
713
- #line 162 "ext/ragel/base_lexer.rl"
743
+ goto tr57;
744
+ goto tr55;
745
+ tr59:
746
+ #line 173 "ext/ragel/base_lexer.rl"
714
747
  {te = p+1;{
715
- callback_simple("on_string_dquote");
748
+ callback_simple(id_on_string_dquote);
716
749
 
717
750
  {( state->cs) = ( state->stack)[--( state->top)];goto _again;}
718
751
  }}
719
- goto st39;
720
- tr54:
721
- #line 126 "ext/ragel/base_lexer.rl"
752
+ goto st44;
753
+ tr60:
754
+ #line 137 "ext/ragel/base_lexer.rl"
722
755
  {te = p;p--;{
723
- callback("on_string_body", data, encoding, ts, te);
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 st39;
733
- st39:
765
+ goto st44;
766
+ st44:
734
767
  #line 1 "NONE"
735
768
  {ts = 0;}
736
769
  if ( ++p == pe )
737
- goto _test_eof39;
738
- case 39:
770
+ goto _test_eof44;
771
+ case 44:
739
772
  #line 1 "NONE"
740
773
  {ts = p;}
741
- #line 742 "ext/c/lexer.c"
774
+ #line 775 "ext/c/lexer.c"
742
775
  if ( (*p) == 34 )
743
- goto tr53;
744
- goto tr52;
745
- tr52:
746
- #line 40 "ext/ragel/base_lexer.rl"
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 st40;
751
- st40:
783
+ goto st45;
784
+ st45:
752
785
  if ( ++p == pe )
753
- goto _test_eof40;
754
- case 40:
755
- #line 756 "ext/c/lexer.c"
786
+ goto _test_eof45;
787
+ case 45:
788
+ #line 789 "ext/c/lexer.c"
756
789
  if ( (*p) == 34 )
757
- goto tr54;
758
- goto tr52;
759
- tr30:
760
- #line 195 "ext/ragel/base_lexer.rl"
761
- {te = p+1;{
762
- callback("on_doctype_inline", data, encoding, ts + 1, te - 1);
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 st41;
765
- tr55:
766
- #line 205 "ext/ragel/base_lexer.rl"
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 st41;
769
- tr56:
770
- #line 143 "ext/ragel/base_lexer.rl"
839
+ goto st48;
840
+ tr65:
841
+ #line 154 "ext/ragel/base_lexer.rl"
771
842
  {te = p+1;{
772
- callback_simple("on_string_dquote");
843
+ callback_simple(id_on_string_dquote);
773
844
 
774
- {( state->stack)[( state->top)++] = 41; goto st39;}
845
+ {( state->stack)[( state->top)++] = 48; goto st44;}
775
846
  }}
776
- goto st41;
777
- tr57:
778
- #line 137 "ext/ragel/base_lexer.rl"
847
+ goto st48;
848
+ tr66:
849
+ #line 148 "ext/ragel/base_lexer.rl"
779
850
  {te = p+1;{
780
- callback_simple("on_string_squote");
851
+ callback_simple(id_on_string_squote);
781
852
 
782
- {( state->stack)[( state->top)++] = 41; goto st37;}
853
+ {( state->stack)[( state->top)++] = 48; goto st42;}
783
854
  }}
784
- goto st41;
785
- tr59:
786
- ( state->cs) = 41;
787
- #line 211 "ext/ragel/base_lexer.rl"
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("on_doctype_end");
790
- ( state->cs) = 29;
860
+ callback_simple(id_on_doctype_end);
861
+ ( state->cs) = 34;
791
862
  }}
792
863
  goto _again;
793
- tr63:
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 7:
872
+ case 9:
797
873
  {{p = ((te))-1;}
798
- callback("on_doctype_type", data, encoding, ts, te);
874
+ callback(id_on_doctype_type, data, encoding, ts, te);
799
875
  }
800
876
  break;
801
- case 12:
877
+ case 14:
802
878
  {{p = ((te))-1;}
803
- callback("on_doctype_name", data, encoding, ts, te);
879
+ callback(id_on_doctype_name, data, encoding, ts, te);
804
880
  }
805
881
  break;
806
882
  }
807
883
  }
808
- goto st41;
809
- tr64:
810
- #line 207 "ext/ragel/base_lexer.rl"
884
+ goto st48;
885
+ tr73:
886
+ #line 231 "ext/ragel/base_lexer.rl"
811
887
  {te = p;p--;{
812
- callback("on_doctype_name", data, encoding, ts, te);
888
+ callback(id_on_doctype_name, data, encoding, ts, te);
813
889
  }}
814
- goto st41;
815
- st41:
890
+ goto st48;
891
+ st48:
816
892
  #line 1 "NONE"
817
893
  {ts = 0;}
818
894
  if ( ++p == pe )
819
- goto _test_eof41;
820
- case 41:
895
+ goto _test_eof48;
896
+ case 48:
821
897
  #line 1 "NONE"
822
898
  {ts = p;}
823
- #line 824 "ext/c/lexer.c"
899
+ #line 900 "ext/c/lexer.c"
824
900
  switch( (*p) ) {
825
- case 9: goto tr55;
826
- case 32: goto tr55;
827
- case 34: goto tr56;
828
- case 39: goto tr57;
829
- case 45: goto tr58;
830
- case 62: goto tr59;
831
- case 80: goto st43;
832
- case 83: goto st48;
833
- case 91: goto st25;
834
- case 95: goto tr58;
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 tr58;
914
+ goto tr67;
839
915
  } else if ( (*p) > 90 ) {
840
916
  if ( 97 <= (*p) && (*p) <= 122 )
841
- goto tr58;
917
+ goto tr67;
842
918
  } else
843
- goto tr58;
919
+ goto tr67;
844
920
  goto st0;
845
921
  st0:
846
922
  ( state->cs) = 0;
847
923
  goto _out;
848
- tr58:
924
+ tr67:
849
925
  #line 1 "NONE"
850
926
  {te = p+1;}
851
- #line 207 "ext/ragel/base_lexer.rl"
852
- {( state->act) = 12;}
853
- goto st42;
854
- tr69:
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 189 "ext/ragel/base_lexer.rl"
858
- {( state->act) = 7;}
859
- goto st42;
860
- st42:
933
+ #line 216 "ext/ragel/base_lexer.rl"
934
+ {( state->act) = 9;}
935
+ goto st49;
936
+ st49:
861
937
  if ( ++p == pe )
862
- goto _test_eof42;
863
- case 42:
864
- #line 865 "ext/c/lexer.c"
938
+ goto _test_eof49;
939
+ case 49:
940
+ #line 941 "ext/c/lexer.c"
865
941
  switch( (*p) ) {
866
- case 45: goto tr58;
867
- case 95: goto tr58;
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 tr58;
947
+ goto tr67;
872
948
  } else if ( (*p) > 90 ) {
873
949
  if ( 97 <= (*p) && (*p) <= 122 )
874
- goto tr58;
950
+ goto tr67;
875
951
  } else
876
- goto tr58;
877
- goto tr63;
878
- st43:
952
+ goto tr67;
953
+ goto tr72;
954
+ st50:
879
955
  if ( ++p == pe )
880
- goto _test_eof43;
881
- case 43:
956
+ goto _test_eof50;
957
+ case 50:
882
958
  switch( (*p) ) {
883
- case 45: goto tr58;
884
- case 85: goto st44;
885
- case 95: goto tr58;
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 tr58;
965
+ goto tr67;
890
966
  } else if ( (*p) > 90 ) {
891
967
  if ( 97 <= (*p) && (*p) <= 122 )
892
- goto tr58;
968
+ goto tr67;
893
969
  } else
894
- goto tr58;
895
- goto tr64;
896
- st44:
970
+ goto tr67;
971
+ goto tr73;
972
+ st51:
897
973
  if ( ++p == pe )
898
- goto _test_eof44;
899
- case 44:
974
+ goto _test_eof51;
975
+ case 51:
900
976
  switch( (*p) ) {
901
- case 45: goto tr58;
902
- case 66: goto st45;
903
- case 95: goto tr58;
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 tr58;
983
+ goto tr67;
908
984
  } else if ( (*p) > 90 ) {
909
985
  if ( 97 <= (*p) && (*p) <= 122 )
910
- goto tr58;
986
+ goto tr67;
911
987
  } else
912
- goto tr58;
913
- goto tr64;
914
- st45:
988
+ goto tr67;
989
+ goto tr73;
990
+ st52:
915
991
  if ( ++p == pe )
916
- goto _test_eof45;
917
- case 45:
992
+ goto _test_eof52;
993
+ case 52:
918
994
  switch( (*p) ) {
919
- case 45: goto tr58;
920
- case 76: goto st46;
921
- case 95: goto tr58;
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 tr58;
1001
+ goto tr67;
926
1002
  } else if ( (*p) > 90 ) {
927
1003
  if ( 97 <= (*p) && (*p) <= 122 )
928
- goto tr58;
1004
+ goto tr67;
929
1005
  } else
930
- goto tr58;
931
- goto tr64;
932
- st46:
1006
+ goto tr67;
1007
+ goto tr73;
1008
+ st53:
933
1009
  if ( ++p == pe )
934
- goto _test_eof46;
935
- case 46:
1010
+ goto _test_eof53;
1011
+ case 53:
936
1012
  switch( (*p) ) {
937
- case 45: goto tr58;
938
- case 73: goto st47;
939
- case 95: goto tr58;
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 tr58;
1019
+ goto tr67;
944
1020
  } else if ( (*p) > 90 ) {
945
1021
  if ( 97 <= (*p) && (*p) <= 122 )
946
- goto tr58;
1022
+ goto tr67;
947
1023
  } else
948
- goto tr58;
949
- goto tr64;
950
- st47:
1024
+ goto tr67;
1025
+ goto tr73;
1026
+ st54:
951
1027
  if ( ++p == pe )
952
- goto _test_eof47;
953
- case 47:
1028
+ goto _test_eof54;
1029
+ case 54:
954
1030
  switch( (*p) ) {
955
- case 45: goto tr58;
956
- case 67: goto tr69;
957
- case 95: goto tr58;
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 tr58;
1037
+ goto tr67;
962
1038
  } else if ( (*p) > 90 ) {
963
1039
  if ( 97 <= (*p) && (*p) <= 122 )
964
- goto tr58;
1040
+ goto tr67;
965
1041
  } else
966
- goto tr58;
967
- goto tr64;
968
- st48:
1042
+ goto tr67;
1043
+ goto tr73;
1044
+ st55:
969
1045
  if ( ++p == pe )
970
- goto _test_eof48;
971
- case 48:
1046
+ goto _test_eof55;
1047
+ case 55:
972
1048
  switch( (*p) ) {
973
- case 45: goto tr58;
974
- case 89: goto st49;
975
- case 95: goto tr58;
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 tr58;
1055
+ goto tr67;
980
1056
  } else if ( (*p) > 90 ) {
981
1057
  if ( 97 <= (*p) && (*p) <= 122 )
982
- goto tr58;
1058
+ goto tr67;
983
1059
  } else
984
- goto tr58;
985
- goto tr64;
986
- st49:
1060
+ goto tr67;
1061
+ goto tr73;
1062
+ st56:
987
1063
  if ( ++p == pe )
988
- goto _test_eof49;
989
- case 49:
1064
+ goto _test_eof56;
1065
+ case 56:
990
1066
  switch( (*p) ) {
991
- case 45: goto tr58;
992
- case 83: goto st50;
993
- case 95: goto tr58;
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 tr58;
1073
+ goto tr67;
998
1074
  } else if ( (*p) > 90 ) {
999
1075
  if ( 97 <= (*p) && (*p) <= 122 )
1000
- goto tr58;
1076
+ goto tr67;
1001
1077
  } else
1002
- goto tr58;
1003
- goto tr64;
1004
- st50:
1078
+ goto tr67;
1079
+ goto tr73;
1080
+ st57:
1005
1081
  if ( ++p == pe )
1006
- goto _test_eof50;
1007
- case 50:
1082
+ goto _test_eof57;
1083
+ case 57:
1008
1084
  switch( (*p) ) {
1009
- case 45: goto tr58;
1010
- case 84: goto st51;
1011
- case 95: goto tr58;
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 tr58;
1091
+ goto tr67;
1016
1092
  } else if ( (*p) > 90 ) {
1017
1093
  if ( 97 <= (*p) && (*p) <= 122 )
1018
- goto tr58;
1094
+ goto tr67;
1019
1095
  } else
1020
- goto tr58;
1021
- goto tr64;
1022
- st51:
1096
+ goto tr67;
1097
+ goto tr73;
1098
+ st58:
1023
1099
  if ( ++p == pe )
1024
- goto _test_eof51;
1025
- case 51:
1100
+ goto _test_eof58;
1101
+ case 58:
1026
1102
  switch( (*p) ) {
1027
- case 45: goto tr58;
1028
- case 69: goto st52;
1029
- case 95: goto tr58;
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 tr58;
1109
+ goto tr67;
1034
1110
  } else if ( (*p) > 90 ) {
1035
1111
  if ( 97 <= (*p) && (*p) <= 122 )
1036
- goto tr58;
1112
+ goto tr67;
1037
1113
  } else
1038
- goto tr58;
1039
- goto tr64;
1040
- st52:
1114
+ goto tr67;
1115
+ goto tr73;
1116
+ st59:
1041
1117
  if ( ++p == pe )
1042
- goto _test_eof52;
1043
- case 52:
1118
+ goto _test_eof59;
1119
+ case 59:
1044
1120
  switch( (*p) ) {
1045
- case 45: goto tr58;
1046
- case 77: goto tr69;
1047
- case 95: goto tr58;
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 tr58;
1127
+ goto tr67;
1052
1128
  } else if ( (*p) > 90 ) {
1053
1129
  if ( 97 <= (*p) && (*p) <= 122 )
1054
- goto tr58;
1130
+ goto tr67;
1055
1131
  } else
1056
- goto tr58;
1057
- goto tr64;
1058
- st25:
1059
- if ( ++p == pe )
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 st53;
1074
- tr75:
1075
- #line 143 "ext/ragel/base_lexer.rl"
1137
+ goto st60;
1138
+ tr84:
1139
+ #line 154 "ext/ragel/base_lexer.rl"
1076
1140
  {te = p+1;{
1077
- callback_simple("on_string_dquote");
1141
+ callback_simple(id_on_string_dquote);
1078
1142
 
1079
- {( state->stack)[( state->top)++] = 53; goto st39;}
1143
+ {( state->stack)[( state->top)++] = 60; goto st44;}
1080
1144
  }}
1081
- goto st53;
1082
- tr76:
1083
- #line 137 "ext/ragel/base_lexer.rl"
1145
+ goto st60;
1146
+ tr85:
1147
+ #line 148 "ext/ragel/base_lexer.rl"
1084
1148
  {te = p+1;{
1085
- callback_simple("on_string_squote");
1149
+ callback_simple(id_on_string_squote);
1086
1150
 
1087
- {( state->stack)[( state->top)++] = 53; goto st37;}
1151
+ {( state->stack)[( state->top)++] = 60; goto st42;}
1088
1152
  }}
1089
- goto st53;
1090
- tr79:
1091
- #line 237 "ext/ragel/base_lexer.rl"
1153
+ goto st60;
1154
+ tr88:
1155
+ #line 261 "ext/ragel/base_lexer.rl"
1092
1156
  {te = p;p--;{
1093
- callback("on_attribute", data, encoding, ts, te);
1157
+ callback(id_on_attribute, data, encoding, ts, te);
1094
1158
  }}
1095
- goto st53;
1096
- tr80:
1097
- #line 244 "ext/ragel/base_lexer.rl"
1159
+ goto st60;
1160
+ tr89:
1161
+ #line 268 "ext/ragel/base_lexer.rl"
1098
1162
  {te = p;p--;}
1099
- goto st53;
1100
- tr81:
1101
- ( state->cs) = 53;
1102
- #line 231 "ext/ragel/base_lexer.rl"
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("on_xml_decl_end");
1105
- ( state->cs) = 29;
1168
+ callback_simple(id_on_xml_decl_end);
1169
+ ( state->cs) = 34;
1106
1170
  }}
1107
1171
  goto _again;
1108
- st53:
1172
+ st60:
1109
1173
  #line 1 "NONE"
1110
1174
  {ts = 0;}
1111
1175
  if ( ++p == pe )
1112
- goto _test_eof53;
1113
- case 53:
1176
+ goto _test_eof60;
1177
+ case 60:
1114
1178
  #line 1 "NONE"
1115
1179
  {ts = p;}
1116
- #line 1117 "ext/c/lexer.c"
1180
+ #line 1181 "ext/c/lexer.c"
1117
1181
  switch( (*p) ) {
1118
- case 34: goto tr75;
1119
- case 39: goto tr76;
1120
- case 45: goto st54;
1121
- case 63: goto st55;
1122
- case 95: goto st54;
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 st54;
1190
+ goto st61;
1127
1191
  } else if ( (*p) > 90 ) {
1128
1192
  if ( 97 <= (*p) && (*p) <= 122 )
1129
- goto st54;
1193
+ goto st61;
1130
1194
  } else
1131
- goto st54;
1132
- goto tr74;
1133
- st54:
1195
+ goto st61;
1196
+ goto tr83;
1197
+ st61:
1134
1198
  if ( ++p == pe )
1135
- goto _test_eof54;
1136
- case 54:
1199
+ goto _test_eof61;
1200
+ case 61:
1137
1201
  switch( (*p) ) {
1138
- case 45: goto st54;
1139
- case 95: goto st54;
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 st54;
1207
+ goto st61;
1144
1208
  } else if ( (*p) > 90 ) {
1145
1209
  if ( 97 <= (*p) && (*p) <= 122 )
1146
- goto st54;
1210
+ goto st61;
1147
1211
  } else
1148
- goto st54;
1149
- goto tr79;
1150
- st55:
1212
+ goto st61;
1213
+ goto tr88;
1214
+ st62:
1151
1215
  if ( ++p == pe )
1152
- goto _test_eof55;
1153
- case 55:
1216
+ goto _test_eof62;
1217
+ case 62:
1154
1218
  if ( (*p) == 62 )
1155
- goto tr81;
1156
- goto tr80;
1157
- tr83:
1158
- ( state->cs) = 56;
1159
- #line 275 "ext/ragel/base_lexer.rl"
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("on_element_name", data, encoding, ts, te);
1162
- ( state->cs) = 58;
1225
+ callback(id_on_element_name, data, encoding, ts, te);
1226
+ ( state->cs) = 65;
1163
1227
  }}
1164
1228
  goto _again;
1165
- tr84:
1166
- #line 271 "ext/ragel/base_lexer.rl"
1229
+ tr93:
1230
+ #line 295 "ext/ragel/base_lexer.rl"
1167
1231
  {te = p+1;{
1168
- callback("on_element_ns", data, encoding, ts, te - 1);
1232
+ callback(id_on_element_ns, data, encoding, ts, te - 1);
1169
1233
  }}
1170
- goto st56;
1171
- st56:
1234
+ goto st63;
1235
+ st63:
1172
1236
  #line 1 "NONE"
1173
1237
  {ts = 0;}
1174
1238
  if ( ++p == pe )
1175
- goto _test_eof56;
1176
- case 56:
1239
+ goto _test_eof63;
1240
+ case 63:
1177
1241
  #line 1 "NONE"
1178
1242
  {ts = p;}
1179
- #line 1180 "ext/c/lexer.c"
1243
+ #line 1244 "ext/c/lexer.c"
1180
1244
  switch( (*p) ) {
1181
- case 45: goto st57;
1182
- case 95: goto st57;
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 st57;
1250
+ goto st64;
1187
1251
  } else if ( (*p) > 90 ) {
1188
1252
  if ( 97 <= (*p) && (*p) <= 122 )
1189
- goto st57;
1253
+ goto st64;
1190
1254
  } else
1191
- goto st57;
1255
+ goto st64;
1192
1256
  goto st0;
1193
- st57:
1257
+ st64:
1194
1258
  if ( ++p == pe )
1195
- goto _test_eof57;
1196
- case 57:
1259
+ goto _test_eof64;
1260
+ case 64:
1197
1261
  switch( (*p) ) {
1198
- case 45: goto st57;
1199
- case 58: goto tr84;
1200
- case 95: goto st57;
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 st57;
1268
+ goto st64;
1205
1269
  } else if ( (*p) > 90 ) {
1206
1270
  if ( 97 <= (*p) && (*p) <= 122 )
1207
- goto st57;
1271
+ goto st64;
1208
1272
  } else
1209
- goto st57;
1210
- goto tr83;
1211
- tr31:
1212
- #line 286 "ext/ragel/base_lexer.rl"
1273
+ goto st64;
1274
+ goto tr92;
1275
+ tr29:
1276
+ #line 310 "ext/ragel/base_lexer.rl"
1213
1277
  {te = p+1;{
1214
- callback_simple("advance_line");
1278
+ callback_simple(id_advance_line);
1215
1279
  }}
1216
- goto st58;
1217
- tr33:
1218
- ( state->cs) = 58;
1219
- #line 310 "ext/ragel/base_lexer.rl"
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("on_element_end");
1222
- ( state->cs) = 29;
1285
+ callback_simple(id_on_element_end);
1286
+ ( state->cs) = 34;
1223
1287
  }}
1224
1288
  goto _again;
1225
- tr85:
1226
- #line 284 "ext/ragel/base_lexer.rl"
1289
+ tr94:
1290
+ #line 308 "ext/ragel/base_lexer.rl"
1227
1291
  {te = p+1;}
1228
- goto st58;
1229
- tr87:
1230
- #line 143 "ext/ragel/base_lexer.rl"
1292
+ goto st65;
1293
+ tr96:
1294
+ #line 154 "ext/ragel/base_lexer.rl"
1231
1295
  {te = p+1;{
1232
- callback_simple("on_string_dquote");
1296
+ callback_simple(id_on_string_dquote);
1233
1297
 
1234
- {( state->stack)[( state->top)++] = 58; goto st39;}
1298
+ {( state->stack)[( state->top)++] = 65; goto st44;}
1235
1299
  }}
1236
- goto st58;
1237
- tr88:
1238
- #line 137 "ext/ragel/base_lexer.rl"
1300
+ goto st65;
1301
+ tr97:
1302
+ #line 148 "ext/ragel/base_lexer.rl"
1239
1303
  {te = p+1;{
1240
- callback_simple("on_string_squote");
1304
+ callback_simple(id_on_string_squote);
1241
1305
 
1242
- {( state->stack)[( state->top)++] = 58; goto st37;}
1306
+ {( state->stack)[( state->top)++] = 65; goto st42;}
1243
1307
  }}
1244
- goto st58;
1245
- tr91:
1246
- ( state->cs) = 58;
1247
- #line 304 "ext/ragel/base_lexer.rl"
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("on_element_open_end");
1250
- ( state->cs) = 29;
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
- tr92:
1254
- #line 295 "ext/ragel/base_lexer.rl"
1327
+ tr101:
1328
+ #line 319 "ext/ragel/base_lexer.rl"
1255
1329
  {te = p;p--;{
1256
- callback("on_attribute", data, encoding, ts, te);
1330
+ callback(id_on_attribute, data, encoding, ts, te);
1257
1331
  }}
1258
- goto st58;
1259
- tr93:
1260
- #line 291 "ext/ragel/base_lexer.rl"
1332
+ goto st65;
1333
+ tr102:
1334
+ #line 315 "ext/ragel/base_lexer.rl"
1261
1335
  {te = p+1;{
1262
- callback("on_attribute_ns", data, encoding, ts, te - 1);
1336
+ callback(id_on_attribute_ns, data, encoding, ts, te - 1);
1263
1337
  }}
1264
- goto st58;
1265
- st58:
1338
+ goto st65;
1339
+ st65:
1266
1340
  #line 1 "NONE"
1267
1341
  {ts = 0;}
1268
1342
  if ( ++p == pe )
1269
- goto _test_eof58;
1270
- case 58:
1343
+ goto _test_eof65;
1344
+ case 65:
1271
1345
  #line 1 "NONE"
1272
1346
  {ts = p;}
1273
- #line 1274 "ext/c/lexer.c"
1347
+ #line 1348 "ext/c/lexer.c"
1274
1348
  switch( (*p) ) {
1275
- case 9: goto tr85;
1276
- case 10: goto tr31;
1277
- case 13: goto st27;
1278
- case 32: goto tr85;
1279
- case 34: goto tr87;
1280
- case 39: goto tr88;
1281
- case 45: goto st59;
1282
- case 47: goto st28;
1283
- case 61: goto tr85;
1284
- case 62: goto tr91;
1285
- case 95: goto st59;
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 st59;
1363
+ goto st66;
1290
1364
  } else if ( (*p) > 90 ) {
1291
1365
  if ( 97 <= (*p) && (*p) <= 122 )
1292
- goto st59;
1366
+ goto st66;
1293
1367
  } else
1294
- goto st59;
1368
+ goto st66;
1295
1369
  goto st0;
1296
- st27:
1370
+ st25:
1297
1371
  if ( ++p == pe )
1298
- goto _test_eof27;
1299
- case 27:
1372
+ goto _test_eof25;
1373
+ case 25:
1300
1374
  if ( (*p) == 10 )
1301
- goto tr31;
1375
+ goto tr29;
1302
1376
  goto st0;
1303
- st59:
1377
+ st66:
1304
1378
  if ( ++p == pe )
1305
- goto _test_eof59;
1306
- case 59:
1379
+ goto _test_eof66;
1380
+ case 66:
1307
1381
  switch( (*p) ) {
1308
- case 45: goto st59;
1309
- case 58: goto tr93;
1310
- case 95: goto st59;
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 st59;
1388
+ goto st66;
1315
1389
  } else if ( (*p) > 90 ) {
1316
1390
  if ( 97 <= (*p) && (*p) <= 122 )
1317
- goto st59;
1391
+ goto st66;
1318
1392
  } else
1319
- goto st59;
1320
- goto tr92;
1321
- st28:
1393
+ goto st66;
1394
+ goto tr101;
1395
+ st26:
1322
1396
  if ( ++p == pe )
1323
- goto _test_eof28;
1324
- case 28:
1397
+ goto _test_eof26;
1398
+ case 26:
1325
1399
  if ( (*p) == 62 )
1326
- goto tr33;
1400
+ goto tr31;
1327
1401
  goto st0;
1328
- tr96:
1329
- ( state->cs) = 60;
1330
- #line 339 "ext/ragel/base_lexer.rl"
1402
+ tr105:
1403
+ ( state->cs) = 67;
1404
+ #line 373 "ext/ragel/base_lexer.rl"
1331
1405
  {te = p;p--;{
1332
- callback("on_text", data, encoding, ts, te);
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) = 29;
1415
+ ( state->cs) = 34;
1342
1416
  }}
1343
1417
  goto _again;
1344
- tr98:
1345
- ( state->cs) = 60;
1346
- #line 353 "ext/ragel/base_lexer.rl"
1418
+ tr107:
1419
+ ( state->cs) = 67;
1420
+ #line 387 "ext/ragel/base_lexer.rl"
1347
1421
  {te = p+1;{
1348
- callback("on_text", data, encoding, ts, mark);
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) = 29;
1434
+ ( state->cs) = 34;
1361
1435
  }}
1362
1436
  goto _again;
1363
- tr99:
1364
- ( state->cs) = 60;
1365
- #line 339 "ext/ragel/base_lexer.rl"
1437
+ tr108:
1438
+ ( state->cs) = 67;
1439
+ #line 373 "ext/ragel/base_lexer.rl"
1366
1440
  {te = p+1;{
1367
- callback("on_text", data, encoding, ts, te);
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) = 29;
1450
+ ( state->cs) = 34;
1377
1451
  }}
1378
1452
  goto _again;
1379
- st60:
1453
+ st67:
1380
1454
  #line 1 "NONE"
1381
1455
  {ts = 0;}
1382
1456
  if ( ++p == pe )
1383
- goto _test_eof60;
1384
- case 60:
1457
+ goto _test_eof67;
1458
+ case 67:
1385
1459
  #line 1 "NONE"
1386
1460
  {ts = p;}
1387
- #line 1388 "ext/c/lexer.c"
1461
+ #line 1462 "ext/c/lexer.c"
1388
1462
  if ( (*p) == 60 )
1389
- goto tr95;
1390
- goto tr94;
1391
- tr94:
1392
- #line 40 "ext/ragel/base_lexer.rl"
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 st61;
1397
- st61:
1470
+ goto st68;
1471
+ st68:
1398
1472
  if ( ++p == pe )
1399
- goto _test_eof61;
1400
- case 61:
1401
- #line 1402 "ext/c/lexer.c"
1473
+ goto _test_eof68;
1474
+ case 68:
1475
+ #line 1476 "ext/c/lexer.c"
1402
1476
  if ( (*p) == 60 )
1403
- goto tr97;
1404
- goto tr94;
1405
- tr97:
1406
- #line 40 "ext/ragel/base_lexer.rl"
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 353 "ext/ragel/base_lexer.rl"
1484
+ #line 387 "ext/ragel/base_lexer.rl"
1411
1485
  { mark = p; }
1412
- goto st62;
1413
- st62:
1486
+ goto st69;
1487
+ st69:
1414
1488
  if ( ++p == pe )
1415
- goto _test_eof62;
1416
- case 62:
1417
- #line 1418 "ext/c/lexer.c"
1489
+ goto _test_eof69;
1490
+ case 69:
1491
+ #line 1492 "ext/c/lexer.c"
1418
1492
  switch( (*p) ) {
1419
- case 33: goto tr98;
1420
- case 45: goto tr98;
1421
- case 60: goto tr97;
1422
- case 63: goto tr98;
1423
- case 95: goto tr98;
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 tr98;
1501
+ goto tr107;
1428
1502
  } else if ( (*p) > 90 ) {
1429
1503
  if ( 97 <= (*p) && (*p) <= 122 )
1430
- goto tr98;
1504
+ goto tr107;
1431
1505
  } else
1432
- goto tr98;
1433
- goto tr94;
1434
- tr95:
1435
- #line 40 "ext/ragel/base_lexer.rl"
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 353 "ext/ragel/base_lexer.rl"
1513
+ #line 387 "ext/ragel/base_lexer.rl"
1440
1514
  { mark = p; }
1441
- goto st63;
1442
- st63:
1515
+ goto st70;
1516
+ st70:
1443
1517
  if ( ++p == pe )
1444
- goto _test_eof63;
1445
- case 63:
1446
- #line 1447 "ext/c/lexer.c"
1518
+ goto _test_eof70;
1519
+ case 70:
1520
+ #line 1521 "ext/c/lexer.c"
1447
1521
  switch( (*p) ) {
1448
- case 33: goto tr99;
1449
- case 45: goto tr99;
1450
- case 60: goto tr97;
1451
- case 63: goto tr99;
1452
- case 95: goto tr99;
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 tr99;
1530
+ goto tr108;
1457
1531
  } else if ( (*p) > 90 ) {
1458
1532
  if ( 97 <= (*p) && (*p) <= 122 )
1459
- goto tr99;
1533
+ goto tr108;
1460
1534
  } else
1461
- goto tr99;
1462
- goto tr94;
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
- _test_eof29: ( state->cs) = 29; goto _test_eof;
1465
- _test_eof30: ( state->cs) = 30; goto _test_eof;
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
- _test_eof31: ( state->cs) = 31; goto _test_eof;
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 30: goto tr36;
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 31: goto tr40;
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 32: goto tr41;
1559
- case 33: goto tr42;
1560
- case 34: goto tr42;
1561
- case 36: goto tr47;
1562
- case 38: goto tr51;
1563
- case 40: goto tr54;
1564
- case 42: goto tr63;
1565
- case 43: goto tr64;
1566
- case 44: goto tr64;
1567
- case 45: goto tr64;
1568
- case 46: goto tr64;
1569
- case 47: goto tr64;
1570
- case 48: goto tr64;
1571
- case 49: goto tr64;
1572
- case 50: goto tr64;
1573
- case 51: goto tr64;
1574
- case 52: goto tr64;
1575
- case 54: goto tr79;
1576
- case 55: goto tr80;
1577
- case 57: goto tr83;
1578
- case 59: goto tr92;
1579
- case 61: goto tr96;
1580
- case 62: goto tr96;
1581
- case 63: goto tr96;
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 97 "ext/c/lexer.rl"
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 146 "ext/c/lexer.rl"
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