hpricot 0.6.164 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/Rakefile +31 -33
- data/ext/fast_xs/fast_xs.c +11 -5
- data/ext/hpricot_scan/HpricotScanService.java +10 -6
- data/ext/hpricot_scan/hpricot_css.c +3502 -0
- data/ext/hpricot_scan/hpricot_css.rl +115 -0
- data/ext/hpricot_scan/hpricot_scan.c +1032 -589
- data/ext/hpricot_scan/hpricot_scan.java.rl +5 -1
- data/ext/hpricot_scan/hpricot_scan.rl +493 -50
- data/ext/hpricot_scan/test.rb +1 -2
- data/lib/hpricot/builder.rb +21 -20
- data/lib/hpricot/elements.rb +12 -12
- data/lib/hpricot/htmlinfo.rb +19 -0
- data/lib/hpricot/inspect.rb +27 -31
- data/lib/hpricot/modules.rb +2 -1
- data/lib/hpricot/parse.rb +8 -268
- data/lib/hpricot/tag.rb +65 -99
- data/lib/hpricot/traverse.rb +20 -14
- data/test/files/boingboing.html +1 -1
- data/test/nokogiri-bench.rb +64 -0
- data/test/test_builder.rb +4 -4
- data/test/test_parser.rb +36 -13
- data/test/test_preserved.rb +6 -2
- metadata +51 -51
- data/ext/hpricot_scan/hpricot_gram.c +0 -882
- data/ext/hpricot_scan/hpricot_gram.h +0 -9
@@ -0,0 +1,115 @@
|
|
1
|
+
/*
|
2
|
+
* hpricot_css.rl
|
3
|
+
* ragel -C hpricot_css.rl -o hpricot_css.c
|
4
|
+
*
|
5
|
+
* Copyright (C) 2008 why the lucky stiff
|
6
|
+
*/
|
7
|
+
#include <ruby.h>
|
8
|
+
|
9
|
+
#define FILTER(id) \
|
10
|
+
rb_funcall2(mod, rb_intern("" # id), fargs, fvals); \
|
11
|
+
rb_ary_clear(tmpt); \
|
12
|
+
fargs = 1
|
13
|
+
#define FILTERAUTO() \
|
14
|
+
char filt[10]; \
|
15
|
+
sprintf(filt, "%.*s", te - ts, ts); \
|
16
|
+
rb_funcall2(mod, rb_intern(filt), fargs, fvals); \
|
17
|
+
rb_ary_clear(tmpt); \
|
18
|
+
fargs = 1
|
19
|
+
#define PUSH(aps, ape) rb_ary_push(tmpt, fvals[fargs++] = rb_str_new(aps, ape - aps))
|
20
|
+
#define P(id) printf(id ": %.*s\n", te - ts, ts);
|
21
|
+
|
22
|
+
%%{
|
23
|
+
machine hpricot_css;
|
24
|
+
|
25
|
+
action a {
|
26
|
+
aps = p;
|
27
|
+
}
|
28
|
+
|
29
|
+
action b {
|
30
|
+
ape = p;
|
31
|
+
PUSH(aps, ape);
|
32
|
+
}
|
33
|
+
|
34
|
+
action c {
|
35
|
+
ape = p;
|
36
|
+
aps2 = p;
|
37
|
+
}
|
38
|
+
|
39
|
+
action d {
|
40
|
+
ape2 = p;
|
41
|
+
PUSH(aps, ape);
|
42
|
+
PUSH(aps2, ape2);
|
43
|
+
}
|
44
|
+
|
45
|
+
commas = space* "," space*;
|
46
|
+
traverse = [>+~];
|
47
|
+
sdot = "\\.";
|
48
|
+
utfw = alnum | "_" | "-" |
|
49
|
+
(0xc4 0xa8..0xbf) | (0xc5..0xdf 0x80..0xbf) |
|
50
|
+
(0xe0..0xef 0x80..0xbf 0x80..0xbf) |
|
51
|
+
(0xf0..0xf4 0x80..0xbf 0x80..0xbf 0x80..0xbf);
|
52
|
+
utfword = utfw+;
|
53
|
+
utfname = (utfw | sdot)+;
|
54
|
+
quote1 = "'" [^']* "'";
|
55
|
+
quote2 = '"' [^"]* '"';
|
56
|
+
|
57
|
+
cssid = "#" %a utfname %b;
|
58
|
+
cssclass = "." %a utfname %b;
|
59
|
+
cssname = "[name=" %a utfname %b "]";
|
60
|
+
cssattr = "[" %a utfname %c space* [^ \n\t]? "=" %d space* (quote1 | quote2 | [^\]]+) "]";
|
61
|
+
csstag = utfname >a %b;
|
62
|
+
cssmod = ("even" | "odd" | (digit | "n" | "+" | "-")* );
|
63
|
+
csschild = ":" %a ("only" | "nth" | "last" | "first") "-child" %b ("(" %a cssmod %b ")")?;
|
64
|
+
csspos = ":" %a ("nth" | "eq" | "gt" | "lt" | "first" | "last" | "even" | "odd") %b ("(" %a digit+ %b ")")?;
|
65
|
+
pseudop = "(" [^)]+ ")";
|
66
|
+
pseudoq = "'" (pseudop+ | [^'()]*) "'" |
|
67
|
+
'"' (pseudop+ | [^"()]*) '"' |
|
68
|
+
(pseudop+ | [^"()]*);
|
69
|
+
pseudo = ":" %a utfname %b ("(" %a pseudoq %b ")")?;
|
70
|
+
|
71
|
+
main := |*
|
72
|
+
cssid => { FILTER(ID); };
|
73
|
+
cssclass => { FILTER(CLASS); };
|
74
|
+
cssname => { FILTER(NAME); };
|
75
|
+
cssattr => { FILTER(ATTR); };
|
76
|
+
csstag => { FILTER(TAG); };
|
77
|
+
cssmod => { FILTER(MOD); };
|
78
|
+
csschild => { FILTER(CHILD); };
|
79
|
+
csspos => { FILTER(POS); };
|
80
|
+
pseudo => { FILTER(PSUEDO); };
|
81
|
+
commas => { focus = rb_ary_new3(1, node); };
|
82
|
+
traverse => { FILTERAUTO(); };
|
83
|
+
space;
|
84
|
+
*|;
|
85
|
+
|
86
|
+
write data nofinal;
|
87
|
+
}%%
|
88
|
+
|
89
|
+
VALUE hpricot_css(VALUE self, VALUE mod, VALUE str, VALUE node)
|
90
|
+
{
|
91
|
+
int cs, act, eof;
|
92
|
+
char *p, *pe, *ts, *te, *aps, *ape, *aps2, *ape2;
|
93
|
+
|
94
|
+
int fargs = 1;
|
95
|
+
VALUE fvals[6];
|
96
|
+
VALUE focus = rb_ary_new3(1, node);
|
97
|
+
VALUE tmpt = rb_ary_new();
|
98
|
+
rb_gc_register_address(&focus);
|
99
|
+
rb_gc_register_address(&tmpt);
|
100
|
+
fvals[0] = focus;
|
101
|
+
|
102
|
+
if (TYPE(str) != T_STRING)
|
103
|
+
rb_raise(rb_eArgError, "bad CSS selector, String only please.");
|
104
|
+
|
105
|
+
StringValue(str);
|
106
|
+
p = RSTRING_PTR(str);
|
107
|
+
pe = p + RSTRING_LEN(str);
|
108
|
+
|
109
|
+
%% write init;
|
110
|
+
%% write exec;
|
111
|
+
|
112
|
+
rb_gc_unregister_address(&focus);
|
113
|
+
rb_gc_unregister_address(&tmpt);
|
114
|
+
return focus;
|
115
|
+
}
|
@@ -15,21 +15,42 @@
|
|
15
15
|
#define RSTRING_PTR(str) RSTRING(str)->ptr
|
16
16
|
#endif
|
17
17
|
|
18
|
+
VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE, VALUE);
|
19
|
+
|
18
20
|
#define NO_WAY_SERIOUSLY "*** This should not happen, please send a bug report with the HTML you're parsing to why@whytheluckystiff.net. So sorry!"
|
19
21
|
|
20
22
|
static VALUE sym_xmldecl, sym_doctype, sym_procins, sym_stag, sym_etag, sym_emptytag, sym_comment,
|
21
|
-
sym_cdata, sym_text;
|
22
|
-
static VALUE rb_eHpricotParseError;
|
23
|
-
static
|
23
|
+
sym_cdata, sym_text, sym_EMPTY, sym_CDATA;
|
24
|
+
static VALUE mHpricot, rb_eHpricotParseError;
|
25
|
+
static VALUE cBaseEle, cBogusETag, cCData, cComment, cDoc, cDocType, cElem, cETag, cText,
|
26
|
+
cXMLDecl, cProcIns, symAllow, symDeny;
|
27
|
+
static ID s_ElementContent;
|
28
|
+
static ID s_downcase, s_new, s_parent, s_read, s_to_str;
|
29
|
+
static ID iv_parent;
|
30
|
+
static VALUE reProcInsParse;
|
31
|
+
|
32
|
+
typedef struct {
|
33
|
+
int name;
|
34
|
+
VALUE tag, attr, etag, raw, EC;
|
35
|
+
VALUE parent, children;
|
36
|
+
} hpricot_ele;
|
37
|
+
|
38
|
+
#define OPT(opts, key) (!NIL_P(opts) && RTEST(rb_hash_aref(opts, ID2SYM(rb_intern("" # key)))))
|
24
39
|
|
25
40
|
#define ELE(N) \
|
26
41
|
if (te > ts || text == 1) { \
|
27
|
-
|
42
|
+
char *raw = NULL; \
|
43
|
+
int rawlen = 0; \
|
28
44
|
ele_open = 0; text = 0; \
|
29
45
|
if (ts != 0 && sym_##N != sym_cdata && sym_##N != sym_text && sym_##N != sym_procins && sym_##N != sym_comment) { \
|
30
|
-
|
46
|
+
raw = ts; rawlen = te - ts; \
|
31
47
|
} \
|
32
|
-
|
48
|
+
if (rb_block_given_p()) { \
|
49
|
+
VALUE raw_string = Qnil; \
|
50
|
+
if (raw != NULL) raw_string = rb_str_new(raw, rawlen); \
|
51
|
+
rb_yield_tokens(sym_##N, tag, attr, Qnil, taint); \
|
52
|
+
} else \
|
53
|
+
rb_hpricot_token(S, sym_##N, tag, attr, raw, rawlen, taint); \
|
33
54
|
}
|
34
55
|
|
35
56
|
#define SET(N, E) \
|
@@ -40,7 +61,7 @@ static ID s_read, s_to_str;
|
|
40
61
|
|
41
62
|
#define CAT(N, E) if (NIL_P(N)) { SET(N, E); } else { rb_str_cat(N, mark_##N, E - mark_##N); }
|
42
63
|
|
43
|
-
#define SLIDE(N) if (
|
64
|
+
#define SLIDE(N) if (mark_##N > ts) mark_##N = buf + (mark_##N - ts);
|
44
65
|
|
45
66
|
#define ATTR(K, V) \
|
46
67
|
if (!NIL_P(K)) { \
|
@@ -66,11 +87,11 @@ static ID s_read, s_to_str;
|
|
66
87
|
|
67
88
|
#define EBLK(N, T) CAT(tag, p - T + 1); ELE(N);
|
68
89
|
|
69
|
-
#line
|
90
|
+
#line 134 "hpricot_scan.rl"
|
70
91
|
|
71
92
|
|
72
93
|
|
73
|
-
#line
|
94
|
+
#line 95 "hpricot_scan.c"
|
74
95
|
static const int hpricot_scan_start = 204;
|
75
96
|
static const int hpricot_scan_error = -1;
|
76
97
|
|
@@ -79,7 +100,7 @@ static const int hpricot_scan_en_html_cdata = 216;
|
|
79
100
|
static const int hpricot_scan_en_html_procins = 218;
|
80
101
|
static const int hpricot_scan_en_main = 204;
|
81
102
|
|
82
|
-
#line
|
103
|
+
#line 137 "hpricot_scan.rl"
|
83
104
|
|
84
105
|
#define BUFSIZE 16384
|
85
106
|
|
@@ -99,29 +120,350 @@ void rb_yield_tokens(VALUE sym, VALUE tag, VALUE attr, VALUE raw, int taint)
|
|
99
120
|
rb_yield(ary);
|
100
121
|
}
|
101
122
|
|
102
|
-
|
123
|
+
/* rb_hash_lookup() is only in Ruby 1.8.7 */
|
124
|
+
static VALUE
|
125
|
+
our_rb_hash_lookup(VALUE hash, VALUE key)
|
126
|
+
{
|
127
|
+
VALUE val;
|
128
|
+
|
129
|
+
if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
|
130
|
+
return Qnil; /* without Hash#default */
|
131
|
+
}
|
132
|
+
|
133
|
+
return val;
|
134
|
+
}
|
135
|
+
|
136
|
+
static void
|
137
|
+
rb_hpricot_add(VALUE focus, VALUE ele)
|
138
|
+
{
|
139
|
+
hpricot_ele *he, *he2;
|
140
|
+
Data_Get_Struct(focus, hpricot_ele, he);
|
141
|
+
Data_Get_Struct(ele, hpricot_ele, he2);
|
142
|
+
if (NIL_P(he->children))
|
143
|
+
he->children = rb_ary_new();
|
144
|
+
rb_ary_push(he->children, ele);
|
145
|
+
he2->parent = focus;
|
146
|
+
}
|
147
|
+
|
148
|
+
typedef struct {
|
149
|
+
VALUE doc;
|
150
|
+
VALUE focus;
|
151
|
+
VALUE last;
|
152
|
+
VALUE EC;
|
153
|
+
unsigned char xml, strict, fixup;
|
154
|
+
} hpricot_state;
|
155
|
+
|
156
|
+
static void
|
157
|
+
hpricot_ele_mark(hpricot_ele *he)
|
158
|
+
{
|
159
|
+
rb_gc_mark(he->tag);
|
160
|
+
rb_gc_mark(he->attr);
|
161
|
+
rb_gc_mark(he->etag);
|
162
|
+
rb_gc_mark(he->raw);
|
163
|
+
rb_gc_mark(he->parent);
|
164
|
+
rb_gc_mark(he->children);
|
165
|
+
}
|
166
|
+
|
167
|
+
static void
|
168
|
+
hpricot_ele_free(hpricot_ele *he)
|
169
|
+
{
|
170
|
+
free(he);
|
171
|
+
}
|
172
|
+
|
173
|
+
#define H_PROP(prop) \
|
174
|
+
static VALUE hpricot_ele_set_##prop(VALUE self, VALUE x) { \
|
175
|
+
hpricot_ele *he; \
|
176
|
+
Data_Get_Struct(self, hpricot_ele, he); \
|
177
|
+
he->prop = x; \
|
178
|
+
return self; \
|
179
|
+
} \
|
180
|
+
static VALUE hpricot_ele_get_##prop(VALUE self) { \
|
181
|
+
hpricot_ele *he; \
|
182
|
+
Data_Get_Struct(self, hpricot_ele, he); \
|
183
|
+
return he->prop; \
|
184
|
+
}
|
185
|
+
|
186
|
+
#define H_ATTR(prop) \
|
187
|
+
static VALUE hpricot_ele_set_##prop(VALUE self, VALUE x) { \
|
188
|
+
hpricot_ele *he; \
|
189
|
+
Data_Get_Struct(self, hpricot_ele, he); \
|
190
|
+
rb_hash_aset(he->attr, ID2SYM(rb_intern("" # prop)), x); \
|
191
|
+
return self; \
|
192
|
+
} \
|
193
|
+
static VALUE hpricot_ele_get_##prop(VALUE self) { \
|
194
|
+
hpricot_ele *he; \
|
195
|
+
Data_Get_Struct(self, hpricot_ele, he); \
|
196
|
+
return rb_hash_aref(he->attr, ID2SYM(rb_intern("" # prop))); \
|
197
|
+
}
|
198
|
+
|
199
|
+
H_PROP(tag);
|
200
|
+
H_PROP(attr);
|
201
|
+
H_PROP(etag);
|
202
|
+
H_PROP(parent);
|
203
|
+
H_PROP(children);
|
204
|
+
H_ATTR(encoding);
|
205
|
+
H_ATTR(version);
|
206
|
+
H_ATTR(standalone);
|
207
|
+
H_ATTR(system_id);
|
208
|
+
H_ATTR(public_id);
|
209
|
+
|
210
|
+
static VALUE
|
211
|
+
hpricot_ele_get_raw(VALUE self, VALUE x) {
|
212
|
+
hpricot_ele *he;
|
213
|
+
Data_Get_Struct(self, hpricot_ele, he);
|
214
|
+
return he->raw;
|
215
|
+
}
|
216
|
+
|
217
|
+
static VALUE
|
218
|
+
hpricot_ele_clear_raw(VALUE self)
|
219
|
+
{
|
220
|
+
hpricot_ele *he;
|
221
|
+
Data_Get_Struct(self, hpricot_ele, he);
|
222
|
+
he->raw = Qnil;
|
223
|
+
return Qtrue;
|
224
|
+
}
|
225
|
+
|
226
|
+
#define H_ELE(klass) \
|
227
|
+
hpricot_ele *he = ALLOC(hpricot_ele); \
|
228
|
+
he->name = 0; \
|
229
|
+
he->tag = tag; \
|
230
|
+
he->attr = attr; \
|
231
|
+
he->raw = Qnil; \
|
232
|
+
he->EC = ec; \
|
233
|
+
he->etag = he->parent = he->children = Qnil; \
|
234
|
+
if (raw != NULL && (sym == sym_emptytag || sym == sym_stag || sym == sym_etag || sym == sym_doctype)) { \
|
235
|
+
he->raw = rb_str_new(raw, rawlen); \
|
236
|
+
} \
|
237
|
+
ele = Data_Wrap_Struct(klass, hpricot_ele_mark, hpricot_ele_free, he); \
|
238
|
+
S->last = ele
|
239
|
+
|
240
|
+
VALUE
|
241
|
+
hpricot_ele_alloc(VALUE klass)
|
242
|
+
{
|
243
|
+
VALUE ele;
|
244
|
+
hpricot_ele *he = ALLOC(hpricot_ele);
|
245
|
+
he->name = 0;
|
246
|
+
he->tag = he->attr = he->raw = he->EC = Qnil;
|
247
|
+
he->etag = he->parent = he->children = Qnil;
|
248
|
+
ele = Data_Wrap_Struct(klass, hpricot_ele_mark, hpricot_ele_free, he);
|
249
|
+
return ele;
|
250
|
+
}
|
251
|
+
|
252
|
+
//
|
253
|
+
// the swift, compact parser logic. most of the complicated stuff is done
|
254
|
+
// in the lexer. this step just pairs up the start and end tags.
|
255
|
+
//
|
256
|
+
void
|
257
|
+
rb_hpricot_token(hpricot_state *S, VALUE sym, VALUE tag, VALUE attr, char *raw, int rawlen, int taint)
|
258
|
+
{
|
259
|
+
VALUE ele, ec = Qnil;
|
260
|
+
|
261
|
+
//
|
262
|
+
// in html mode, fix up start tags incorrectly formed as empty tags
|
263
|
+
//
|
264
|
+
if (!S->xml) {
|
265
|
+
hpricot_ele *last;
|
266
|
+
Data_Get_Struct(S->focus, hpricot_ele, last);
|
267
|
+
if (last->EC == sym_CDATA &&
|
268
|
+
(sym != sym_procins && sym != sym_comment && sym != sym_cdata && sym != sym_text) &&
|
269
|
+
!(sym == sym_etag && rb_str_hash(tag) == last->name))
|
270
|
+
{
|
271
|
+
sym = sym_text;
|
272
|
+
tag = rb_str_new(raw, rawlen);
|
273
|
+
}
|
274
|
+
|
275
|
+
if (sym == sym_emptytag || sym == sym_stag || sym == sym_etag) {
|
276
|
+
ec = rb_hash_aref(S->EC, tag);
|
277
|
+
if (NIL_P(ec)) {
|
278
|
+
tag = rb_funcall(tag, s_downcase, 0);
|
279
|
+
ec = rb_hash_aref(S->EC, tag);
|
280
|
+
}
|
281
|
+
if (sym == sym_emptytag) {
|
282
|
+
if (ec != sym_EMPTY)
|
283
|
+
sym = sym_stag;
|
284
|
+
} else if (sym == sym_stag) {
|
285
|
+
if (ec == sym_EMPTY)
|
286
|
+
sym = sym_emptytag;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
|
291
|
+
if (sym == sym_emptytag || sym == sym_stag) {
|
292
|
+
H_ELE(cElem);
|
293
|
+
he->name = rb_str_hash(tag);
|
294
|
+
|
295
|
+
if (!S->xml) {
|
296
|
+
VALUE match = Qnil, e = S->focus;
|
297
|
+
while (e != S->doc)
|
298
|
+
{
|
299
|
+
hpricot_ele *hee;
|
300
|
+
Data_Get_Struct(e, hpricot_ele, hee);
|
301
|
+
|
302
|
+
if (TYPE(hee->EC) == T_HASH)
|
303
|
+
{
|
304
|
+
VALUE has = our_rb_hash_lookup(hee->EC, INT2NUM(he->name));
|
305
|
+
if (has != Qnil) {
|
306
|
+
if (has == Qtrue) {
|
307
|
+
if (match == Qnil)
|
308
|
+
match = e;
|
309
|
+
} else if (has == symAllow) {
|
310
|
+
match = S->focus;
|
311
|
+
} else if (has == symDeny) {
|
312
|
+
match = Qnil;
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
e = hee->parent;
|
318
|
+
}
|
319
|
+
|
320
|
+
if (match == Qnil)
|
321
|
+
match = S->focus;
|
322
|
+
S->focus = match;
|
323
|
+
}
|
324
|
+
|
325
|
+
rb_hpricot_add(S->focus, ele);
|
326
|
+
|
327
|
+
//
|
328
|
+
// in the case of a start tag that should be empty, just
|
329
|
+
// skip the step that focuses the element. focusing moves
|
330
|
+
// us deeper into the document.
|
331
|
+
//
|
332
|
+
if (sym == sym_stag) {
|
333
|
+
if (S->xml || ec != sym_EMPTY) {
|
334
|
+
S->focus = ele;
|
335
|
+
S->last = Qnil;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
} else if (sym == sym_etag) {
|
339
|
+
int name;
|
340
|
+
VALUE match = Qnil, e = S->focus;
|
341
|
+
if (S->strict) {
|
342
|
+
if (NIL_P(rb_hash_aref(S->EC, tag))) {
|
343
|
+
tag = rb_str_new2("div");
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
//
|
348
|
+
// another optimization will be to improve this very simple
|
349
|
+
// O(n) tag search, where n is the depth of the focused tag.
|
350
|
+
//
|
351
|
+
// (see also: the search above for fixups)
|
352
|
+
//
|
353
|
+
name = rb_str_hash(tag);
|
354
|
+
while (e != S->doc)
|
355
|
+
{
|
356
|
+
hpricot_ele *he;
|
357
|
+
Data_Get_Struct(e, hpricot_ele, he);
|
358
|
+
|
359
|
+
if (he->name == name)
|
360
|
+
{
|
361
|
+
match = e;
|
362
|
+
break;
|
363
|
+
}
|
364
|
+
|
365
|
+
e = he->parent;
|
366
|
+
}
|
367
|
+
|
368
|
+
if (NIL_P(match))
|
369
|
+
{
|
370
|
+
H_ELE(cBogusETag);
|
371
|
+
rb_hpricot_add(S->focus, ele);
|
372
|
+
}
|
373
|
+
else
|
374
|
+
{
|
375
|
+
H_ELE(cETag);
|
376
|
+
Data_Get_Struct(match, hpricot_ele, he);
|
377
|
+
he->etag = ele;
|
378
|
+
S->focus = he->parent;
|
379
|
+
S->last = Qnil;
|
380
|
+
}
|
381
|
+
} else if (sym == sym_cdata) {
|
382
|
+
H_ELE(cCData);
|
383
|
+
rb_hpricot_add(S->focus, ele);
|
384
|
+
} else if (sym == sym_comment) {
|
385
|
+
H_ELE(cComment);
|
386
|
+
rb_hpricot_add(S->focus, ele);
|
387
|
+
} else if (sym == sym_doctype) {
|
388
|
+
H_ELE(cDocType);
|
389
|
+
if (S->strict) {
|
390
|
+
rb_hash_aset(attr, ID2SYM(rb_intern("system_id")), rb_str_new2("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"));
|
391
|
+
rb_hash_aset(attr, ID2SYM(rb_intern("public_id")), rb_str_new2("-//W3C//DTD XHTML 1.0 Strict//EN"));
|
392
|
+
}
|
393
|
+
rb_hpricot_add(S->focus, ele);
|
394
|
+
} else if (sym == sym_procins) {
|
395
|
+
VALUE match = rb_funcall(tag, rb_intern("match"), 1, reProcInsParse);
|
396
|
+
tag = rb_reg_nth_match(1, match);
|
397
|
+
attr = rb_reg_nth_match(2, match);
|
398
|
+
{
|
399
|
+
H_ELE(cProcIns);
|
400
|
+
rb_hpricot_add(S->focus, ele);
|
401
|
+
}
|
402
|
+
} else if (sym == sym_text) {
|
403
|
+
// TODO: add raw_string as well?
|
404
|
+
if (!NIL_P(S->last) && RBASIC(S->last)->klass == cText) {
|
405
|
+
hpricot_ele *he;
|
406
|
+
Data_Get_Struct(S->last, hpricot_ele, he);
|
407
|
+
rb_str_append(he->tag, tag);
|
408
|
+
} else {
|
409
|
+
H_ELE(cText);
|
410
|
+
rb_hpricot_add(S->focus, ele);
|
411
|
+
}
|
412
|
+
} else if (sym == sym_xmldecl) {
|
413
|
+
H_ELE(cXMLDecl);
|
414
|
+
rb_hpricot_add(S->focus, ele);
|
415
|
+
}
|
416
|
+
}
|
417
|
+
|
418
|
+
VALUE hpricot_scan(int argc, VALUE *argv, VALUE self)
|
103
419
|
{
|
104
|
-
int cs, act, have = 0, nread = 0, curline = 1, text = 0;
|
420
|
+
int cs, act, have = 0, nread = 0, curline = 1, text = 0, io = 0;
|
105
421
|
char *ts = 0, *te = 0, *buf = NULL, *eof = NULL;
|
106
422
|
|
423
|
+
hpricot_state *S = NULL;
|
424
|
+
VALUE port, opts;
|
107
425
|
VALUE attr = Qnil, tag = Qnil, akey = Qnil, aval = Qnil, bufsize = Qnil;
|
108
426
|
char *mark_tag = 0, *mark_akey = 0, *mark_aval = 0;
|
109
|
-
int done = 0, ele_open = 0, buffer_size = 0;
|
427
|
+
int done = 0, ele_open = 0, buffer_size = 0, taint = 0;
|
110
428
|
|
111
|
-
|
112
|
-
|
429
|
+
rb_scan_args(argc, argv, "11", &port, &opts);
|
430
|
+
taint = OBJ_TAINTED(port);
|
431
|
+
io = rb_respond_to(port, s_read);
|
432
|
+
if (!io)
|
113
433
|
{
|
114
|
-
if (
|
434
|
+
if (rb_respond_to(port, s_to_str))
|
115
435
|
{
|
116
|
-
port = rb_funcall(
|
436
|
+
port = rb_funcall(port, s_to_str, 0);
|
117
437
|
StringValue(port);
|
118
438
|
}
|
119
439
|
else
|
120
440
|
{
|
121
|
-
rb_raise(
|
441
|
+
rb_raise(rb_eArgError, "an Hpricot document must be built from an input source (a String or IO object.)");
|
122
442
|
}
|
123
443
|
}
|
124
444
|
|
445
|
+
if (TYPE(opts) != T_HASH)
|
446
|
+
opts = Qnil;
|
447
|
+
|
448
|
+
if (!rb_block_given_p())
|
449
|
+
{
|
450
|
+
hpricot_ele *he = ALLOC(hpricot_ele);
|
451
|
+
S = ALLOC(hpricot_state);
|
452
|
+
MEMZERO(he, hpricot_ele, 1);
|
453
|
+
he->tag = he->attr = he->etag = he->parent = he->children = Qnil;
|
454
|
+
S->doc = Data_Wrap_Struct(cDoc, hpricot_ele_mark, hpricot_ele_free, he);
|
455
|
+
rb_gc_register_address(&S->doc);
|
456
|
+
S->focus = S->doc;
|
457
|
+
S->last = Qnil;
|
458
|
+
S->xml = OPT(opts, xml);
|
459
|
+
S->strict = OPT(opts, xhtml_strict);
|
460
|
+
S->fixup = OPT(opts, fixup_tags);
|
461
|
+
if (S->strict) S->fixup = 1;
|
462
|
+
rb_ivar_set(S->doc, rb_intern("@options"), opts);
|
463
|
+
|
464
|
+
S->EC = rb_const_get(mHpricot, s_ElementContent);
|
465
|
+
}
|
466
|
+
|
125
467
|
buffer_size = BUFSIZE;
|
126
468
|
if (rb_ivar_defined(self, rb_intern("@buffer_size")) == Qtrue) {
|
127
469
|
bufsize = rb_ivar_get(self, rb_intern("@buffer_size"));
|
@@ -129,53 +471,72 @@ VALUE hpricot_scan(VALUE self, VALUE port)
|
|
129
471
|
buffer_size = NUM2INT(bufsize);
|
130
472
|
}
|
131
473
|
}
|
132
|
-
|
474
|
+
|
475
|
+
if (io)
|
476
|
+
buf = ALLOC_N(char, buffer_size);
|
133
477
|
|
134
478
|
|
135
|
-
#line
|
479
|
+
#line 480 "hpricot_scan.c"
|
136
480
|
{
|
137
481
|
cs = hpricot_scan_start;
|
138
482
|
ts = 0;
|
139
483
|
te = 0;
|
140
484
|
act = 0;
|
141
485
|
}
|
142
|
-
#line
|
486
|
+
#line 512 "hpricot_scan.rl"
|
143
487
|
|
144
|
-
while (
|
488
|
+
while (!done) {
|
145
489
|
VALUE str;
|
146
|
-
char *p
|
147
|
-
int len, space = buffer_size - have;
|
148
|
-
|
149
|
-
if ( space == 0 ) {
|
150
|
-
/* We've used up the entire buffer storing an already-parsed token
|
151
|
-
* prefix that must be preserved. Likely caused by super-long attributes.
|
152
|
-
* See ticket #13. */
|
153
|
-
rb_raise(rb_eHpricotParseError, "ran out of buffer space on element <%s>, starting on line %d.", RSTRING_PTR(tag), curline);
|
154
|
-
}
|
490
|
+
char *p, *pe;
|
491
|
+
int len, space = buffer_size - have, tokstart_diff, tokend_diff, mark_tag_diff, mark_akey_diff, mark_aval_diff;
|
155
492
|
|
156
|
-
if (
|
493
|
+
if (io)
|
157
494
|
{
|
158
|
-
|
495
|
+
if (space == 0) {
|
496
|
+
/* We've used up the entire buffer storing an already-parsed token
|
497
|
+
* prefix that must be preserved. Likely caused by super-long attributes.
|
498
|
+
* Increase buffer size and continue */
|
499
|
+
tokstart_diff = ts - buf;
|
500
|
+
tokend_diff = te - buf;
|
501
|
+
mark_tag_diff = mark_tag - buf;
|
502
|
+
mark_akey_diff = mark_akey - buf;
|
503
|
+
mark_aval_diff = mark_aval - buf;
|
504
|
+
|
505
|
+
buffer_size += BUFSIZE;
|
506
|
+
REALLOC_N(buf, char, buffer_size);
|
507
|
+
|
508
|
+
space = buffer_size - have;
|
509
|
+
|
510
|
+
ts = buf + tokstart_diff;
|
511
|
+
te = buf + tokend_diff;
|
512
|
+
mark_tag = buf + mark_tag_diff;
|
513
|
+
mark_akey = buf + mark_akey_diff;
|
514
|
+
mark_aval = buf + mark_aval_diff;
|
515
|
+
}
|
516
|
+
p = buf + have;
|
517
|
+
|
518
|
+
str = rb_funcall(port, s_read, 1, INT2FIX(space));
|
519
|
+
len = RSTRING_LEN(str);
|
520
|
+
memcpy(p, StringValuePtr(str), len);
|
159
521
|
}
|
160
522
|
else
|
161
523
|
{
|
162
|
-
|
524
|
+
p = RSTRING_PTR(port);
|
525
|
+
len = RSTRING_LEN(port) + 1;
|
526
|
+
done = 1;
|
163
527
|
}
|
164
528
|
|
165
|
-
StringValue(str);
|
166
|
-
memcpy( p, RSTRING_PTR(str), RSTRING_LEN(str) );
|
167
|
-
len = RSTRING_LEN(str);
|
168
529
|
nread += len;
|
169
530
|
|
170
531
|
/* If this is the last buffer, tack on an EOF. */
|
171
|
-
if ( len < space
|
532
|
+
if (io && len < space) {
|
172
533
|
p[len++] = 0;
|
173
534
|
done = 1;
|
174
535
|
}
|
175
536
|
|
176
537
|
pe = p + len;
|
177
538
|
|
178
|
-
#line
|
539
|
+
#line 540 "hpricot_scan.c"
|
179
540
|
{
|
180
541
|
if ( p == pe )
|
181
542
|
goto _test_eof;
|
@@ -190,7 +551,7 @@ tr4:
|
|
190
551
|
{te = p+1;{ {goto st214;} }}
|
191
552
|
goto st204;
|
192
553
|
tr15:
|
193
|
-
#line
|
554
|
+
#line 107 "hpricot_scan.rl"
|
194
555
|
{ SET(tag, p); }
|
195
556
|
#line 66 "hpricot_scan.rl"
|
196
557
|
{te = p+1;{ ELE(doctype); }}
|
@@ -222,7 +583,7 @@ tr93:
|
|
222
583
|
{te = p+1;{ {goto st216;} }}
|
223
584
|
goto st204;
|
224
585
|
tr97:
|
225
|
-
#line
|
586
|
+
#line 107 "hpricot_scan.rl"
|
226
587
|
{ SET(tag, p); }
|
227
588
|
#line 69 "hpricot_scan.rl"
|
228
589
|
{te = p+1;{ ELE(etag); }}
|
@@ -232,7 +593,7 @@ tr99:
|
|
232
593
|
{te = p+1;{ ELE(etag); }}
|
233
594
|
goto st204;
|
234
595
|
tr103:
|
235
|
-
#line
|
596
|
+
#line 107 "hpricot_scan.rl"
|
236
597
|
{ SET(tag, p); }
|
237
598
|
#line 68 "hpricot_scan.rl"
|
238
599
|
{te = p+1;{ ELE(stag); }}
|
@@ -242,9 +603,9 @@ tr107:
|
|
242
603
|
{te = p+1;{ ELE(stag); }}
|
243
604
|
goto st204;
|
244
605
|
tr112:
|
245
|
-
#line
|
606
|
+
#line 114 "hpricot_scan.rl"
|
246
607
|
{ SET(akey, p); }
|
247
|
-
#line
|
608
|
+
#line 128 "hpricot_scan.rl"
|
248
609
|
{
|
249
610
|
ATTR(akey, aval);
|
250
611
|
}
|
@@ -252,7 +613,7 @@ tr112:
|
|
252
613
|
{te = p+1;{ ELE(stag); }}
|
253
614
|
goto st204;
|
254
615
|
tr117:
|
255
|
-
#line
|
616
|
+
#line 128 "hpricot_scan.rl"
|
256
617
|
{
|
257
618
|
ATTR(akey, aval);
|
258
619
|
}
|
@@ -264,12 +625,12 @@ tr118:
|
|
264
625
|
{te = p+1;{ ELE(emptytag); }}
|
265
626
|
goto st204;
|
266
627
|
tr129:
|
267
|
-
#line
|
628
|
+
#line 110 "hpricot_scan.rl"
|
268
629
|
{
|
269
630
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
270
631
|
else { SET(aval, p); }
|
271
632
|
}
|
272
|
-
#line
|
633
|
+
#line 128 "hpricot_scan.rl"
|
273
634
|
{
|
274
635
|
ATTR(akey, aval);
|
275
636
|
}
|
@@ -277,11 +638,11 @@ tr129:
|
|
277
638
|
{te = p+1;{ ELE(stag); }}
|
278
639
|
goto st204;
|
279
640
|
tr133:
|
280
|
-
#line
|
641
|
+
#line 128 "hpricot_scan.rl"
|
281
642
|
{
|
282
643
|
ATTR(akey, aval);
|
283
644
|
}
|
284
|
-
#line
|
645
|
+
#line 110 "hpricot_scan.rl"
|
285
646
|
{
|
286
647
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
287
648
|
else { SET(aval, p); }
|
@@ -290,14 +651,14 @@ tr133:
|
|
290
651
|
{te = p+1;{ ELE(stag); }}
|
291
652
|
goto st204;
|
292
653
|
tr139:
|
293
|
-
#line
|
654
|
+
#line 110 "hpricot_scan.rl"
|
294
655
|
{
|
295
656
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
296
657
|
else { SET(aval, p); }
|
297
658
|
}
|
298
|
-
#line
|
659
|
+
#line 114 "hpricot_scan.rl"
|
299
660
|
{ SET(akey, p); }
|
300
|
-
#line
|
661
|
+
#line 128 "hpricot_scan.rl"
|
301
662
|
{
|
302
663
|
ATTR(akey, aval);
|
303
664
|
}
|
@@ -342,7 +703,7 @@ st204:
|
|
342
703
|
case 204:
|
343
704
|
#line 1 "hpricot_scan.rl"
|
344
705
|
{ts = p;}
|
345
|
-
#line
|
706
|
+
#line 707 "hpricot_scan.c"
|
346
707
|
switch( (*p) ) {
|
347
708
|
case 10: goto tr412;
|
348
709
|
case 60: goto tr413;
|
@@ -351,7 +712,7 @@ case 204:
|
|
351
712
|
tr413:
|
352
713
|
#line 1 "hpricot_scan.rl"
|
353
714
|
{te = p+1;}
|
354
|
-
#line
|
715
|
+
#line 92 "hpricot_scan.rl"
|
355
716
|
{
|
356
717
|
if (text == 1) {
|
357
718
|
CAT(tag, p);
|
@@ -370,7 +731,7 @@ st205:
|
|
370
731
|
if ( ++p == pe )
|
371
732
|
goto _test_eof205;
|
372
733
|
case 205:
|
373
|
-
#line
|
734
|
+
#line 735 "hpricot_scan.c"
|
374
735
|
switch( (*p) ) {
|
375
736
|
case 33: goto st0;
|
376
737
|
case 47: goto st59;
|
@@ -471,14 +832,14 @@ case 9:
|
|
471
832
|
goto tr12;
|
472
833
|
goto tr0;
|
473
834
|
tr12:
|
474
|
-
#line
|
835
|
+
#line 104 "hpricot_scan.rl"
|
475
836
|
{ mark_tag = p; }
|
476
837
|
goto st10;
|
477
838
|
st10:
|
478
839
|
if ( ++p == pe )
|
479
840
|
goto _test_eof10;
|
480
841
|
case 10:
|
481
|
-
#line
|
842
|
+
#line 843 "hpricot_scan.c"
|
482
843
|
switch( (*p) ) {
|
483
844
|
case 32: goto tr13;
|
484
845
|
case 62: goto tr15;
|
@@ -502,14 +863,14 @@ case 10:
|
|
502
863
|
goto st10;
|
503
864
|
goto tr0;
|
504
865
|
tr13:
|
505
|
-
#line
|
866
|
+
#line 107 "hpricot_scan.rl"
|
506
867
|
{ SET(tag, p); }
|
507
868
|
goto st11;
|
508
869
|
st11:
|
509
870
|
if ( ++p == pe )
|
510
871
|
goto _test_eof11;
|
511
872
|
case 11:
|
512
|
-
#line
|
873
|
+
#line 874 "hpricot_scan.c"
|
513
874
|
switch( (*p) ) {
|
514
875
|
case 32: goto st11;
|
515
876
|
case 62: goto tr18;
|
@@ -599,14 +960,14 @@ case 19:
|
|
599
960
|
goto tr30;
|
600
961
|
goto tr0;
|
601
962
|
tr30:
|
602
|
-
#line
|
963
|
+
#line 105 "hpricot_scan.rl"
|
603
964
|
{ mark_aval = p; }
|
604
965
|
goto st20;
|
605
966
|
st20:
|
606
967
|
if ( ++p == pe )
|
607
968
|
goto _test_eof20;
|
608
969
|
case 20:
|
609
|
-
#line
|
970
|
+
#line 971 "hpricot_scan.c"
|
610
971
|
switch( (*p) ) {
|
611
972
|
case 9: goto st20;
|
612
973
|
case 34: goto tr33;
|
@@ -626,20 +987,20 @@ case 20:
|
|
626
987
|
goto st20;
|
627
988
|
goto tr0;
|
628
989
|
tr31:
|
629
|
-
#line
|
990
|
+
#line 105 "hpricot_scan.rl"
|
630
991
|
{ mark_aval = p; }
|
631
|
-
#line
|
632
|
-
{ SET(aval, p); ATTR(
|
992
|
+
#line 118 "hpricot_scan.rl"
|
993
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
633
994
|
goto st21;
|
634
995
|
tr33:
|
635
|
-
#line
|
636
|
-
{ SET(aval, p); ATTR(
|
996
|
+
#line 118 "hpricot_scan.rl"
|
997
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
637
998
|
goto st21;
|
638
999
|
st21:
|
639
1000
|
if ( ++p == pe )
|
640
1001
|
goto _test_eof21;
|
641
1002
|
case 21:
|
642
|
-
#line
|
1003
|
+
#line 1004 "hpricot_scan.c"
|
643
1004
|
switch( (*p) ) {
|
644
1005
|
case 32: goto st22;
|
645
1006
|
case 62: goto tr18;
|
@@ -670,32 +1031,32 @@ case 23:
|
|
670
1031
|
goto tr38;
|
671
1032
|
goto tr37;
|
672
1033
|
tr37:
|
673
|
-
#line
|
1034
|
+
#line 105 "hpricot_scan.rl"
|
674
1035
|
{ mark_aval = p; }
|
675
1036
|
goto st24;
|
676
1037
|
st24:
|
677
1038
|
if ( ++p == pe )
|
678
1039
|
goto _test_eof24;
|
679
1040
|
case 24:
|
680
|
-
#line
|
1041
|
+
#line 1042 "hpricot_scan.c"
|
681
1042
|
if ( (*p) == 34 )
|
682
1043
|
goto tr41;
|
683
1044
|
goto st24;
|
684
1045
|
tr38:
|
685
|
-
#line
|
1046
|
+
#line 105 "hpricot_scan.rl"
|
686
1047
|
{ mark_aval = p; }
|
687
|
-
#line
|
688
|
-
{ SET(aval, p); ATTR(
|
1048
|
+
#line 119 "hpricot_scan.rl"
|
1049
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
689
1050
|
goto st25;
|
690
1051
|
tr41:
|
691
|
-
#line
|
692
|
-
{ SET(aval, p); ATTR(
|
1052
|
+
#line 119 "hpricot_scan.rl"
|
1053
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
693
1054
|
goto st25;
|
694
1055
|
st25:
|
695
1056
|
if ( ++p == pe )
|
696
1057
|
goto _test_eof25;
|
697
1058
|
case 25:
|
698
|
-
#line
|
1059
|
+
#line 1060 "hpricot_scan.c"
|
699
1060
|
switch( (*p) ) {
|
700
1061
|
case 32: goto st25;
|
701
1062
|
case 62: goto tr18;
|
@@ -705,14 +1066,14 @@ case 25:
|
|
705
1066
|
goto st25;
|
706
1067
|
goto tr39;
|
707
1068
|
tr16:
|
708
|
-
#line
|
1069
|
+
#line 107 "hpricot_scan.rl"
|
709
1070
|
{ SET(tag, p); }
|
710
1071
|
goto st26;
|
711
1072
|
st26:
|
712
1073
|
if ( ++p == pe )
|
713
1074
|
goto _test_eof26;
|
714
1075
|
case 26:
|
715
|
-
#line
|
1076
|
+
#line 1077 "hpricot_scan.c"
|
716
1077
|
if ( (*p) == 93 )
|
717
1078
|
goto st27;
|
718
1079
|
goto st26;
|
@@ -735,14 +1096,14 @@ case 28:
|
|
735
1096
|
goto tr38;
|
736
1097
|
goto tr44;
|
737
1098
|
tr44:
|
738
|
-
#line
|
1099
|
+
#line 105 "hpricot_scan.rl"
|
739
1100
|
{ mark_aval = p; }
|
740
1101
|
goto st29;
|
741
1102
|
st29:
|
742
1103
|
if ( ++p == pe )
|
743
1104
|
goto _test_eof29;
|
744
1105
|
case 29:
|
745
|
-
#line
|
1106
|
+
#line 1107 "hpricot_scan.c"
|
746
1107
|
if ( (*p) == 39 )
|
747
1108
|
goto tr41;
|
748
1109
|
goto st29;
|
@@ -772,14 +1133,14 @@ case 30:
|
|
772
1133
|
goto tr46;
|
773
1134
|
goto tr0;
|
774
1135
|
tr46:
|
775
|
-
#line
|
1136
|
+
#line 105 "hpricot_scan.rl"
|
776
1137
|
{ mark_aval = p; }
|
777
1138
|
goto st31;
|
778
1139
|
st31:
|
779
1140
|
if ( ++p == pe )
|
780
1141
|
goto _test_eof31;
|
781
1142
|
case 31:
|
782
|
-
#line
|
1143
|
+
#line 1144 "hpricot_scan.c"
|
783
1144
|
switch( (*p) ) {
|
784
1145
|
case 9: goto st31;
|
785
1146
|
case 39: goto tr49;
|
@@ -802,34 +1163,34 @@ case 31:
|
|
802
1163
|
goto st31;
|
803
1164
|
goto tr0;
|
804
1165
|
tr47:
|
805
|
-
#line
|
1166
|
+
#line 105 "hpricot_scan.rl"
|
806
1167
|
{ mark_aval = p; }
|
807
|
-
#line
|
808
|
-
{ SET(aval, p); ATTR(
|
1168
|
+
#line 118 "hpricot_scan.rl"
|
1169
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
809
1170
|
goto st32;
|
810
1171
|
tr49:
|
811
|
-
#line
|
812
|
-
{ SET(aval, p); ATTR(
|
1172
|
+
#line 118 "hpricot_scan.rl"
|
1173
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
813
1174
|
goto st32;
|
814
1175
|
tr55:
|
815
|
-
#line
|
816
|
-
{ SET(aval, p); ATTR(
|
817
|
-
#line
|
1176
|
+
#line 118 "hpricot_scan.rl"
|
1177
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
1178
|
+
#line 105 "hpricot_scan.rl"
|
818
1179
|
{ mark_aval = p; }
|
819
|
-
#line
|
820
|
-
{ SET(aval, p); ATTR(
|
1180
|
+
#line 119 "hpricot_scan.rl"
|
1181
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
821
1182
|
goto st32;
|
822
1183
|
tr82:
|
823
|
-
#line
|
824
|
-
{ SET(aval, p); ATTR(
|
825
|
-
#line
|
826
|
-
{ SET(aval, p); ATTR(
|
1184
|
+
#line 118 "hpricot_scan.rl"
|
1185
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
1186
|
+
#line 119 "hpricot_scan.rl"
|
1187
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
827
1188
|
goto st32;
|
828
1189
|
st32:
|
829
1190
|
if ( ++p == pe )
|
830
1191
|
goto _test_eof32;
|
831
1192
|
case 32:
|
832
|
-
#line
|
1193
|
+
#line 1194 "hpricot_scan.c"
|
833
1194
|
switch( (*p) ) {
|
834
1195
|
case 9: goto st33;
|
835
1196
|
case 32: goto st33;
|
@@ -883,20 +1244,20 @@ case 33:
|
|
883
1244
|
goto st31;
|
884
1245
|
goto tr0;
|
885
1246
|
tr51:
|
886
|
-
#line
|
887
|
-
{ SET(aval, p); ATTR(
|
1247
|
+
#line 118 "hpricot_scan.rl"
|
1248
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
888
1249
|
goto st34;
|
889
1250
|
tr62:
|
890
|
-
#line
|
891
|
-
{ SET(aval, p); ATTR(
|
892
|
-
#line
|
893
|
-
{ SET(aval, p); ATTR(
|
1251
|
+
#line 118 "hpricot_scan.rl"
|
1252
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("public_id")), aval); }
|
1253
|
+
#line 119 "hpricot_scan.rl"
|
1254
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
894
1255
|
goto st34;
|
895
1256
|
st34:
|
896
1257
|
if ( ++p == pe )
|
897
1258
|
goto _test_eof34;
|
898
1259
|
case 34:
|
899
|
-
#line
|
1260
|
+
#line 1261 "hpricot_scan.c"
|
900
1261
|
switch( (*p) ) {
|
901
1262
|
case 9: goto tr52;
|
902
1263
|
case 32: goto tr52;
|
@@ -922,14 +1283,14 @@ case 34:
|
|
922
1283
|
goto tr54;
|
923
1284
|
goto tr44;
|
924
1285
|
tr52:
|
925
|
-
#line
|
1286
|
+
#line 105 "hpricot_scan.rl"
|
926
1287
|
{ mark_aval = p; }
|
927
1288
|
goto st35;
|
928
1289
|
st35:
|
929
1290
|
if ( ++p == pe )
|
930
1291
|
goto _test_eof35;
|
931
1292
|
case 35:
|
932
|
-
#line
|
1293
|
+
#line 1294 "hpricot_scan.c"
|
933
1294
|
switch( (*p) ) {
|
934
1295
|
case 9: goto st35;
|
935
1296
|
case 32: goto st35;
|
@@ -955,14 +1316,14 @@ case 35:
|
|
955
1316
|
goto st47;
|
956
1317
|
goto st29;
|
957
1318
|
tr53:
|
958
|
-
#line
|
1319
|
+
#line 105 "hpricot_scan.rl"
|
959
1320
|
{ mark_aval = p; }
|
960
1321
|
goto st36;
|
961
1322
|
st36:
|
962
1323
|
if ( ++p == pe )
|
963
1324
|
goto _test_eof36;
|
964
1325
|
case 36:
|
965
|
-
#line
|
1326
|
+
#line 1327 "hpricot_scan.c"
|
966
1327
|
switch( (*p) ) {
|
967
1328
|
case 32: goto st36;
|
968
1329
|
case 34: goto st37;
|
@@ -983,38 +1344,38 @@ case 37:
|
|
983
1344
|
}
|
984
1345
|
goto tr66;
|
985
1346
|
tr66:
|
986
|
-
#line
|
1347
|
+
#line 105 "hpricot_scan.rl"
|
987
1348
|
{ mark_aval = p; }
|
988
1349
|
goto st38;
|
989
1350
|
st38:
|
990
1351
|
if ( ++p == pe )
|
991
1352
|
goto _test_eof38;
|
992
1353
|
case 38:
|
993
|
-
#line
|
1354
|
+
#line 1355 "hpricot_scan.c"
|
994
1355
|
switch( (*p) ) {
|
995
1356
|
case 34: goto tr70;
|
996
1357
|
case 39: goto tr71;
|
997
1358
|
}
|
998
1359
|
goto st38;
|
999
1360
|
tr81:
|
1000
|
-
#line
|
1361
|
+
#line 105 "hpricot_scan.rl"
|
1001
1362
|
{ mark_aval = p; }
|
1002
1363
|
goto st39;
|
1003
1364
|
tr67:
|
1004
|
-
#line
|
1365
|
+
#line 105 "hpricot_scan.rl"
|
1005
1366
|
{ mark_aval = p; }
|
1006
|
-
#line
|
1007
|
-
{ SET(aval, p); ATTR(
|
1367
|
+
#line 119 "hpricot_scan.rl"
|
1368
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1008
1369
|
goto st39;
|
1009
1370
|
tr70:
|
1010
|
-
#line
|
1011
|
-
{ SET(aval, p); ATTR(
|
1371
|
+
#line 119 "hpricot_scan.rl"
|
1372
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1012
1373
|
goto st39;
|
1013
1374
|
st39:
|
1014
1375
|
if ( ++p == pe )
|
1015
1376
|
goto _test_eof39;
|
1016
1377
|
case 39:
|
1017
|
-
#line
|
1378
|
+
#line 1379 "hpricot_scan.c"
|
1018
1379
|
switch( (*p) ) {
|
1019
1380
|
case 32: goto st39;
|
1020
1381
|
case 39: goto tr41;
|
@@ -1027,7 +1388,7 @@ case 39:
|
|
1027
1388
|
tr56:
|
1028
1389
|
#line 1 "hpricot_scan.rl"
|
1029
1390
|
{te = p+1;}
|
1030
|
-
#line
|
1391
|
+
#line 105 "hpricot_scan.rl"
|
1031
1392
|
{ mark_aval = p; }
|
1032
1393
|
#line 66 "hpricot_scan.rl"
|
1033
1394
|
{act = 8;}
|
@@ -1042,33 +1403,33 @@ st206:
|
|
1042
1403
|
if ( ++p == pe )
|
1043
1404
|
goto _test_eof206;
|
1044
1405
|
case 206:
|
1045
|
-
#line
|
1406
|
+
#line 1407 "hpricot_scan.c"
|
1046
1407
|
if ( (*p) == 39 )
|
1047
1408
|
goto tr41;
|
1048
1409
|
goto st29;
|
1049
1410
|
tr57:
|
1050
|
-
#line
|
1411
|
+
#line 105 "hpricot_scan.rl"
|
1051
1412
|
{ mark_aval = p; }
|
1052
1413
|
goto st40;
|
1053
1414
|
st40:
|
1054
1415
|
if ( ++p == pe )
|
1055
1416
|
goto _test_eof40;
|
1056
1417
|
case 40:
|
1057
|
-
#line
|
1418
|
+
#line 1419 "hpricot_scan.c"
|
1058
1419
|
switch( (*p) ) {
|
1059
1420
|
case 39: goto tr73;
|
1060
1421
|
case 93: goto st42;
|
1061
1422
|
}
|
1062
1423
|
goto st40;
|
1063
1424
|
tr73:
|
1064
|
-
#line
|
1065
|
-
{ SET(aval, p); ATTR(
|
1425
|
+
#line 119 "hpricot_scan.rl"
|
1426
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1066
1427
|
goto st41;
|
1067
1428
|
st41:
|
1068
1429
|
if ( ++p == pe )
|
1069
1430
|
goto _test_eof41;
|
1070
1431
|
case 41:
|
1071
|
-
#line
|
1432
|
+
#line 1433 "hpricot_scan.c"
|
1072
1433
|
switch( (*p) ) {
|
1073
1434
|
case 32: goto st41;
|
1074
1435
|
case 62: goto tr76;
|
@@ -1087,7 +1448,7 @@ st207:
|
|
1087
1448
|
if ( ++p == pe )
|
1088
1449
|
goto _test_eof207;
|
1089
1450
|
case 207:
|
1090
|
-
#line
|
1451
|
+
#line 1452 "hpricot_scan.c"
|
1091
1452
|
if ( (*p) == 93 )
|
1092
1453
|
goto st27;
|
1093
1454
|
goto st26;
|
@@ -1104,20 +1465,20 @@ case 42:
|
|
1104
1465
|
goto st42;
|
1105
1466
|
goto st29;
|
1106
1467
|
tr68:
|
1107
|
-
#line
|
1468
|
+
#line 105 "hpricot_scan.rl"
|
1108
1469
|
{ mark_aval = p; }
|
1109
|
-
#line
|
1110
|
-
{ SET(aval, p); ATTR(
|
1470
|
+
#line 119 "hpricot_scan.rl"
|
1471
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1111
1472
|
goto st43;
|
1112
1473
|
tr71:
|
1113
|
-
#line
|
1114
|
-
{ SET(aval, p); ATTR(
|
1474
|
+
#line 119 "hpricot_scan.rl"
|
1475
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1115
1476
|
goto st43;
|
1116
1477
|
st43:
|
1117
1478
|
if ( ++p == pe )
|
1118
1479
|
goto _test_eof43;
|
1119
1480
|
case 43:
|
1120
|
-
#line
|
1481
|
+
#line 1482 "hpricot_scan.c"
|
1121
1482
|
switch( (*p) ) {
|
1122
1483
|
case 32: goto st43;
|
1123
1484
|
case 34: goto tr41;
|
@@ -1137,7 +1498,7 @@ st208:
|
|
1137
1498
|
if ( ++p == pe )
|
1138
1499
|
goto _test_eof208;
|
1139
1500
|
case 208:
|
1140
|
-
#line
|
1501
|
+
#line 1502 "hpricot_scan.c"
|
1141
1502
|
if ( (*p) == 34 )
|
1142
1503
|
goto tr41;
|
1143
1504
|
goto st24;
|
@@ -1163,14 +1524,14 @@ case 45:
|
|
1163
1524
|
goto st45;
|
1164
1525
|
goto st24;
|
1165
1526
|
tr65:
|
1166
|
-
#line
|
1167
|
-
{ SET(aval, p); ATTR(
|
1527
|
+
#line 119 "hpricot_scan.rl"
|
1528
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("system_id")), aval); }
|
1168
1529
|
goto st46;
|
1169
1530
|
st46:
|
1170
1531
|
if ( ++p == pe )
|
1171
1532
|
goto _test_eof46;
|
1172
1533
|
case 46:
|
1173
|
-
#line
|
1534
|
+
#line 1535 "hpricot_scan.c"
|
1174
1535
|
switch( (*p) ) {
|
1175
1536
|
case 32: goto tr81;
|
1176
1537
|
case 39: goto tr38;
|
@@ -1181,14 +1542,14 @@ case 46:
|
|
1181
1542
|
goto tr81;
|
1182
1543
|
goto tr44;
|
1183
1544
|
tr54:
|
1184
|
-
#line
|
1545
|
+
#line 105 "hpricot_scan.rl"
|
1185
1546
|
{ mark_aval = p; }
|
1186
1547
|
goto st47;
|
1187
1548
|
st47:
|
1188
1549
|
if ( ++p == pe )
|
1189
1550
|
goto _test_eof47;
|
1190
1551
|
case 47:
|
1191
|
-
#line
|
1552
|
+
#line 1553 "hpricot_scan.c"
|
1192
1553
|
switch( (*p) ) {
|
1193
1554
|
case 9: goto st47;
|
1194
1555
|
case 39: goto tr82;
|
@@ -1302,14 +1663,14 @@ case 59:
|
|
1302
1663
|
goto tr94;
|
1303
1664
|
goto tr0;
|
1304
1665
|
tr94:
|
1305
|
-
#line
|
1666
|
+
#line 104 "hpricot_scan.rl"
|
1306
1667
|
{ mark_tag = p; }
|
1307
1668
|
goto st60;
|
1308
1669
|
st60:
|
1309
1670
|
if ( ++p == pe )
|
1310
1671
|
goto _test_eof60;
|
1311
1672
|
case 60:
|
1312
|
-
#line
|
1673
|
+
#line 1674 "hpricot_scan.c"
|
1313
1674
|
switch( (*p) ) {
|
1314
1675
|
case 32: goto tr95;
|
1315
1676
|
case 62: goto tr97;
|
@@ -1332,14 +1693,14 @@ case 60:
|
|
1332
1693
|
goto st60;
|
1333
1694
|
goto tr0;
|
1334
1695
|
tr95:
|
1335
|
-
#line
|
1696
|
+
#line 107 "hpricot_scan.rl"
|
1336
1697
|
{ SET(tag, p); }
|
1337
1698
|
goto st61;
|
1338
1699
|
st61:
|
1339
1700
|
if ( ++p == pe )
|
1340
1701
|
goto _test_eof61;
|
1341
1702
|
case 61:
|
1342
|
-
#line
|
1703
|
+
#line 1704 "hpricot_scan.c"
|
1343
1704
|
switch( (*p) ) {
|
1344
1705
|
case 32: goto st61;
|
1345
1706
|
case 62: goto tr99;
|
@@ -1348,14 +1709,14 @@ case 61:
|
|
1348
1709
|
goto st61;
|
1349
1710
|
goto tr0;
|
1350
1711
|
tr417:
|
1351
|
-
#line
|
1712
|
+
#line 104 "hpricot_scan.rl"
|
1352
1713
|
{ mark_tag = p; }
|
1353
1714
|
goto st62;
|
1354
1715
|
st62:
|
1355
1716
|
if ( ++p == pe )
|
1356
1717
|
goto _test_eof62;
|
1357
1718
|
case 62:
|
1358
|
-
#line
|
1719
|
+
#line 1720 "hpricot_scan.c"
|
1359
1720
|
switch( (*p) ) {
|
1360
1721
|
case 32: goto tr100;
|
1361
1722
|
case 47: goto tr102;
|
@@ -1376,14 +1737,14 @@ case 62:
|
|
1376
1737
|
goto st62;
|
1377
1738
|
goto tr0;
|
1378
1739
|
tr100:
|
1379
|
-
#line
|
1740
|
+
#line 107 "hpricot_scan.rl"
|
1380
1741
|
{ SET(tag, p); }
|
1381
1742
|
goto st63;
|
1382
1743
|
st63:
|
1383
1744
|
if ( ++p == pe )
|
1384
1745
|
goto _test_eof63;
|
1385
1746
|
case 63:
|
1386
|
-
#line
|
1747
|
+
#line 1748 "hpricot_scan.c"
|
1387
1748
|
switch( (*p) ) {
|
1388
1749
|
case 32: goto st63;
|
1389
1750
|
case 47: goto st66;
|
@@ -1404,36 +1765,36 @@ case 63:
|
|
1404
1765
|
goto tr105;
|
1405
1766
|
goto tr0;
|
1406
1767
|
tr105:
|
1407
|
-
#line
|
1768
|
+
#line 121 "hpricot_scan.rl"
|
1408
1769
|
{
|
1409
1770
|
akey = Qnil;
|
1410
1771
|
aval = Qnil;
|
1411
1772
|
mark_akey = NULL;
|
1412
1773
|
mark_aval = NULL;
|
1413
1774
|
}
|
1414
|
-
#line
|
1775
|
+
#line 106 "hpricot_scan.rl"
|
1415
1776
|
{ mark_akey = p; }
|
1416
1777
|
goto st64;
|
1417
1778
|
tr114:
|
1418
|
-
#line
|
1779
|
+
#line 128 "hpricot_scan.rl"
|
1419
1780
|
{
|
1420
1781
|
ATTR(akey, aval);
|
1421
1782
|
}
|
1422
|
-
#line
|
1783
|
+
#line 121 "hpricot_scan.rl"
|
1423
1784
|
{
|
1424
1785
|
akey = Qnil;
|
1425
1786
|
aval = Qnil;
|
1426
1787
|
mark_akey = NULL;
|
1427
1788
|
mark_aval = NULL;
|
1428
1789
|
}
|
1429
|
-
#line
|
1790
|
+
#line 106 "hpricot_scan.rl"
|
1430
1791
|
{ mark_akey = p; }
|
1431
1792
|
goto st64;
|
1432
1793
|
st64:
|
1433
1794
|
if ( ++p == pe )
|
1434
1795
|
goto _test_eof64;
|
1435
1796
|
case 64:
|
1436
|
-
#line
|
1797
|
+
#line 1798 "hpricot_scan.c"
|
1437
1798
|
switch( (*p) ) {
|
1438
1799
|
case 32: goto tr108;
|
1439
1800
|
case 47: goto tr110;
|
@@ -1455,20 +1816,20 @@ case 64:
|
|
1455
1816
|
goto st64;
|
1456
1817
|
goto tr39;
|
1457
1818
|
tr108:
|
1458
|
-
#line
|
1819
|
+
#line 114 "hpricot_scan.rl"
|
1459
1820
|
{ SET(akey, p); }
|
1460
1821
|
goto st65;
|
1461
1822
|
tr140:
|
1462
|
-
#line
|
1823
|
+
#line 110 "hpricot_scan.rl"
|
1463
1824
|
{
|
1464
1825
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1465
1826
|
else { SET(aval, p); }
|
1466
1827
|
}
|
1467
1828
|
goto st65;
|
1468
1829
|
tr134:
|
1469
|
-
#line
|
1830
|
+
#line 114 "hpricot_scan.rl"
|
1470
1831
|
{ SET(akey, p); }
|
1471
|
-
#line
|
1832
|
+
#line 110 "hpricot_scan.rl"
|
1472
1833
|
{
|
1473
1834
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1474
1835
|
else { SET(aval, p); }
|
@@ -1478,7 +1839,7 @@ st65:
|
|
1478
1839
|
if ( ++p == pe )
|
1479
1840
|
goto _test_eof65;
|
1480
1841
|
case 65:
|
1481
|
-
#line
|
1842
|
+
#line 1843 "hpricot_scan.c"
|
1482
1843
|
switch( (*p) ) {
|
1483
1844
|
case 32: goto st65;
|
1484
1845
|
case 47: goto tr115;
|
@@ -1500,19 +1861,19 @@ case 65:
|
|
1500
1861
|
goto tr114;
|
1501
1862
|
goto tr39;
|
1502
1863
|
tr102:
|
1503
|
-
#line
|
1864
|
+
#line 107 "hpricot_scan.rl"
|
1504
1865
|
{ SET(tag, p); }
|
1505
1866
|
goto st66;
|
1506
1867
|
tr110:
|
1507
|
-
#line
|
1868
|
+
#line 114 "hpricot_scan.rl"
|
1508
1869
|
{ SET(akey, p); }
|
1509
|
-
#line
|
1870
|
+
#line 128 "hpricot_scan.rl"
|
1510
1871
|
{
|
1511
1872
|
ATTR(akey, aval);
|
1512
1873
|
}
|
1513
1874
|
goto st66;
|
1514
1875
|
tr115:
|
1515
|
-
#line
|
1876
|
+
#line 128 "hpricot_scan.rl"
|
1516
1877
|
{
|
1517
1878
|
ATTR(akey, aval);
|
1518
1879
|
}
|
@@ -1521,19 +1882,19 @@ st66:
|
|
1521
1882
|
if ( ++p == pe )
|
1522
1883
|
goto _test_eof66;
|
1523
1884
|
case 66:
|
1524
|
-
#line
|
1885
|
+
#line 1886 "hpricot_scan.c"
|
1525
1886
|
if ( (*p) == 62 )
|
1526
1887
|
goto tr118;
|
1527
1888
|
goto tr39;
|
1528
1889
|
tr111:
|
1529
|
-
#line
|
1890
|
+
#line 114 "hpricot_scan.rl"
|
1530
1891
|
{ SET(akey, p); }
|
1531
1892
|
goto st67;
|
1532
1893
|
st67:
|
1533
1894
|
if ( ++p == pe )
|
1534
1895
|
goto _test_eof67;
|
1535
1896
|
case 67:
|
1536
|
-
#line
|
1897
|
+
#line 1898 "hpricot_scan.c"
|
1537
1898
|
switch( (*p) ) {
|
1538
1899
|
case 13: goto tr120;
|
1539
1900
|
case 32: goto tr120;
|
@@ -1550,14 +1911,14 @@ case 67:
|
|
1550
1911
|
goto tr120;
|
1551
1912
|
goto tr119;
|
1552
1913
|
tr119:
|
1553
|
-
#line
|
1914
|
+
#line 105 "hpricot_scan.rl"
|
1554
1915
|
{ mark_aval = p; }
|
1555
1916
|
goto st68;
|
1556
1917
|
st68:
|
1557
1918
|
if ( ++p == pe )
|
1558
1919
|
goto _test_eof68;
|
1559
1920
|
case 68:
|
1560
|
-
#line
|
1921
|
+
#line 1922 "hpricot_scan.c"
|
1561
1922
|
switch( (*p) ) {
|
1562
1923
|
case 13: goto tr126;
|
1563
1924
|
case 32: goto tr126;
|
@@ -1572,27 +1933,27 @@ case 68:
|
|
1572
1933
|
goto tr126;
|
1573
1934
|
goto st68;
|
1574
1935
|
tr126:
|
1575
|
-
#line
|
1936
|
+
#line 110 "hpricot_scan.rl"
|
1576
1937
|
{
|
1577
1938
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1578
1939
|
else { SET(aval, p); }
|
1579
1940
|
}
|
1580
1941
|
goto st69;
|
1581
1942
|
tr331:
|
1582
|
-
#line
|
1943
|
+
#line 105 "hpricot_scan.rl"
|
1583
1944
|
{ mark_aval = p; }
|
1584
|
-
#line
|
1945
|
+
#line 109 "hpricot_scan.rl"
|
1585
1946
|
{ SET(aval, p); }
|
1586
1947
|
goto st69;
|
1587
1948
|
tr169:
|
1588
|
-
#line
|
1949
|
+
#line 109 "hpricot_scan.rl"
|
1589
1950
|
{ SET(aval, p); }
|
1590
1951
|
goto st69;
|
1591
1952
|
st69:
|
1592
1953
|
if ( ++p == pe )
|
1593
1954
|
goto _test_eof69;
|
1594
1955
|
case 69:
|
1595
|
-
#line
|
1956
|
+
#line 1957 "hpricot_scan.c"
|
1596
1957
|
switch( (*p) ) {
|
1597
1958
|
case 32: goto st69;
|
1598
1959
|
case 47: goto tr115;
|
@@ -1613,27 +1974,27 @@ case 69:
|
|
1613
1974
|
goto tr114;
|
1614
1975
|
goto tr39;
|
1615
1976
|
tr127:
|
1616
|
-
#line
|
1977
|
+
#line 110 "hpricot_scan.rl"
|
1617
1978
|
{
|
1618
1979
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1619
1980
|
else { SET(aval, p); }
|
1620
1981
|
}
|
1621
1982
|
goto st70;
|
1622
1983
|
tr155:
|
1623
|
-
#line
|
1984
|
+
#line 105 "hpricot_scan.rl"
|
1624
1985
|
{ mark_aval = p; }
|
1625
|
-
#line
|
1986
|
+
#line 109 "hpricot_scan.rl"
|
1626
1987
|
{ SET(aval, p); }
|
1627
1988
|
goto st70;
|
1628
1989
|
tr163:
|
1629
|
-
#line
|
1990
|
+
#line 109 "hpricot_scan.rl"
|
1630
1991
|
{ SET(aval, p); }
|
1631
1992
|
goto st70;
|
1632
1993
|
st70:
|
1633
1994
|
if ( ++p == pe )
|
1634
1995
|
goto _test_eof70;
|
1635
1996
|
case 70:
|
1636
|
-
#line
|
1997
|
+
#line 1998 "hpricot_scan.c"
|
1637
1998
|
switch( (*p) ) {
|
1638
1999
|
case 13: goto tr126;
|
1639
2000
|
case 32: goto tr126;
|
@@ -1659,42 +2020,42 @@ case 70:
|
|
1659
2020
|
goto tr131;
|
1660
2021
|
goto st68;
|
1661
2022
|
tr131:
|
1662
|
-
#line
|
2023
|
+
#line 128 "hpricot_scan.rl"
|
1663
2024
|
{
|
1664
2025
|
ATTR(akey, aval);
|
1665
2026
|
}
|
1666
|
-
#line
|
2027
|
+
#line 121 "hpricot_scan.rl"
|
1667
2028
|
{
|
1668
2029
|
akey = Qnil;
|
1669
2030
|
aval = Qnil;
|
1670
2031
|
mark_akey = NULL;
|
1671
2032
|
mark_aval = NULL;
|
1672
2033
|
}
|
1673
|
-
#line
|
2034
|
+
#line 106 "hpricot_scan.rl"
|
1674
2035
|
{ mark_akey = p; }
|
1675
2036
|
goto st71;
|
1676
2037
|
tr150:
|
1677
|
-
#line
|
2038
|
+
#line 105 "hpricot_scan.rl"
|
1678
2039
|
{ mark_aval = p; }
|
1679
|
-
#line
|
2040
|
+
#line 128 "hpricot_scan.rl"
|
1680
2041
|
{
|
1681
2042
|
ATTR(akey, aval);
|
1682
2043
|
}
|
1683
|
-
#line
|
2044
|
+
#line 121 "hpricot_scan.rl"
|
1684
2045
|
{
|
1685
2046
|
akey = Qnil;
|
1686
2047
|
aval = Qnil;
|
1687
2048
|
mark_akey = NULL;
|
1688
2049
|
mark_aval = NULL;
|
1689
2050
|
}
|
1690
|
-
#line
|
2051
|
+
#line 106 "hpricot_scan.rl"
|
1691
2052
|
{ mark_akey = p; }
|
1692
2053
|
goto st71;
|
1693
2054
|
st71:
|
1694
2055
|
if ( ++p == pe )
|
1695
2056
|
goto _test_eof71;
|
1696
2057
|
case 71:
|
1697
|
-
#line
|
2058
|
+
#line 2059 "hpricot_scan.c"
|
1698
2059
|
switch( (*p) ) {
|
1699
2060
|
case 13: goto tr134;
|
1700
2061
|
case 32: goto tr134;
|
@@ -1721,16 +2082,16 @@ case 71:
|
|
1721
2082
|
goto st71;
|
1722
2083
|
goto st68;
|
1723
2084
|
tr141:
|
1724
|
-
#line
|
2085
|
+
#line 110 "hpricot_scan.rl"
|
1725
2086
|
{
|
1726
2087
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1727
2088
|
else { SET(aval, p); }
|
1728
2089
|
}
|
1729
2090
|
goto st72;
|
1730
2091
|
tr135:
|
1731
|
-
#line
|
2092
|
+
#line 114 "hpricot_scan.rl"
|
1732
2093
|
{ SET(akey, p); }
|
1733
|
-
#line
|
2094
|
+
#line 110 "hpricot_scan.rl"
|
1734
2095
|
{
|
1735
2096
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1736
2097
|
else { SET(aval, p); }
|
@@ -1740,7 +2101,7 @@ st72:
|
|
1740
2101
|
if ( ++p == pe )
|
1741
2102
|
goto _test_eof72;
|
1742
2103
|
case 72:
|
1743
|
-
#line
|
2104
|
+
#line 2105 "hpricot_scan.c"
|
1744
2105
|
switch( (*p) ) {
|
1745
2106
|
case 13: goto tr140;
|
1746
2107
|
case 32: goto tr140;
|
@@ -1767,69 +2128,69 @@ case 72:
|
|
1767
2128
|
goto tr131;
|
1768
2129
|
goto st68;
|
1769
2130
|
tr124:
|
1770
|
-
#line
|
2131
|
+
#line 105 "hpricot_scan.rl"
|
1771
2132
|
{ mark_aval = p; }
|
1772
|
-
#line
|
2133
|
+
#line 128 "hpricot_scan.rl"
|
1773
2134
|
{
|
1774
2135
|
ATTR(akey, aval);
|
1775
2136
|
}
|
1776
2137
|
goto st73;
|
1777
2138
|
tr128:
|
1778
|
-
#line
|
2139
|
+
#line 110 "hpricot_scan.rl"
|
1779
2140
|
{
|
1780
2141
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1781
2142
|
else { SET(aval, p); }
|
1782
2143
|
}
|
1783
|
-
#line
|
2144
|
+
#line 128 "hpricot_scan.rl"
|
1784
2145
|
{
|
1785
2146
|
ATTR(akey, aval);
|
1786
2147
|
}
|
1787
2148
|
goto st73;
|
1788
2149
|
tr132:
|
1789
|
-
#line
|
2150
|
+
#line 128 "hpricot_scan.rl"
|
1790
2151
|
{
|
1791
2152
|
ATTR(akey, aval);
|
1792
2153
|
}
|
1793
|
-
#line
|
2154
|
+
#line 110 "hpricot_scan.rl"
|
1794
2155
|
{
|
1795
2156
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1796
2157
|
else { SET(aval, p); }
|
1797
2158
|
}
|
1798
2159
|
goto st73;
|
1799
2160
|
tr137:
|
1800
|
-
#line
|
2161
|
+
#line 110 "hpricot_scan.rl"
|
1801
2162
|
{
|
1802
2163
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1803
2164
|
else { SET(aval, p); }
|
1804
2165
|
}
|
1805
|
-
#line
|
2166
|
+
#line 114 "hpricot_scan.rl"
|
1806
2167
|
{ SET(akey, p); }
|
1807
|
-
#line
|
2168
|
+
#line 128 "hpricot_scan.rl"
|
1808
2169
|
{
|
1809
2170
|
ATTR(akey, aval);
|
1810
2171
|
}
|
1811
2172
|
goto st73;
|
1812
2173
|
tr147:
|
1813
|
-
#line
|
2174
|
+
#line 105 "hpricot_scan.rl"
|
1814
2175
|
{ mark_aval = p; }
|
1815
|
-
#line
|
2176
|
+
#line 110 "hpricot_scan.rl"
|
1816
2177
|
{
|
1817
2178
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1818
2179
|
else { SET(aval, p); }
|
1819
2180
|
}
|
1820
|
-
#line
|
2181
|
+
#line 128 "hpricot_scan.rl"
|
1821
2182
|
{
|
1822
2183
|
ATTR(akey, aval);
|
1823
2184
|
}
|
1824
2185
|
goto st73;
|
1825
2186
|
tr151:
|
1826
|
-
#line
|
2187
|
+
#line 105 "hpricot_scan.rl"
|
1827
2188
|
{ mark_aval = p; }
|
1828
|
-
#line
|
2189
|
+
#line 128 "hpricot_scan.rl"
|
1829
2190
|
{
|
1830
2191
|
ATTR(akey, aval);
|
1831
2192
|
}
|
1832
|
-
#line
|
2193
|
+
#line 110 "hpricot_scan.rl"
|
1833
2194
|
{
|
1834
2195
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1835
2196
|
else { SET(aval, p); }
|
@@ -1839,7 +2200,7 @@ st73:
|
|
1839
2200
|
if ( ++p == pe )
|
1840
2201
|
goto _test_eof73;
|
1841
2202
|
case 73:
|
1842
|
-
#line
|
2203
|
+
#line 2204 "hpricot_scan.c"
|
1843
2204
|
switch( (*p) ) {
|
1844
2205
|
case 13: goto tr126;
|
1845
2206
|
case 32: goto tr126;
|
@@ -1854,18 +2215,18 @@ case 73:
|
|
1854
2215
|
goto tr126;
|
1855
2216
|
goto st68;
|
1856
2217
|
tr121:
|
1857
|
-
#line
|
2218
|
+
#line 105 "hpricot_scan.rl"
|
1858
2219
|
{ mark_aval = p; }
|
1859
2220
|
goto st74;
|
1860
2221
|
tr138:
|
1861
|
-
#line
|
2222
|
+
#line 114 "hpricot_scan.rl"
|
1862
2223
|
{ SET(akey, p); }
|
1863
2224
|
goto st74;
|
1864
2225
|
st74:
|
1865
2226
|
if ( ++p == pe )
|
1866
2227
|
goto _test_eof74;
|
1867
2228
|
case 74:
|
1868
|
-
#line
|
2229
|
+
#line 2230 "hpricot_scan.c"
|
1869
2230
|
switch( (*p) ) {
|
1870
2231
|
case 13: goto tr143;
|
1871
2232
|
case 32: goto tr143;
|
@@ -1882,13 +2243,13 @@ case 74:
|
|
1882
2243
|
goto tr143;
|
1883
2244
|
goto tr119;
|
1884
2245
|
tr148:
|
1885
|
-
#line
|
2246
|
+
#line 105 "hpricot_scan.rl"
|
1886
2247
|
{ mark_aval = p; }
|
1887
2248
|
goto st75;
|
1888
2249
|
tr143:
|
1889
|
-
#line
|
2250
|
+
#line 105 "hpricot_scan.rl"
|
1890
2251
|
{ mark_aval = p; }
|
1891
|
-
#line
|
2252
|
+
#line 110 "hpricot_scan.rl"
|
1892
2253
|
{
|
1893
2254
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1894
2255
|
else { SET(aval, p); }
|
@@ -1898,7 +2259,7 @@ st75:
|
|
1898
2259
|
if ( ++p == pe )
|
1899
2260
|
goto _test_eof75;
|
1900
2261
|
case 75:
|
1901
|
-
#line
|
2262
|
+
#line 2263 "hpricot_scan.c"
|
1902
2263
|
switch( (*p) ) {
|
1903
2264
|
case 13: goto tr148;
|
1904
2265
|
case 32: goto tr148;
|
@@ -1926,13 +2287,13 @@ case 75:
|
|
1926
2287
|
goto tr150;
|
1927
2288
|
goto tr119;
|
1928
2289
|
tr149:
|
1929
|
-
#line
|
2290
|
+
#line 105 "hpricot_scan.rl"
|
1930
2291
|
{ mark_aval = p; }
|
1931
2292
|
goto st76;
|
1932
2293
|
tr144:
|
1933
|
-
#line
|
2294
|
+
#line 105 "hpricot_scan.rl"
|
1934
2295
|
{ mark_aval = p; }
|
1935
|
-
#line
|
2296
|
+
#line 110 "hpricot_scan.rl"
|
1936
2297
|
{
|
1937
2298
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
1938
2299
|
else { SET(aval, p); }
|
@@ -1942,7 +2303,7 @@ st76:
|
|
1942
2303
|
if ( ++p == pe )
|
1943
2304
|
goto _test_eof76;
|
1944
2305
|
case 76:
|
1945
|
-
#line
|
2306
|
+
#line 2307 "hpricot_scan.c"
|
1946
2307
|
switch( (*p) ) {
|
1947
2308
|
case 13: goto tr143;
|
1948
2309
|
case 32: goto tr143;
|
@@ -1989,14 +2350,14 @@ case 77:
|
|
1989
2350
|
goto tr153;
|
1990
2351
|
goto tr152;
|
1991
2352
|
tr152:
|
1992
|
-
#line
|
2353
|
+
#line 105 "hpricot_scan.rl"
|
1993
2354
|
{ mark_aval = p; }
|
1994
2355
|
goto st78;
|
1995
2356
|
st78:
|
1996
2357
|
if ( ++p == pe )
|
1997
2358
|
goto _test_eof78;
|
1998
2359
|
case 78:
|
1999
|
-
#line
|
2360
|
+
#line 2361 "hpricot_scan.c"
|
2000
2361
|
switch( (*p) ) {
|
2001
2362
|
case 13: goto tr161;
|
2002
2363
|
case 32: goto tr161;
|
@@ -2013,40 +2374,40 @@ case 78:
|
|
2013
2374
|
goto tr161;
|
2014
2375
|
goto st78;
|
2015
2376
|
tr336:
|
2016
|
-
#line
|
2377
|
+
#line 105 "hpricot_scan.rl"
|
2017
2378
|
{ mark_aval = p; }
|
2018
2379
|
goto st79;
|
2019
2380
|
tr161:
|
2020
|
-
#line
|
2381
|
+
#line 110 "hpricot_scan.rl"
|
2021
2382
|
{
|
2022
2383
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2023
2384
|
else { SET(aval, p); }
|
2024
2385
|
}
|
2025
2386
|
goto st79;
|
2026
2387
|
tr153:
|
2027
|
-
#line
|
2388
|
+
#line 105 "hpricot_scan.rl"
|
2028
2389
|
{ mark_aval = p; }
|
2029
|
-
#line
|
2390
|
+
#line 110 "hpricot_scan.rl"
|
2030
2391
|
{
|
2031
2392
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2032
2393
|
else { SET(aval, p); }
|
2033
2394
|
}
|
2034
2395
|
goto st79;
|
2035
2396
|
tr317:
|
2036
|
-
#line
|
2397
|
+
#line 105 "hpricot_scan.rl"
|
2037
2398
|
{ mark_aval = p; }
|
2038
|
-
#line
|
2399
|
+
#line 109 "hpricot_scan.rl"
|
2039
2400
|
{ SET(aval, p); }
|
2040
2401
|
goto st79;
|
2041
2402
|
tr174:
|
2042
|
-
#line
|
2403
|
+
#line 109 "hpricot_scan.rl"
|
2043
2404
|
{ SET(aval, p); }
|
2044
2405
|
goto st79;
|
2045
2406
|
st79:
|
2046
2407
|
if ( ++p == pe )
|
2047
2408
|
goto _test_eof79;
|
2048
2409
|
case 79:
|
2049
|
-
#line
|
2410
|
+
#line 2411 "hpricot_scan.c"
|
2050
2411
|
switch( (*p) ) {
|
2051
2412
|
case 32: goto st79;
|
2052
2413
|
case 34: goto tr169;
|
@@ -2069,70 +2430,70 @@ case 79:
|
|
2069
2430
|
goto tr170;
|
2070
2431
|
goto st80;
|
2071
2432
|
tr157:
|
2072
|
-
#line
|
2433
|
+
#line 105 "hpricot_scan.rl"
|
2073
2434
|
{ mark_aval = p; }
|
2074
2435
|
goto st80;
|
2075
2436
|
st80:
|
2076
2437
|
if ( ++p == pe )
|
2077
2438
|
goto _test_eof80;
|
2078
2439
|
case 80:
|
2079
|
-
#line
|
2440
|
+
#line 2441 "hpricot_scan.c"
|
2080
2441
|
switch( (*p) ) {
|
2081
2442
|
case 34: goto tr169;
|
2082
2443
|
case 92: goto st81;
|
2083
2444
|
}
|
2084
2445
|
goto st80;
|
2085
2446
|
tr340:
|
2086
|
-
#line
|
2447
|
+
#line 105 "hpricot_scan.rl"
|
2087
2448
|
{ mark_aval = p; }
|
2088
2449
|
goto st81;
|
2089
2450
|
st81:
|
2090
2451
|
if ( ++p == pe )
|
2091
2452
|
goto _test_eof81;
|
2092
2453
|
case 81:
|
2093
|
-
#line
|
2454
|
+
#line 2455 "hpricot_scan.c"
|
2094
2455
|
switch( (*p) ) {
|
2095
2456
|
case 34: goto tr174;
|
2096
2457
|
case 92: goto st81;
|
2097
2458
|
}
|
2098
2459
|
goto st80;
|
2099
2460
|
tr170:
|
2100
|
-
#line
|
2461
|
+
#line 128 "hpricot_scan.rl"
|
2101
2462
|
{
|
2102
2463
|
ATTR(akey, aval);
|
2103
2464
|
}
|
2104
|
-
#line
|
2465
|
+
#line 121 "hpricot_scan.rl"
|
2105
2466
|
{
|
2106
2467
|
akey = Qnil;
|
2107
2468
|
aval = Qnil;
|
2108
2469
|
mark_akey = NULL;
|
2109
2470
|
mark_aval = NULL;
|
2110
2471
|
}
|
2111
|
-
#line
|
2472
|
+
#line 106 "hpricot_scan.rl"
|
2112
2473
|
{ mark_akey = p; }
|
2113
2474
|
goto st82;
|
2114
2475
|
tr337:
|
2115
|
-
#line
|
2476
|
+
#line 105 "hpricot_scan.rl"
|
2116
2477
|
{ mark_aval = p; }
|
2117
|
-
#line
|
2478
|
+
#line 128 "hpricot_scan.rl"
|
2118
2479
|
{
|
2119
2480
|
ATTR(akey, aval);
|
2120
2481
|
}
|
2121
|
-
#line
|
2482
|
+
#line 121 "hpricot_scan.rl"
|
2122
2483
|
{
|
2123
2484
|
akey = Qnil;
|
2124
2485
|
aval = Qnil;
|
2125
2486
|
mark_akey = NULL;
|
2126
2487
|
mark_aval = NULL;
|
2127
2488
|
}
|
2128
|
-
#line
|
2489
|
+
#line 106 "hpricot_scan.rl"
|
2129
2490
|
{ mark_akey = p; }
|
2130
2491
|
goto st82;
|
2131
2492
|
st82:
|
2132
2493
|
if ( ++p == pe )
|
2133
2494
|
goto _test_eof82;
|
2134
2495
|
case 82:
|
2135
|
-
#line
|
2496
|
+
#line 2497 "hpricot_scan.c"
|
2136
2497
|
switch( (*p) ) {
|
2137
2498
|
case 32: goto tr175;
|
2138
2499
|
case 34: goto tr169;
|
@@ -2156,20 +2517,20 @@ case 82:
|
|
2156
2517
|
goto st82;
|
2157
2518
|
goto st80;
|
2158
2519
|
tr175:
|
2159
|
-
#line
|
2520
|
+
#line 114 "hpricot_scan.rl"
|
2160
2521
|
{ SET(akey, p); }
|
2161
2522
|
goto st83;
|
2162
2523
|
tr206:
|
2163
|
-
#line
|
2524
|
+
#line 110 "hpricot_scan.rl"
|
2164
2525
|
{
|
2165
2526
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2166
2527
|
else { SET(aval, p); }
|
2167
2528
|
}
|
2168
2529
|
goto st83;
|
2169
2530
|
tr200:
|
2170
|
-
#line
|
2531
|
+
#line 114 "hpricot_scan.rl"
|
2171
2532
|
{ SET(akey, p); }
|
2172
|
-
#line
|
2533
|
+
#line 110 "hpricot_scan.rl"
|
2173
2534
|
{
|
2174
2535
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2175
2536
|
else { SET(aval, p); }
|
@@ -2179,7 +2540,7 @@ st83:
|
|
2179
2540
|
if ( ++p == pe )
|
2180
2541
|
goto _test_eof83;
|
2181
2542
|
case 83:
|
2182
|
-
#line
|
2543
|
+
#line 2544 "hpricot_scan.c"
|
2183
2544
|
switch( (*p) ) {
|
2184
2545
|
case 32: goto st83;
|
2185
2546
|
case 34: goto tr169;
|
@@ -2203,23 +2564,23 @@ case 83:
|
|
2203
2564
|
goto tr170;
|
2204
2565
|
goto st80;
|
2205
2566
|
tr177:
|
2206
|
-
#line
|
2567
|
+
#line 114 "hpricot_scan.rl"
|
2207
2568
|
{ SET(akey, p); }
|
2208
|
-
#line
|
2569
|
+
#line 128 "hpricot_scan.rl"
|
2209
2570
|
{
|
2210
2571
|
ATTR(akey, aval);
|
2211
2572
|
}
|
2212
2573
|
goto st84;
|
2213
2574
|
tr171:
|
2214
|
-
#line
|
2575
|
+
#line 128 "hpricot_scan.rl"
|
2215
2576
|
{
|
2216
2577
|
ATTR(akey, aval);
|
2217
2578
|
}
|
2218
2579
|
goto st84;
|
2219
2580
|
tr338:
|
2220
|
-
#line
|
2581
|
+
#line 105 "hpricot_scan.rl"
|
2221
2582
|
{ mark_aval = p; }
|
2222
|
-
#line
|
2583
|
+
#line 128 "hpricot_scan.rl"
|
2223
2584
|
{
|
2224
2585
|
ATTR(akey, aval);
|
2225
2586
|
}
|
@@ -2228,7 +2589,7 @@ st84:
|
|
2228
2589
|
if ( ++p == pe )
|
2229
2590
|
goto _test_eof84;
|
2230
2591
|
case 84:
|
2231
|
-
#line
|
2592
|
+
#line 2593 "hpricot_scan.c"
|
2232
2593
|
switch( (*p) ) {
|
2233
2594
|
case 34: goto tr169;
|
2234
2595
|
case 62: goto tr182;
|
@@ -2238,14 +2599,14 @@ case 84:
|
|
2238
2599
|
tr158:
|
2239
2600
|
#line 1 "hpricot_scan.rl"
|
2240
2601
|
{te = p+1;}
|
2241
|
-
#line
|
2602
|
+
#line 105 "hpricot_scan.rl"
|
2242
2603
|
{ mark_aval = p; }
|
2243
|
-
#line
|
2604
|
+
#line 110 "hpricot_scan.rl"
|
2244
2605
|
{
|
2245
2606
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2246
2607
|
else { SET(aval, p); }
|
2247
2608
|
}
|
2248
|
-
#line
|
2609
|
+
#line 128 "hpricot_scan.rl"
|
2249
2610
|
{
|
2250
2611
|
ATTR(akey, aval);
|
2251
2612
|
}
|
@@ -2255,12 +2616,12 @@ tr158:
|
|
2255
2616
|
tr166:
|
2256
2617
|
#line 1 "hpricot_scan.rl"
|
2257
2618
|
{te = p+1;}
|
2258
|
-
#line
|
2619
|
+
#line 110 "hpricot_scan.rl"
|
2259
2620
|
{
|
2260
2621
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2261
2622
|
else { SET(aval, p); }
|
2262
2623
|
}
|
2263
|
-
#line
|
2624
|
+
#line 128 "hpricot_scan.rl"
|
2264
2625
|
{
|
2265
2626
|
ATTR(akey, aval);
|
2266
2627
|
}
|
@@ -2270,7 +2631,7 @@ tr166:
|
|
2270
2631
|
tr172:
|
2271
2632
|
#line 1 "hpricot_scan.rl"
|
2272
2633
|
{te = p+1;}
|
2273
|
-
#line
|
2634
|
+
#line 128 "hpricot_scan.rl"
|
2274
2635
|
{
|
2275
2636
|
ATTR(akey, aval);
|
2276
2637
|
}
|
@@ -2280,9 +2641,9 @@ tr172:
|
|
2280
2641
|
tr179:
|
2281
2642
|
#line 1 "hpricot_scan.rl"
|
2282
2643
|
{te = p+1;}
|
2283
|
-
#line
|
2644
|
+
#line 114 "hpricot_scan.rl"
|
2284
2645
|
{ SET(akey, p); }
|
2285
|
-
#line
|
2646
|
+
#line 128 "hpricot_scan.rl"
|
2286
2647
|
{
|
2287
2648
|
ATTR(akey, aval);
|
2288
2649
|
}
|
@@ -2298,11 +2659,11 @@ tr182:
|
|
2298
2659
|
tr196:
|
2299
2660
|
#line 1 "hpricot_scan.rl"
|
2300
2661
|
{te = p+1;}
|
2301
|
-
#line
|
2662
|
+
#line 128 "hpricot_scan.rl"
|
2302
2663
|
{
|
2303
2664
|
ATTR(akey, aval);
|
2304
2665
|
}
|
2305
|
-
#line
|
2666
|
+
#line 110 "hpricot_scan.rl"
|
2306
2667
|
{
|
2307
2668
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2308
2669
|
else { SET(aval, p); }
|
@@ -2313,13 +2674,13 @@ tr196:
|
|
2313
2674
|
tr197:
|
2314
2675
|
#line 1 "hpricot_scan.rl"
|
2315
2676
|
{te = p+1;}
|
2316
|
-
#line
|
2677
|
+
#line 105 "hpricot_scan.rl"
|
2317
2678
|
{ mark_aval = p; }
|
2318
|
-
#line
|
2679
|
+
#line 128 "hpricot_scan.rl"
|
2319
2680
|
{
|
2320
2681
|
ATTR(akey, aval);
|
2321
2682
|
}
|
2322
|
-
#line
|
2683
|
+
#line 110 "hpricot_scan.rl"
|
2323
2684
|
{
|
2324
2685
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2325
2686
|
else { SET(aval, p); }
|
@@ -2330,14 +2691,14 @@ tr197:
|
|
2330
2691
|
tr205:
|
2331
2692
|
#line 1 "hpricot_scan.rl"
|
2332
2693
|
{te = p+1;}
|
2333
|
-
#line
|
2694
|
+
#line 110 "hpricot_scan.rl"
|
2334
2695
|
{
|
2335
2696
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2336
2697
|
else { SET(aval, p); }
|
2337
2698
|
}
|
2338
|
-
#line
|
2699
|
+
#line 114 "hpricot_scan.rl"
|
2339
2700
|
{ SET(akey, p); }
|
2340
|
-
#line
|
2701
|
+
#line 128 "hpricot_scan.rl"
|
2341
2702
|
{
|
2342
2703
|
ATTR(akey, aval);
|
2343
2704
|
}
|
@@ -2347,9 +2708,9 @@ tr205:
|
|
2347
2708
|
tr339:
|
2348
2709
|
#line 1 "hpricot_scan.rl"
|
2349
2710
|
{te = p+1;}
|
2350
|
-
#line
|
2711
|
+
#line 105 "hpricot_scan.rl"
|
2351
2712
|
{ mark_aval = p; }
|
2352
|
-
#line
|
2713
|
+
#line 128 "hpricot_scan.rl"
|
2353
2714
|
{
|
2354
2715
|
ATTR(akey, aval);
|
2355
2716
|
}
|
@@ -2360,21 +2721,21 @@ st209:
|
|
2360
2721
|
if ( ++p == pe )
|
2361
2722
|
goto _test_eof209;
|
2362
2723
|
case 209:
|
2363
|
-
#line
|
2724
|
+
#line 2725 "hpricot_scan.c"
|
2364
2725
|
switch( (*p) ) {
|
2365
2726
|
case 34: goto tr169;
|
2366
2727
|
case 92: goto st81;
|
2367
2728
|
}
|
2368
2729
|
goto st80;
|
2369
2730
|
tr178:
|
2370
|
-
#line
|
2731
|
+
#line 114 "hpricot_scan.rl"
|
2371
2732
|
{ SET(akey, p); }
|
2372
2733
|
goto st85;
|
2373
2734
|
st85:
|
2374
2735
|
if ( ++p == pe )
|
2375
2736
|
goto _test_eof85;
|
2376
2737
|
case 85:
|
2377
|
-
#line
|
2738
|
+
#line 2739 "hpricot_scan.c"
|
2378
2739
|
switch( (*p) ) {
|
2379
2740
|
case 13: goto tr183;
|
2380
2741
|
case 32: goto tr183;
|
@@ -2392,14 +2753,14 @@ case 85:
|
|
2392
2753
|
goto tr183;
|
2393
2754
|
goto tr152;
|
2394
2755
|
tr183:
|
2395
|
-
#line
|
2756
|
+
#line 105 "hpricot_scan.rl"
|
2396
2757
|
{ mark_aval = p; }
|
2397
2758
|
goto st86;
|
2398
2759
|
st86:
|
2399
2760
|
if ( ++p == pe )
|
2400
2761
|
goto _test_eof86;
|
2401
2762
|
case 86:
|
2402
|
-
#line
|
2763
|
+
#line 2764 "hpricot_scan.c"
|
2403
2764
|
switch( (*p) ) {
|
2404
2765
|
case 13: goto tr188;
|
2405
2766
|
case 32: goto tr188;
|
@@ -2417,13 +2778,13 @@ case 86:
|
|
2417
2778
|
goto tr188;
|
2418
2779
|
goto tr152;
|
2419
2780
|
tr188:
|
2420
|
-
#line
|
2781
|
+
#line 105 "hpricot_scan.rl"
|
2421
2782
|
{ mark_aval = p; }
|
2422
2783
|
goto st87;
|
2423
2784
|
tr191:
|
2424
|
-
#line
|
2785
|
+
#line 105 "hpricot_scan.rl"
|
2425
2786
|
{ mark_aval = p; }
|
2426
|
-
#line
|
2787
|
+
#line 110 "hpricot_scan.rl"
|
2427
2788
|
{
|
2428
2789
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2429
2790
|
else { SET(aval, p); }
|
@@ -2433,7 +2794,7 @@ st87:
|
|
2433
2794
|
if ( ++p == pe )
|
2434
2795
|
goto _test_eof87;
|
2435
2796
|
case 87:
|
2436
|
-
#line
|
2797
|
+
#line 2798 "hpricot_scan.c"
|
2437
2798
|
switch( (*p) ) {
|
2438
2799
|
case 13: goto tr188;
|
2439
2800
|
case 32: goto tr188;
|
@@ -2462,13 +2823,13 @@ case 87:
|
|
2462
2823
|
goto tr190;
|
2463
2824
|
goto tr152;
|
2464
2825
|
tr189:
|
2465
|
-
#line
|
2826
|
+
#line 105 "hpricot_scan.rl"
|
2466
2827
|
{ mark_aval = p; }
|
2467
2828
|
goto st88;
|
2468
2829
|
tr192:
|
2469
|
-
#line
|
2830
|
+
#line 105 "hpricot_scan.rl"
|
2470
2831
|
{ mark_aval = p; }
|
2471
|
-
#line
|
2832
|
+
#line 110 "hpricot_scan.rl"
|
2472
2833
|
{
|
2473
2834
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2474
2835
|
else { SET(aval, p); }
|
@@ -2478,7 +2839,7 @@ st88:
|
|
2478
2839
|
if ( ++p == pe )
|
2479
2840
|
goto _test_eof88;
|
2480
2841
|
case 88:
|
2481
|
-
#line
|
2842
|
+
#line 2843 "hpricot_scan.c"
|
2482
2843
|
switch( (*p) ) {
|
2483
2844
|
case 13: goto tr191;
|
2484
2845
|
case 32: goto tr191;
|
@@ -2507,14 +2868,14 @@ case 88:
|
|
2507
2868
|
goto tr190;
|
2508
2869
|
goto tr152;
|
2509
2870
|
tr193:
|
2510
|
-
#line
|
2871
|
+
#line 109 "hpricot_scan.rl"
|
2511
2872
|
{ SET(aval, p); }
|
2512
2873
|
goto st89;
|
2513
2874
|
st89:
|
2514
2875
|
if ( ++p == pe )
|
2515
2876
|
goto _test_eof89;
|
2516
2877
|
case 89:
|
2517
|
-
#line
|
2878
|
+
#line 2879 "hpricot_scan.c"
|
2518
2879
|
switch( (*p) ) {
|
2519
2880
|
case 13: goto tr153;
|
2520
2881
|
case 32: goto tr153;
|
@@ -2542,36 +2903,36 @@ case 89:
|
|
2542
2903
|
goto tr190;
|
2543
2904
|
goto tr152;
|
2544
2905
|
tr162:
|
2545
|
-
#line
|
2906
|
+
#line 110 "hpricot_scan.rl"
|
2546
2907
|
{
|
2547
2908
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2548
2909
|
else { SET(aval, p); }
|
2549
2910
|
}
|
2550
2911
|
goto st90;
|
2551
2912
|
tr154:
|
2552
|
-
#line
|
2913
|
+
#line 105 "hpricot_scan.rl"
|
2553
2914
|
{ mark_aval = p; }
|
2554
|
-
#line
|
2915
|
+
#line 110 "hpricot_scan.rl"
|
2555
2916
|
{
|
2556
2917
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2557
2918
|
else { SET(aval, p); }
|
2558
2919
|
}
|
2559
2920
|
goto st90;
|
2560
2921
|
tr214:
|
2561
|
-
#line
|
2922
|
+
#line 105 "hpricot_scan.rl"
|
2562
2923
|
{ mark_aval = p; }
|
2563
|
-
#line
|
2924
|
+
#line 109 "hpricot_scan.rl"
|
2564
2925
|
{ SET(aval, p); }
|
2565
2926
|
goto st90;
|
2566
2927
|
tr209:
|
2567
|
-
#line
|
2928
|
+
#line 109 "hpricot_scan.rl"
|
2568
2929
|
{ SET(aval, p); }
|
2569
2930
|
goto st90;
|
2570
2931
|
st90:
|
2571
2932
|
if ( ++p == pe )
|
2572
2933
|
goto _test_eof90;
|
2573
2934
|
case 90:
|
2574
|
-
#line
|
2935
|
+
#line 2936 "hpricot_scan.c"
|
2575
2936
|
switch( (*p) ) {
|
2576
2937
|
case 13: goto tr161;
|
2577
2938
|
case 32: goto tr161;
|
@@ -2599,42 +2960,42 @@ case 90:
|
|
2599
2960
|
goto tr198;
|
2600
2961
|
goto st78;
|
2601
2962
|
tr198:
|
2602
|
-
#line
|
2963
|
+
#line 128 "hpricot_scan.rl"
|
2603
2964
|
{
|
2604
2965
|
ATTR(akey, aval);
|
2605
2966
|
}
|
2606
|
-
#line
|
2967
|
+
#line 121 "hpricot_scan.rl"
|
2607
2968
|
{
|
2608
2969
|
akey = Qnil;
|
2609
2970
|
aval = Qnil;
|
2610
2971
|
mark_akey = NULL;
|
2611
2972
|
mark_aval = NULL;
|
2612
2973
|
}
|
2613
|
-
#line
|
2974
|
+
#line 106 "hpricot_scan.rl"
|
2614
2975
|
{ mark_akey = p; }
|
2615
2976
|
goto st91;
|
2616
2977
|
tr190:
|
2617
|
-
#line
|
2978
|
+
#line 105 "hpricot_scan.rl"
|
2618
2979
|
{ mark_aval = p; }
|
2619
|
-
#line
|
2980
|
+
#line 128 "hpricot_scan.rl"
|
2620
2981
|
{
|
2621
2982
|
ATTR(akey, aval);
|
2622
2983
|
}
|
2623
|
-
#line
|
2984
|
+
#line 121 "hpricot_scan.rl"
|
2624
2985
|
{
|
2625
2986
|
akey = Qnil;
|
2626
2987
|
aval = Qnil;
|
2627
2988
|
mark_akey = NULL;
|
2628
2989
|
mark_aval = NULL;
|
2629
2990
|
}
|
2630
|
-
#line
|
2991
|
+
#line 106 "hpricot_scan.rl"
|
2631
2992
|
{ mark_akey = p; }
|
2632
2993
|
goto st91;
|
2633
2994
|
st91:
|
2634
2995
|
if ( ++p == pe )
|
2635
2996
|
goto _test_eof91;
|
2636
2997
|
case 91:
|
2637
|
-
#line
|
2998
|
+
#line 2999 "hpricot_scan.c"
|
2638
2999
|
switch( (*p) ) {
|
2639
3000
|
case 13: goto tr200;
|
2640
3001
|
case 32: goto tr200;
|
@@ -2663,16 +3024,16 @@ case 91:
|
|
2663
3024
|
goto st91;
|
2664
3025
|
goto st78;
|
2665
3026
|
tr207:
|
2666
|
-
#line
|
3027
|
+
#line 110 "hpricot_scan.rl"
|
2667
3028
|
{
|
2668
3029
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2669
3030
|
else { SET(aval, p); }
|
2670
3031
|
}
|
2671
3032
|
goto st92;
|
2672
3033
|
tr201:
|
2673
|
-
#line
|
3034
|
+
#line 114 "hpricot_scan.rl"
|
2674
3035
|
{ SET(akey, p); }
|
2675
|
-
#line
|
3036
|
+
#line 110 "hpricot_scan.rl"
|
2676
3037
|
{
|
2677
3038
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2678
3039
|
else { SET(aval, p); }
|
@@ -2682,7 +3043,7 @@ st92:
|
|
2682
3043
|
if ( ++p == pe )
|
2683
3044
|
goto _test_eof92;
|
2684
3045
|
case 92:
|
2685
|
-
#line
|
3046
|
+
#line 3047 "hpricot_scan.c"
|
2686
3047
|
switch( (*p) ) {
|
2687
3048
|
case 13: goto tr206;
|
2688
3049
|
case 32: goto tr206;
|
@@ -2711,69 +3072,69 @@ case 92:
|
|
2711
3072
|
goto tr198;
|
2712
3073
|
goto st78;
|
2713
3074
|
tr187:
|
2714
|
-
#line
|
3075
|
+
#line 105 "hpricot_scan.rl"
|
2715
3076
|
{ mark_aval = p; }
|
2716
|
-
#line
|
3077
|
+
#line 128 "hpricot_scan.rl"
|
2717
3078
|
{
|
2718
3079
|
ATTR(akey, aval);
|
2719
3080
|
}
|
2720
3081
|
goto st93;
|
2721
3082
|
tr164:
|
2722
|
-
#line
|
3083
|
+
#line 110 "hpricot_scan.rl"
|
2723
3084
|
{
|
2724
3085
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2725
3086
|
else { SET(aval, p); }
|
2726
3087
|
}
|
2727
|
-
#line
|
3088
|
+
#line 128 "hpricot_scan.rl"
|
2728
3089
|
{
|
2729
3090
|
ATTR(akey, aval);
|
2730
3091
|
}
|
2731
3092
|
goto st93;
|
2732
3093
|
tr199:
|
2733
|
-
#line
|
3094
|
+
#line 128 "hpricot_scan.rl"
|
2734
3095
|
{
|
2735
3096
|
ATTR(akey, aval);
|
2736
3097
|
}
|
2737
|
-
#line
|
3098
|
+
#line 110 "hpricot_scan.rl"
|
2738
3099
|
{
|
2739
3100
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2740
3101
|
else { SET(aval, p); }
|
2741
3102
|
}
|
2742
3103
|
goto st93;
|
2743
3104
|
tr203:
|
2744
|
-
#line
|
3105
|
+
#line 110 "hpricot_scan.rl"
|
2745
3106
|
{
|
2746
3107
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2747
3108
|
else { SET(aval, p); }
|
2748
3109
|
}
|
2749
|
-
#line
|
3110
|
+
#line 114 "hpricot_scan.rl"
|
2750
3111
|
{ SET(akey, p); }
|
2751
|
-
#line
|
3112
|
+
#line 128 "hpricot_scan.rl"
|
2752
3113
|
{
|
2753
3114
|
ATTR(akey, aval);
|
2754
3115
|
}
|
2755
3116
|
goto st93;
|
2756
3117
|
tr156:
|
2757
|
-
#line
|
3118
|
+
#line 105 "hpricot_scan.rl"
|
2758
3119
|
{ mark_aval = p; }
|
2759
|
-
#line
|
3120
|
+
#line 110 "hpricot_scan.rl"
|
2760
3121
|
{
|
2761
3122
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2762
3123
|
else { SET(aval, p); }
|
2763
3124
|
}
|
2764
|
-
#line
|
3125
|
+
#line 128 "hpricot_scan.rl"
|
2765
3126
|
{
|
2766
3127
|
ATTR(akey, aval);
|
2767
3128
|
}
|
2768
3129
|
goto st93;
|
2769
3130
|
tr195:
|
2770
|
-
#line
|
3131
|
+
#line 105 "hpricot_scan.rl"
|
2771
3132
|
{ mark_aval = p; }
|
2772
|
-
#line
|
3133
|
+
#line 128 "hpricot_scan.rl"
|
2773
3134
|
{
|
2774
3135
|
ATTR(akey, aval);
|
2775
3136
|
}
|
2776
|
-
#line
|
3137
|
+
#line 110 "hpricot_scan.rl"
|
2777
3138
|
{
|
2778
3139
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2779
3140
|
else { SET(aval, p); }
|
@@ -2783,7 +3144,7 @@ st93:
|
|
2783
3144
|
if ( ++p == pe )
|
2784
3145
|
goto _test_eof93;
|
2785
3146
|
case 93:
|
2786
|
-
#line
|
3147
|
+
#line 3148 "hpricot_scan.c"
|
2787
3148
|
switch( (*p) ) {
|
2788
3149
|
case 13: goto tr161;
|
2789
3150
|
case 32: goto tr161;
|
@@ -2800,14 +3161,14 @@ case 93:
|
|
2800
3161
|
goto tr161;
|
2801
3162
|
goto st78;
|
2802
3163
|
tr159:
|
2803
|
-
#line
|
3164
|
+
#line 105 "hpricot_scan.rl"
|
2804
3165
|
{ mark_aval = p; }
|
2805
3166
|
goto st94;
|
2806
3167
|
st94:
|
2807
3168
|
if ( ++p == pe )
|
2808
3169
|
goto _test_eof94;
|
2809
3170
|
case 94:
|
2810
|
-
#line
|
3171
|
+
#line 3172 "hpricot_scan.c"
|
2811
3172
|
switch( (*p) ) {
|
2812
3173
|
case 13: goto tr161;
|
2813
3174
|
case 32: goto tr161;
|
@@ -2824,18 +3185,18 @@ case 94:
|
|
2824
3185
|
goto tr161;
|
2825
3186
|
goto st78;
|
2826
3187
|
tr184:
|
2827
|
-
#line
|
3188
|
+
#line 105 "hpricot_scan.rl"
|
2828
3189
|
{ mark_aval = p; }
|
2829
3190
|
goto st95;
|
2830
3191
|
tr204:
|
2831
|
-
#line
|
3192
|
+
#line 114 "hpricot_scan.rl"
|
2832
3193
|
{ SET(akey, p); }
|
2833
3194
|
goto st95;
|
2834
3195
|
st95:
|
2835
3196
|
if ( ++p == pe )
|
2836
3197
|
goto _test_eof95;
|
2837
3198
|
case 95:
|
2838
|
-
#line
|
3199
|
+
#line 3200 "hpricot_scan.c"
|
2839
3200
|
switch( (*p) ) {
|
2840
3201
|
case 13: goto tr191;
|
2841
3202
|
case 32: goto tr191;
|
@@ -2873,14 +3234,14 @@ case 96:
|
|
2873
3234
|
goto tr211;
|
2874
3235
|
goto tr210;
|
2875
3236
|
tr210:
|
2876
|
-
#line
|
3237
|
+
#line 105 "hpricot_scan.rl"
|
2877
3238
|
{ mark_aval = p; }
|
2878
3239
|
goto st97;
|
2879
3240
|
st97:
|
2880
3241
|
if ( ++p == pe )
|
2881
3242
|
goto _test_eof97;
|
2882
3243
|
case 97:
|
2883
|
-
#line
|
3244
|
+
#line 3245 "hpricot_scan.c"
|
2884
3245
|
switch( (*p) ) {
|
2885
3246
|
case 13: goto tr220;
|
2886
3247
|
case 32: goto tr220;
|
@@ -2898,34 +3259,34 @@ case 97:
|
|
2898
3259
|
goto tr220;
|
2899
3260
|
goto st97;
|
2900
3261
|
tr315:
|
2901
|
-
#line
|
3262
|
+
#line 105 "hpricot_scan.rl"
|
2902
3263
|
{ mark_aval = p; }
|
2903
3264
|
goto st98;
|
2904
3265
|
tr220:
|
2905
|
-
#line
|
3266
|
+
#line 110 "hpricot_scan.rl"
|
2906
3267
|
{
|
2907
3268
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2908
3269
|
else { SET(aval, p); }
|
2909
3270
|
}
|
2910
3271
|
goto st98;
|
2911
3272
|
tr211:
|
2912
|
-
#line
|
3273
|
+
#line 105 "hpricot_scan.rl"
|
2913
3274
|
{ mark_aval = p; }
|
2914
|
-
#line
|
3275
|
+
#line 110 "hpricot_scan.rl"
|
2915
3276
|
{
|
2916
3277
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2917
3278
|
else { SET(aval, p); }
|
2918
3279
|
}
|
2919
3280
|
goto st98;
|
2920
3281
|
tr299:
|
2921
|
-
#line
|
3282
|
+
#line 109 "hpricot_scan.rl"
|
2922
3283
|
{ SET(aval, p); }
|
2923
3284
|
goto st98;
|
2924
3285
|
st98:
|
2925
3286
|
if ( ++p == pe )
|
2926
3287
|
goto _test_eof98;
|
2927
3288
|
case 98:
|
2928
|
-
#line
|
3289
|
+
#line 3290 "hpricot_scan.c"
|
2929
3290
|
switch( (*p) ) {
|
2930
3291
|
case 32: goto st98;
|
2931
3292
|
case 34: goto tr228;
|
@@ -2949,14 +3310,14 @@ case 98:
|
|
2949
3310
|
goto tr229;
|
2950
3311
|
goto st99;
|
2951
3312
|
tr216:
|
2952
|
-
#line
|
3313
|
+
#line 105 "hpricot_scan.rl"
|
2953
3314
|
{ mark_aval = p; }
|
2954
3315
|
goto st99;
|
2955
3316
|
st99:
|
2956
3317
|
if ( ++p == pe )
|
2957
3318
|
goto _test_eof99;
|
2958
3319
|
case 99:
|
2959
|
-
#line
|
3320
|
+
#line 3321 "hpricot_scan.c"
|
2960
3321
|
switch( (*p) ) {
|
2961
3322
|
case 34: goto tr228;
|
2962
3323
|
case 39: goto tr174;
|
@@ -2964,46 +3325,46 @@ case 99:
|
|
2964
3325
|
}
|
2965
3326
|
goto st99;
|
2966
3327
|
tr330:
|
2967
|
-
#line
|
3328
|
+
#line 105 "hpricot_scan.rl"
|
2968
3329
|
{ mark_aval = p; }
|
2969
3330
|
goto st100;
|
2970
3331
|
tr255:
|
2971
|
-
#line
|
3332
|
+
#line 110 "hpricot_scan.rl"
|
2972
3333
|
{
|
2973
3334
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2974
3335
|
else { SET(aval, p); }
|
2975
3336
|
}
|
2976
3337
|
goto st100;
|
2977
3338
|
tr326:
|
2978
|
-
#line
|
3339
|
+
#line 105 "hpricot_scan.rl"
|
2979
3340
|
{ mark_aval = p; }
|
2980
|
-
#line
|
3341
|
+
#line 110 "hpricot_scan.rl"
|
2981
3342
|
{
|
2982
3343
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
2983
3344
|
else { SET(aval, p); }
|
2984
3345
|
}
|
2985
3346
|
goto st100;
|
2986
3347
|
tr316:
|
2987
|
-
#line
|
3348
|
+
#line 105 "hpricot_scan.rl"
|
2988
3349
|
{ mark_aval = p; }
|
2989
|
-
#line
|
3350
|
+
#line 109 "hpricot_scan.rl"
|
2990
3351
|
{ SET(aval, p); }
|
2991
3352
|
goto st100;
|
2992
3353
|
tr228:
|
2993
|
-
#line
|
3354
|
+
#line 109 "hpricot_scan.rl"
|
2994
3355
|
{ SET(aval, p); }
|
2995
3356
|
goto st100;
|
2996
3357
|
tr322:
|
2997
|
-
#line
|
3358
|
+
#line 109 "hpricot_scan.rl"
|
2998
3359
|
{ SET(aval, p); }
|
2999
|
-
#line
|
3360
|
+
#line 105 "hpricot_scan.rl"
|
3000
3361
|
{ mark_aval = p; }
|
3001
3362
|
goto st100;
|
3002
3363
|
st100:
|
3003
3364
|
if ( ++p == pe )
|
3004
3365
|
goto _test_eof100;
|
3005
3366
|
case 100:
|
3006
|
-
#line
|
3367
|
+
#line 3368 "hpricot_scan.c"
|
3007
3368
|
switch( (*p) ) {
|
3008
3369
|
case 32: goto st100;
|
3009
3370
|
case 39: goto tr169;
|
@@ -3026,70 +3387,70 @@ case 100:
|
|
3026
3387
|
goto tr235;
|
3027
3388
|
goto st101;
|
3028
3389
|
tr328:
|
3029
|
-
#line
|
3390
|
+
#line 105 "hpricot_scan.rl"
|
3030
3391
|
{ mark_aval = p; }
|
3031
3392
|
goto st101;
|
3032
3393
|
st101:
|
3033
3394
|
if ( ++p == pe )
|
3034
3395
|
goto _test_eof101;
|
3035
3396
|
case 101:
|
3036
|
-
#line
|
3397
|
+
#line 3398 "hpricot_scan.c"
|
3037
3398
|
switch( (*p) ) {
|
3038
3399
|
case 39: goto tr169;
|
3039
3400
|
case 92: goto st102;
|
3040
3401
|
}
|
3041
3402
|
goto st101;
|
3042
3403
|
tr335:
|
3043
|
-
#line
|
3404
|
+
#line 105 "hpricot_scan.rl"
|
3044
3405
|
{ mark_aval = p; }
|
3045
3406
|
goto st102;
|
3046
3407
|
st102:
|
3047
3408
|
if ( ++p == pe )
|
3048
3409
|
goto _test_eof102;
|
3049
3410
|
case 102:
|
3050
|
-
#line
|
3411
|
+
#line 3412 "hpricot_scan.c"
|
3051
3412
|
switch( (*p) ) {
|
3052
3413
|
case 39: goto tr228;
|
3053
3414
|
case 92: goto st102;
|
3054
3415
|
}
|
3055
3416
|
goto st101;
|
3056
3417
|
tr235:
|
3057
|
-
#line
|
3418
|
+
#line 128 "hpricot_scan.rl"
|
3058
3419
|
{
|
3059
3420
|
ATTR(akey, aval);
|
3060
3421
|
}
|
3061
|
-
#line
|
3422
|
+
#line 121 "hpricot_scan.rl"
|
3062
3423
|
{
|
3063
3424
|
akey = Qnil;
|
3064
3425
|
aval = Qnil;
|
3065
3426
|
mark_akey = NULL;
|
3066
3427
|
mark_aval = NULL;
|
3067
3428
|
}
|
3068
|
-
#line
|
3429
|
+
#line 106 "hpricot_scan.rl"
|
3069
3430
|
{ mark_akey = p; }
|
3070
3431
|
goto st103;
|
3071
3432
|
tr332:
|
3072
|
-
#line
|
3433
|
+
#line 105 "hpricot_scan.rl"
|
3073
3434
|
{ mark_aval = p; }
|
3074
|
-
#line
|
3435
|
+
#line 128 "hpricot_scan.rl"
|
3075
3436
|
{
|
3076
3437
|
ATTR(akey, aval);
|
3077
3438
|
}
|
3078
|
-
#line
|
3439
|
+
#line 121 "hpricot_scan.rl"
|
3079
3440
|
{
|
3080
3441
|
akey = Qnil;
|
3081
3442
|
aval = Qnil;
|
3082
3443
|
mark_akey = NULL;
|
3083
3444
|
mark_aval = NULL;
|
3084
3445
|
}
|
3085
|
-
#line
|
3446
|
+
#line 106 "hpricot_scan.rl"
|
3086
3447
|
{ mark_akey = p; }
|
3087
3448
|
goto st103;
|
3088
3449
|
st103:
|
3089
3450
|
if ( ++p == pe )
|
3090
3451
|
goto _test_eof103;
|
3091
3452
|
case 103:
|
3092
|
-
#line
|
3453
|
+
#line 3454 "hpricot_scan.c"
|
3093
3454
|
switch( (*p) ) {
|
3094
3455
|
case 32: goto tr239;
|
3095
3456
|
case 39: goto tr169;
|
@@ -3113,20 +3474,20 @@ case 103:
|
|
3113
3474
|
goto st103;
|
3114
3475
|
goto st101;
|
3115
3476
|
tr239:
|
3116
|
-
#line
|
3477
|
+
#line 114 "hpricot_scan.rl"
|
3117
3478
|
{ SET(akey, p); }
|
3118
3479
|
goto st104;
|
3119
3480
|
tr269:
|
3120
|
-
#line
|
3481
|
+
#line 110 "hpricot_scan.rl"
|
3121
3482
|
{
|
3122
3483
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3123
3484
|
else { SET(aval, p); }
|
3124
3485
|
}
|
3125
3486
|
goto st104;
|
3126
3487
|
tr263:
|
3127
|
-
#line
|
3488
|
+
#line 114 "hpricot_scan.rl"
|
3128
3489
|
{ SET(akey, p); }
|
3129
|
-
#line
|
3490
|
+
#line 110 "hpricot_scan.rl"
|
3130
3491
|
{
|
3131
3492
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3132
3493
|
else { SET(aval, p); }
|
@@ -3136,7 +3497,7 @@ st104:
|
|
3136
3497
|
if ( ++p == pe )
|
3137
3498
|
goto _test_eof104;
|
3138
3499
|
case 104:
|
3139
|
-
#line
|
3500
|
+
#line 3501 "hpricot_scan.c"
|
3140
3501
|
switch( (*p) ) {
|
3141
3502
|
case 32: goto st104;
|
3142
3503
|
case 39: goto tr169;
|
@@ -3160,23 +3521,23 @@ case 104:
|
|
3160
3521
|
goto tr235;
|
3161
3522
|
goto st101;
|
3162
3523
|
tr241:
|
3163
|
-
#line
|
3524
|
+
#line 114 "hpricot_scan.rl"
|
3164
3525
|
{ SET(akey, p); }
|
3165
|
-
#line
|
3526
|
+
#line 128 "hpricot_scan.rl"
|
3166
3527
|
{
|
3167
3528
|
ATTR(akey, aval);
|
3168
3529
|
}
|
3169
3530
|
goto st105;
|
3170
3531
|
tr236:
|
3171
|
-
#line
|
3532
|
+
#line 128 "hpricot_scan.rl"
|
3172
3533
|
{
|
3173
3534
|
ATTR(akey, aval);
|
3174
3535
|
}
|
3175
3536
|
goto st105;
|
3176
3537
|
tr333:
|
3177
|
-
#line
|
3538
|
+
#line 105 "hpricot_scan.rl"
|
3178
3539
|
{ mark_aval = p; }
|
3179
|
-
#line
|
3540
|
+
#line 128 "hpricot_scan.rl"
|
3180
3541
|
{
|
3181
3542
|
ATTR(akey, aval);
|
3182
3543
|
}
|
@@ -3185,7 +3546,7 @@ st105:
|
|
3185
3546
|
if ( ++p == pe )
|
3186
3547
|
goto _test_eof105;
|
3187
3548
|
case 105:
|
3188
|
-
#line
|
3549
|
+
#line 3550 "hpricot_scan.c"
|
3189
3550
|
switch( (*p) ) {
|
3190
3551
|
case 39: goto tr169;
|
3191
3552
|
case 62: goto tr246;
|
@@ -3195,14 +3556,14 @@ case 105:
|
|
3195
3556
|
tr341:
|
3196
3557
|
#line 1 "hpricot_scan.rl"
|
3197
3558
|
{te = p+1;}
|
3198
|
-
#line
|
3559
|
+
#line 105 "hpricot_scan.rl"
|
3199
3560
|
{ mark_aval = p; }
|
3200
|
-
#line
|
3561
|
+
#line 110 "hpricot_scan.rl"
|
3201
3562
|
{
|
3202
3563
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3203
3564
|
else { SET(aval, p); }
|
3204
3565
|
}
|
3205
|
-
#line
|
3566
|
+
#line 128 "hpricot_scan.rl"
|
3206
3567
|
{
|
3207
3568
|
ATTR(akey, aval);
|
3208
3569
|
}
|
@@ -3212,12 +3573,12 @@ tr341:
|
|
3212
3573
|
tr258:
|
3213
3574
|
#line 1 "hpricot_scan.rl"
|
3214
3575
|
{te = p+1;}
|
3215
|
-
#line
|
3576
|
+
#line 110 "hpricot_scan.rl"
|
3216
3577
|
{
|
3217
3578
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3218
3579
|
else { SET(aval, p); }
|
3219
3580
|
}
|
3220
|
-
#line
|
3581
|
+
#line 128 "hpricot_scan.rl"
|
3221
3582
|
{
|
3222
3583
|
ATTR(akey, aval);
|
3223
3584
|
}
|
@@ -3227,7 +3588,7 @@ tr258:
|
|
3227
3588
|
tr237:
|
3228
3589
|
#line 1 "hpricot_scan.rl"
|
3229
3590
|
{te = p+1;}
|
3230
|
-
#line
|
3591
|
+
#line 128 "hpricot_scan.rl"
|
3231
3592
|
{
|
3232
3593
|
ATTR(akey, aval);
|
3233
3594
|
}
|
@@ -3237,9 +3598,9 @@ tr237:
|
|
3237
3598
|
tr243:
|
3238
3599
|
#line 1 "hpricot_scan.rl"
|
3239
3600
|
{te = p+1;}
|
3240
|
-
#line
|
3601
|
+
#line 114 "hpricot_scan.rl"
|
3241
3602
|
{ SET(akey, p); }
|
3242
|
-
#line
|
3603
|
+
#line 128 "hpricot_scan.rl"
|
3243
3604
|
{
|
3244
3605
|
ATTR(akey, aval);
|
3245
3606
|
}
|
@@ -3255,11 +3616,11 @@ tr246:
|
|
3255
3616
|
tr262:
|
3256
3617
|
#line 1 "hpricot_scan.rl"
|
3257
3618
|
{te = p+1;}
|
3258
|
-
#line
|
3619
|
+
#line 128 "hpricot_scan.rl"
|
3259
3620
|
{
|
3260
3621
|
ATTR(akey, aval);
|
3261
3622
|
}
|
3262
|
-
#line
|
3623
|
+
#line 110 "hpricot_scan.rl"
|
3263
3624
|
{
|
3264
3625
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3265
3626
|
else { SET(aval, p); }
|
@@ -3270,13 +3631,13 @@ tr262:
|
|
3270
3631
|
tr329:
|
3271
3632
|
#line 1 "hpricot_scan.rl"
|
3272
3633
|
{te = p+1;}
|
3273
|
-
#line
|
3634
|
+
#line 105 "hpricot_scan.rl"
|
3274
3635
|
{ mark_aval = p; }
|
3275
|
-
#line
|
3636
|
+
#line 128 "hpricot_scan.rl"
|
3276
3637
|
{
|
3277
3638
|
ATTR(akey, aval);
|
3278
3639
|
}
|
3279
|
-
#line
|
3640
|
+
#line 110 "hpricot_scan.rl"
|
3280
3641
|
{
|
3281
3642
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3282
3643
|
else { SET(aval, p); }
|
@@ -3287,14 +3648,14 @@ tr329:
|
|
3287
3648
|
tr268:
|
3288
3649
|
#line 1 "hpricot_scan.rl"
|
3289
3650
|
{te = p+1;}
|
3290
|
-
#line
|
3651
|
+
#line 110 "hpricot_scan.rl"
|
3291
3652
|
{
|
3292
3653
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3293
3654
|
else { SET(aval, p); }
|
3294
3655
|
}
|
3295
|
-
#line
|
3656
|
+
#line 114 "hpricot_scan.rl"
|
3296
3657
|
{ SET(akey, p); }
|
3297
|
-
#line
|
3658
|
+
#line 128 "hpricot_scan.rl"
|
3298
3659
|
{
|
3299
3660
|
ATTR(akey, aval);
|
3300
3661
|
}
|
@@ -3304,9 +3665,9 @@ tr268:
|
|
3304
3665
|
tr334:
|
3305
3666
|
#line 1 "hpricot_scan.rl"
|
3306
3667
|
{te = p+1;}
|
3307
|
-
#line
|
3668
|
+
#line 105 "hpricot_scan.rl"
|
3308
3669
|
{ mark_aval = p; }
|
3309
|
-
#line
|
3670
|
+
#line 128 "hpricot_scan.rl"
|
3310
3671
|
{
|
3311
3672
|
ATTR(akey, aval);
|
3312
3673
|
}
|
@@ -3317,21 +3678,21 @@ st210:
|
|
3317
3678
|
if ( ++p == pe )
|
3318
3679
|
goto _test_eof210;
|
3319
3680
|
case 210:
|
3320
|
-
#line
|
3681
|
+
#line 3682 "hpricot_scan.c"
|
3321
3682
|
switch( (*p) ) {
|
3322
3683
|
case 39: goto tr169;
|
3323
3684
|
case 92: goto st102;
|
3324
3685
|
}
|
3325
3686
|
goto st101;
|
3326
3687
|
tr242:
|
3327
|
-
#line
|
3688
|
+
#line 114 "hpricot_scan.rl"
|
3328
3689
|
{ SET(akey, p); }
|
3329
3690
|
goto st106;
|
3330
3691
|
st106:
|
3331
3692
|
if ( ++p == pe )
|
3332
3693
|
goto _test_eof106;
|
3333
3694
|
case 106:
|
3334
|
-
#line
|
3695
|
+
#line 3696 "hpricot_scan.c"
|
3335
3696
|
switch( (*p) ) {
|
3336
3697
|
case 13: goto tr248;
|
3337
3698
|
case 32: goto tr248;
|
@@ -3349,14 +3710,14 @@ case 106:
|
|
3349
3710
|
goto tr248;
|
3350
3711
|
goto tr247;
|
3351
3712
|
tr247:
|
3352
|
-
#line
|
3713
|
+
#line 105 "hpricot_scan.rl"
|
3353
3714
|
{ mark_aval = p; }
|
3354
3715
|
goto st107;
|
3355
3716
|
st107:
|
3356
3717
|
if ( ++p == pe )
|
3357
3718
|
goto _test_eof107;
|
3358
3719
|
case 107:
|
3359
|
-
#line
|
3720
|
+
#line 3721 "hpricot_scan.c"
|
3360
3721
|
switch( (*p) ) {
|
3361
3722
|
case 13: goto tr255;
|
3362
3723
|
case 32: goto tr255;
|
@@ -3373,42 +3734,42 @@ case 107:
|
|
3373
3734
|
goto tr255;
|
3374
3735
|
goto st107;
|
3375
3736
|
tr256:
|
3376
|
-
#line
|
3737
|
+
#line 110 "hpricot_scan.rl"
|
3377
3738
|
{
|
3378
3739
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3379
3740
|
else { SET(aval, p); }
|
3380
3741
|
}
|
3381
3742
|
goto st108;
|
3382
3743
|
tr327:
|
3383
|
-
#line
|
3744
|
+
#line 105 "hpricot_scan.rl"
|
3384
3745
|
{ mark_aval = p; }
|
3385
|
-
#line
|
3746
|
+
#line 110 "hpricot_scan.rl"
|
3386
3747
|
{
|
3387
3748
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3388
3749
|
else { SET(aval, p); }
|
3389
3750
|
}
|
3390
3751
|
goto st108;
|
3391
3752
|
tr281:
|
3392
|
-
#line
|
3753
|
+
#line 105 "hpricot_scan.rl"
|
3393
3754
|
{ mark_aval = p; }
|
3394
|
-
#line
|
3755
|
+
#line 109 "hpricot_scan.rl"
|
3395
3756
|
{ SET(aval, p); }
|
3396
3757
|
goto st108;
|
3397
3758
|
tr222:
|
3398
|
-
#line
|
3759
|
+
#line 109 "hpricot_scan.rl"
|
3399
3760
|
{ SET(aval, p); }
|
3400
3761
|
goto st108;
|
3401
3762
|
tr213:
|
3402
|
-
#line
|
3763
|
+
#line 109 "hpricot_scan.rl"
|
3403
3764
|
{ SET(aval, p); }
|
3404
|
-
#line
|
3765
|
+
#line 105 "hpricot_scan.rl"
|
3405
3766
|
{ mark_aval = p; }
|
3406
3767
|
goto st108;
|
3407
3768
|
st108:
|
3408
3769
|
if ( ++p == pe )
|
3409
3770
|
goto _test_eof108;
|
3410
3771
|
case 108:
|
3411
|
-
#line
|
3772
|
+
#line 3773 "hpricot_scan.c"
|
3412
3773
|
switch( (*p) ) {
|
3413
3774
|
case 13: goto tr255;
|
3414
3775
|
case 32: goto tr255;
|
@@ -3436,42 +3797,42 @@ case 108:
|
|
3436
3797
|
goto tr260;
|
3437
3798
|
goto st107;
|
3438
3799
|
tr260:
|
3439
|
-
#line
|
3800
|
+
#line 128 "hpricot_scan.rl"
|
3440
3801
|
{
|
3441
3802
|
ATTR(akey, aval);
|
3442
3803
|
}
|
3443
|
-
#line
|
3804
|
+
#line 121 "hpricot_scan.rl"
|
3444
3805
|
{
|
3445
3806
|
akey = Qnil;
|
3446
3807
|
aval = Qnil;
|
3447
3808
|
mark_akey = NULL;
|
3448
3809
|
mark_aval = NULL;
|
3449
3810
|
}
|
3450
|
-
#line
|
3811
|
+
#line 106 "hpricot_scan.rl"
|
3451
3812
|
{ mark_akey = p; }
|
3452
3813
|
goto st109;
|
3453
3814
|
tr279:
|
3454
|
-
#line
|
3815
|
+
#line 105 "hpricot_scan.rl"
|
3455
3816
|
{ mark_aval = p; }
|
3456
|
-
#line
|
3817
|
+
#line 128 "hpricot_scan.rl"
|
3457
3818
|
{
|
3458
3819
|
ATTR(akey, aval);
|
3459
3820
|
}
|
3460
|
-
#line
|
3821
|
+
#line 121 "hpricot_scan.rl"
|
3461
3822
|
{
|
3462
3823
|
akey = Qnil;
|
3463
3824
|
aval = Qnil;
|
3464
3825
|
mark_akey = NULL;
|
3465
3826
|
mark_aval = NULL;
|
3466
3827
|
}
|
3467
|
-
#line
|
3828
|
+
#line 106 "hpricot_scan.rl"
|
3468
3829
|
{ mark_akey = p; }
|
3469
3830
|
goto st109;
|
3470
3831
|
st109:
|
3471
3832
|
if ( ++p == pe )
|
3472
3833
|
goto _test_eof109;
|
3473
3834
|
case 109:
|
3474
|
-
#line
|
3835
|
+
#line 3836 "hpricot_scan.c"
|
3475
3836
|
switch( (*p) ) {
|
3476
3837
|
case 13: goto tr263;
|
3477
3838
|
case 32: goto tr263;
|
@@ -3500,16 +3861,16 @@ case 109:
|
|
3500
3861
|
goto st109;
|
3501
3862
|
goto st107;
|
3502
3863
|
tr270:
|
3503
|
-
#line
|
3864
|
+
#line 110 "hpricot_scan.rl"
|
3504
3865
|
{
|
3505
3866
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3506
3867
|
else { SET(aval, p); }
|
3507
3868
|
}
|
3508
3869
|
goto st110;
|
3509
3870
|
tr264:
|
3510
|
-
#line
|
3871
|
+
#line 114 "hpricot_scan.rl"
|
3511
3872
|
{ SET(akey, p); }
|
3512
|
-
#line
|
3873
|
+
#line 110 "hpricot_scan.rl"
|
3513
3874
|
{
|
3514
3875
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3515
3876
|
else { SET(aval, p); }
|
@@ -3519,7 +3880,7 @@ st110:
|
|
3519
3880
|
if ( ++p == pe )
|
3520
3881
|
goto _test_eof110;
|
3521
3882
|
case 110:
|
3522
|
-
#line
|
3883
|
+
#line 3884 "hpricot_scan.c"
|
3523
3884
|
switch( (*p) ) {
|
3524
3885
|
case 13: goto tr269;
|
3525
3886
|
case 32: goto tr269;
|
@@ -3548,69 +3909,69 @@ case 110:
|
|
3548
3909
|
goto tr260;
|
3549
3910
|
goto st107;
|
3550
3911
|
tr252:
|
3551
|
-
#line
|
3912
|
+
#line 105 "hpricot_scan.rl"
|
3552
3913
|
{ mark_aval = p; }
|
3553
|
-
#line
|
3914
|
+
#line 128 "hpricot_scan.rl"
|
3554
3915
|
{
|
3555
3916
|
ATTR(akey, aval);
|
3556
3917
|
}
|
3557
3918
|
goto st111;
|
3558
3919
|
tr257:
|
3559
|
-
#line
|
3920
|
+
#line 110 "hpricot_scan.rl"
|
3560
3921
|
{
|
3561
3922
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3562
3923
|
else { SET(aval, p); }
|
3563
3924
|
}
|
3564
|
-
#line
|
3925
|
+
#line 128 "hpricot_scan.rl"
|
3565
3926
|
{
|
3566
3927
|
ATTR(akey, aval);
|
3567
3928
|
}
|
3568
3929
|
goto st111;
|
3569
3930
|
tr261:
|
3570
|
-
#line
|
3931
|
+
#line 128 "hpricot_scan.rl"
|
3571
3932
|
{
|
3572
3933
|
ATTR(akey, aval);
|
3573
3934
|
}
|
3574
|
-
#line
|
3935
|
+
#line 110 "hpricot_scan.rl"
|
3575
3936
|
{
|
3576
3937
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3577
3938
|
else { SET(aval, p); }
|
3578
3939
|
}
|
3579
3940
|
goto st111;
|
3580
3941
|
tr266:
|
3581
|
-
#line
|
3942
|
+
#line 110 "hpricot_scan.rl"
|
3582
3943
|
{
|
3583
3944
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3584
3945
|
else { SET(aval, p); }
|
3585
3946
|
}
|
3586
|
-
#line
|
3947
|
+
#line 114 "hpricot_scan.rl"
|
3587
3948
|
{ SET(akey, p); }
|
3588
|
-
#line
|
3949
|
+
#line 128 "hpricot_scan.rl"
|
3589
3950
|
{
|
3590
3951
|
ATTR(akey, aval);
|
3591
3952
|
}
|
3592
3953
|
goto st111;
|
3593
3954
|
tr276:
|
3594
|
-
#line
|
3955
|
+
#line 105 "hpricot_scan.rl"
|
3595
3956
|
{ mark_aval = p; }
|
3596
|
-
#line
|
3957
|
+
#line 110 "hpricot_scan.rl"
|
3597
3958
|
{
|
3598
3959
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3599
3960
|
else { SET(aval, p); }
|
3600
3961
|
}
|
3601
|
-
#line
|
3962
|
+
#line 128 "hpricot_scan.rl"
|
3602
3963
|
{
|
3603
3964
|
ATTR(akey, aval);
|
3604
3965
|
}
|
3605
3966
|
goto st111;
|
3606
3967
|
tr280:
|
3607
|
-
#line
|
3968
|
+
#line 105 "hpricot_scan.rl"
|
3608
3969
|
{ mark_aval = p; }
|
3609
|
-
#line
|
3970
|
+
#line 128 "hpricot_scan.rl"
|
3610
3971
|
{
|
3611
3972
|
ATTR(akey, aval);
|
3612
3973
|
}
|
3613
|
-
#line
|
3974
|
+
#line 110 "hpricot_scan.rl"
|
3614
3975
|
{
|
3615
3976
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3616
3977
|
else { SET(aval, p); }
|
@@ -3620,7 +3981,7 @@ st111:
|
|
3620
3981
|
if ( ++p == pe )
|
3621
3982
|
goto _test_eof111;
|
3622
3983
|
case 111:
|
3623
|
-
#line
|
3984
|
+
#line 3985 "hpricot_scan.c"
|
3624
3985
|
switch( (*p) ) {
|
3625
3986
|
case 13: goto tr255;
|
3626
3987
|
case 32: goto tr255;
|
@@ -3637,14 +3998,14 @@ case 111:
|
|
3637
3998
|
goto tr255;
|
3638
3999
|
goto st107;
|
3639
4000
|
tr253:
|
3640
|
-
#line
|
4001
|
+
#line 105 "hpricot_scan.rl"
|
3641
4002
|
{ mark_aval = p; }
|
3642
4003
|
goto st112;
|
3643
4004
|
st112:
|
3644
4005
|
if ( ++p == pe )
|
3645
4006
|
goto _test_eof112;
|
3646
4007
|
case 112:
|
3647
|
-
#line
|
4008
|
+
#line 4009 "hpricot_scan.c"
|
3648
4009
|
switch( (*p) ) {
|
3649
4010
|
case 13: goto tr255;
|
3650
4011
|
case 32: goto tr255;
|
@@ -3661,18 +4022,18 @@ case 112:
|
|
3661
4022
|
goto tr255;
|
3662
4023
|
goto st107;
|
3663
4024
|
tr249:
|
3664
|
-
#line
|
4025
|
+
#line 105 "hpricot_scan.rl"
|
3665
4026
|
{ mark_aval = p; }
|
3666
4027
|
goto st113;
|
3667
4028
|
tr267:
|
3668
|
-
#line
|
4029
|
+
#line 114 "hpricot_scan.rl"
|
3669
4030
|
{ SET(akey, p); }
|
3670
4031
|
goto st113;
|
3671
4032
|
st113:
|
3672
4033
|
if ( ++p == pe )
|
3673
4034
|
goto _test_eof113;
|
3674
4035
|
case 113:
|
3675
|
-
#line
|
4036
|
+
#line 4037 "hpricot_scan.c"
|
3676
4037
|
switch( (*p) ) {
|
3677
4038
|
case 13: goto tr272;
|
3678
4039
|
case 32: goto tr272;
|
@@ -3690,13 +4051,13 @@ case 113:
|
|
3690
4051
|
goto tr272;
|
3691
4052
|
goto tr247;
|
3692
4053
|
tr277:
|
3693
|
-
#line
|
4054
|
+
#line 105 "hpricot_scan.rl"
|
3694
4055
|
{ mark_aval = p; }
|
3695
4056
|
goto st114;
|
3696
4057
|
tr272:
|
3697
|
-
#line
|
4058
|
+
#line 105 "hpricot_scan.rl"
|
3698
4059
|
{ mark_aval = p; }
|
3699
|
-
#line
|
4060
|
+
#line 110 "hpricot_scan.rl"
|
3700
4061
|
{
|
3701
4062
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3702
4063
|
else { SET(aval, p); }
|
@@ -3706,7 +4067,7 @@ st114:
|
|
3706
4067
|
if ( ++p == pe )
|
3707
4068
|
goto _test_eof114;
|
3708
4069
|
case 114:
|
3709
|
-
#line
|
4070
|
+
#line 4071 "hpricot_scan.c"
|
3710
4071
|
switch( (*p) ) {
|
3711
4072
|
case 13: goto tr277;
|
3712
4073
|
case 32: goto tr277;
|
@@ -3735,13 +4096,13 @@ case 114:
|
|
3735
4096
|
goto tr279;
|
3736
4097
|
goto tr247;
|
3737
4098
|
tr278:
|
3738
|
-
#line
|
4099
|
+
#line 105 "hpricot_scan.rl"
|
3739
4100
|
{ mark_aval = p; }
|
3740
4101
|
goto st115;
|
3741
4102
|
tr273:
|
3742
|
-
#line
|
4103
|
+
#line 105 "hpricot_scan.rl"
|
3743
4104
|
{ mark_aval = p; }
|
3744
|
-
#line
|
4105
|
+
#line 110 "hpricot_scan.rl"
|
3745
4106
|
{
|
3746
4107
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3747
4108
|
else { SET(aval, p); }
|
@@ -3751,7 +4112,7 @@ st115:
|
|
3751
4112
|
if ( ++p == pe )
|
3752
4113
|
goto _test_eof115;
|
3753
4114
|
case 115:
|
3754
|
-
#line
|
4115
|
+
#line 4116 "hpricot_scan.c"
|
3755
4116
|
switch( (*p) ) {
|
3756
4117
|
case 13: goto tr272;
|
3757
4118
|
case 32: goto tr272;
|
@@ -3800,30 +4161,30 @@ case 116:
|
|
3800
4161
|
goto tr211;
|
3801
4162
|
goto tr210;
|
3802
4163
|
tr221:
|
3803
|
-
#line
|
4164
|
+
#line 110 "hpricot_scan.rl"
|
3804
4165
|
{
|
3805
4166
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3806
4167
|
else { SET(aval, p); }
|
3807
4168
|
}
|
3808
4169
|
goto st117;
|
3809
4170
|
tr212:
|
3810
|
-
#line
|
4171
|
+
#line 105 "hpricot_scan.rl"
|
3811
4172
|
{ mark_aval = p; }
|
3812
|
-
#line
|
4173
|
+
#line 110 "hpricot_scan.rl"
|
3813
4174
|
{
|
3814
4175
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3815
4176
|
else { SET(aval, p); }
|
3816
4177
|
}
|
3817
4178
|
goto st117;
|
3818
4179
|
tr314:
|
3819
|
-
#line
|
4180
|
+
#line 109 "hpricot_scan.rl"
|
3820
4181
|
{ SET(aval, p); }
|
3821
4182
|
goto st117;
|
3822
4183
|
st117:
|
3823
4184
|
if ( ++p == pe )
|
3824
4185
|
goto _test_eof117;
|
3825
4186
|
case 117:
|
3826
|
-
#line
|
4187
|
+
#line 4188 "hpricot_scan.c"
|
3827
4188
|
switch( (*p) ) {
|
3828
4189
|
case 13: goto tr220;
|
3829
4190
|
case 32: goto tr220;
|
@@ -3852,42 +4213,42 @@ case 117:
|
|
3852
4213
|
goto tr282;
|
3853
4214
|
goto st97;
|
3854
4215
|
tr282:
|
3855
|
-
#line
|
4216
|
+
#line 128 "hpricot_scan.rl"
|
3856
4217
|
{
|
3857
4218
|
ATTR(akey, aval);
|
3858
4219
|
}
|
3859
|
-
#line
|
4220
|
+
#line 121 "hpricot_scan.rl"
|
3860
4221
|
{
|
3861
4222
|
akey = Qnil;
|
3862
4223
|
aval = Qnil;
|
3863
4224
|
mark_akey = NULL;
|
3864
4225
|
mark_aval = NULL;
|
3865
4226
|
}
|
3866
|
-
#line
|
4227
|
+
#line 106 "hpricot_scan.rl"
|
3867
4228
|
{ mark_akey = p; }
|
3868
4229
|
goto st118;
|
3869
4230
|
tr307:
|
3870
|
-
#line
|
4231
|
+
#line 105 "hpricot_scan.rl"
|
3871
4232
|
{ mark_aval = p; }
|
3872
|
-
#line
|
4233
|
+
#line 128 "hpricot_scan.rl"
|
3873
4234
|
{
|
3874
4235
|
ATTR(akey, aval);
|
3875
4236
|
}
|
3876
|
-
#line
|
4237
|
+
#line 121 "hpricot_scan.rl"
|
3877
4238
|
{
|
3878
4239
|
akey = Qnil;
|
3879
4240
|
aval = Qnil;
|
3880
4241
|
mark_akey = NULL;
|
3881
4242
|
mark_aval = NULL;
|
3882
4243
|
}
|
3883
|
-
#line
|
4244
|
+
#line 106 "hpricot_scan.rl"
|
3884
4245
|
{ mark_akey = p; }
|
3885
4246
|
goto st118;
|
3886
4247
|
st118:
|
3887
4248
|
if ( ++p == pe )
|
3888
4249
|
goto _test_eof118;
|
3889
4250
|
case 118:
|
3890
|
-
#line
|
4251
|
+
#line 4252 "hpricot_scan.c"
|
3891
4252
|
switch( (*p) ) {
|
3892
4253
|
case 13: goto tr285;
|
3893
4254
|
case 32: goto tr285;
|
@@ -3917,20 +4278,20 @@ case 118:
|
|
3917
4278
|
goto st118;
|
3918
4279
|
goto st97;
|
3919
4280
|
tr293:
|
3920
|
-
#line
|
4281
|
+
#line 114 "hpricot_scan.rl"
|
3921
4282
|
{ SET(akey, p); }
|
3922
4283
|
goto st119;
|
3923
4284
|
tr323:
|
3924
|
-
#line
|
4285
|
+
#line 110 "hpricot_scan.rl"
|
3925
4286
|
{
|
3926
4287
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3927
4288
|
else { SET(aval, p); }
|
3928
4289
|
}
|
3929
4290
|
goto st119;
|
3930
4291
|
tr285:
|
3931
|
-
#line
|
4292
|
+
#line 114 "hpricot_scan.rl"
|
3932
4293
|
{ SET(akey, p); }
|
3933
|
-
#line
|
4294
|
+
#line 110 "hpricot_scan.rl"
|
3934
4295
|
{
|
3935
4296
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
3936
4297
|
else { SET(aval, p); }
|
@@ -3940,7 +4301,7 @@ st119:
|
|
3940
4301
|
if ( ++p == pe )
|
3941
4302
|
goto _test_eof119;
|
3942
4303
|
case 119:
|
3943
|
-
#line
|
4304
|
+
#line 4305 "hpricot_scan.c"
|
3944
4305
|
switch( (*p) ) {
|
3945
4306
|
case 32: goto st119;
|
3946
4307
|
case 34: goto tr228;
|
@@ -3965,42 +4326,42 @@ case 119:
|
|
3965
4326
|
goto tr229;
|
3966
4327
|
goto st99;
|
3967
4328
|
tr229:
|
3968
|
-
#line
|
4329
|
+
#line 128 "hpricot_scan.rl"
|
3969
4330
|
{
|
3970
4331
|
ATTR(akey, aval);
|
3971
4332
|
}
|
3972
|
-
#line
|
4333
|
+
#line 121 "hpricot_scan.rl"
|
3973
4334
|
{
|
3974
4335
|
akey = Qnil;
|
3975
4336
|
aval = Qnil;
|
3976
4337
|
mark_akey = NULL;
|
3977
4338
|
mark_aval = NULL;
|
3978
4339
|
}
|
3979
|
-
#line
|
4340
|
+
#line 106 "hpricot_scan.rl"
|
3980
4341
|
{ mark_akey = p; }
|
3981
4342
|
goto st120;
|
3982
4343
|
tr318:
|
3983
|
-
#line
|
4344
|
+
#line 105 "hpricot_scan.rl"
|
3984
4345
|
{ mark_aval = p; }
|
3985
|
-
#line
|
4346
|
+
#line 128 "hpricot_scan.rl"
|
3986
4347
|
{
|
3987
4348
|
ATTR(akey, aval);
|
3988
4349
|
}
|
3989
|
-
#line
|
4350
|
+
#line 121 "hpricot_scan.rl"
|
3990
4351
|
{
|
3991
4352
|
akey = Qnil;
|
3992
4353
|
aval = Qnil;
|
3993
4354
|
mark_akey = NULL;
|
3994
4355
|
mark_aval = NULL;
|
3995
4356
|
}
|
3996
|
-
#line
|
4357
|
+
#line 106 "hpricot_scan.rl"
|
3997
4358
|
{ mark_akey = p; }
|
3998
4359
|
goto st120;
|
3999
4360
|
st120:
|
4000
4361
|
if ( ++p == pe )
|
4001
4362
|
goto _test_eof120;
|
4002
4363
|
case 120:
|
4003
|
-
#line
|
4364
|
+
#line 4365 "hpricot_scan.c"
|
4004
4365
|
switch( (*p) ) {
|
4005
4366
|
case 32: goto tr293;
|
4006
4367
|
case 34: goto tr228;
|
@@ -4025,23 +4386,23 @@ case 120:
|
|
4025
4386
|
goto st120;
|
4026
4387
|
goto st99;
|
4027
4388
|
tr295:
|
4028
|
-
#line
|
4389
|
+
#line 114 "hpricot_scan.rl"
|
4029
4390
|
{ SET(akey, p); }
|
4030
|
-
#line
|
4391
|
+
#line 128 "hpricot_scan.rl"
|
4031
4392
|
{
|
4032
4393
|
ATTR(akey, aval);
|
4033
4394
|
}
|
4034
4395
|
goto st121;
|
4035
4396
|
tr230:
|
4036
|
-
#line
|
4397
|
+
#line 128 "hpricot_scan.rl"
|
4037
4398
|
{
|
4038
4399
|
ATTR(akey, aval);
|
4039
4400
|
}
|
4040
4401
|
goto st121;
|
4041
4402
|
tr319:
|
4042
|
-
#line
|
4403
|
+
#line 105 "hpricot_scan.rl"
|
4043
4404
|
{ mark_aval = p; }
|
4044
|
-
#line
|
4405
|
+
#line 128 "hpricot_scan.rl"
|
4045
4406
|
{
|
4046
4407
|
ATTR(akey, aval);
|
4047
4408
|
}
|
@@ -4050,7 +4411,7 @@ st121:
|
|
4050
4411
|
if ( ++p == pe )
|
4051
4412
|
goto _test_eof121;
|
4052
4413
|
case 121:
|
4053
|
-
#line
|
4414
|
+
#line 4415 "hpricot_scan.c"
|
4054
4415
|
switch( (*p) ) {
|
4055
4416
|
case 34: goto tr228;
|
4056
4417
|
case 39: goto tr174;
|
@@ -4061,14 +4422,14 @@ case 121:
|
|
4061
4422
|
tr217:
|
4062
4423
|
#line 1 "hpricot_scan.rl"
|
4063
4424
|
{te = p+1;}
|
4064
|
-
#line
|
4425
|
+
#line 105 "hpricot_scan.rl"
|
4065
4426
|
{ mark_aval = p; }
|
4066
|
-
#line
|
4427
|
+
#line 110 "hpricot_scan.rl"
|
4067
4428
|
{
|
4068
4429
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4069
4430
|
else { SET(aval, p); }
|
4070
4431
|
}
|
4071
|
-
#line
|
4432
|
+
#line 128 "hpricot_scan.rl"
|
4072
4433
|
{
|
4073
4434
|
ATTR(akey, aval);
|
4074
4435
|
}
|
@@ -4078,12 +4439,12 @@ tr217:
|
|
4078
4439
|
tr225:
|
4079
4440
|
#line 1 "hpricot_scan.rl"
|
4080
4441
|
{te = p+1;}
|
4081
|
-
#line
|
4442
|
+
#line 110 "hpricot_scan.rl"
|
4082
4443
|
{
|
4083
4444
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4084
4445
|
else { SET(aval, p); }
|
4085
4446
|
}
|
4086
|
-
#line
|
4447
|
+
#line 128 "hpricot_scan.rl"
|
4087
4448
|
{
|
4088
4449
|
ATTR(akey, aval);
|
4089
4450
|
}
|
@@ -4093,7 +4454,7 @@ tr225:
|
|
4093
4454
|
tr231:
|
4094
4455
|
#line 1 "hpricot_scan.rl"
|
4095
4456
|
{te = p+1;}
|
4096
|
-
#line
|
4457
|
+
#line 128 "hpricot_scan.rl"
|
4097
4458
|
{
|
4098
4459
|
ATTR(akey, aval);
|
4099
4460
|
}
|
@@ -4103,9 +4464,9 @@ tr231:
|
|
4103
4464
|
tr297:
|
4104
4465
|
#line 1 "hpricot_scan.rl"
|
4105
4466
|
{te = p+1;}
|
4106
|
-
#line
|
4467
|
+
#line 114 "hpricot_scan.rl"
|
4107
4468
|
{ SET(akey, p); }
|
4108
|
-
#line
|
4469
|
+
#line 128 "hpricot_scan.rl"
|
4109
4470
|
{
|
4110
4471
|
ATTR(akey, aval);
|
4111
4472
|
}
|
@@ -4121,11 +4482,11 @@ tr298:
|
|
4121
4482
|
tr284:
|
4122
4483
|
#line 1 "hpricot_scan.rl"
|
4123
4484
|
{te = p+1;}
|
4124
|
-
#line
|
4485
|
+
#line 128 "hpricot_scan.rl"
|
4125
4486
|
{
|
4126
4487
|
ATTR(akey, aval);
|
4127
4488
|
}
|
4128
|
-
#line
|
4489
|
+
#line 110 "hpricot_scan.rl"
|
4129
4490
|
{
|
4130
4491
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4131
4492
|
else { SET(aval, p); }
|
@@ -4136,13 +4497,13 @@ tr284:
|
|
4136
4497
|
tr313:
|
4137
4498
|
#line 1 "hpricot_scan.rl"
|
4138
4499
|
{te = p+1;}
|
4139
|
-
#line
|
4500
|
+
#line 105 "hpricot_scan.rl"
|
4140
4501
|
{ mark_aval = p; }
|
4141
|
-
#line
|
4502
|
+
#line 128 "hpricot_scan.rl"
|
4142
4503
|
{
|
4143
4504
|
ATTR(akey, aval);
|
4144
4505
|
}
|
4145
|
-
#line
|
4506
|
+
#line 110 "hpricot_scan.rl"
|
4146
4507
|
{
|
4147
4508
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4148
4509
|
else { SET(aval, p); }
|
@@ -4153,14 +4514,14 @@ tr313:
|
|
4153
4514
|
tr290:
|
4154
4515
|
#line 1 "hpricot_scan.rl"
|
4155
4516
|
{te = p+1;}
|
4156
|
-
#line
|
4517
|
+
#line 110 "hpricot_scan.rl"
|
4157
4518
|
{
|
4158
4519
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4159
4520
|
else { SET(aval, p); }
|
4160
4521
|
}
|
4161
|
-
#line
|
4522
|
+
#line 114 "hpricot_scan.rl"
|
4162
4523
|
{ SET(akey, p); }
|
4163
|
-
#line
|
4524
|
+
#line 128 "hpricot_scan.rl"
|
4164
4525
|
{
|
4165
4526
|
ATTR(akey, aval);
|
4166
4527
|
}
|
@@ -4170,9 +4531,9 @@ tr290:
|
|
4170
4531
|
tr320:
|
4171
4532
|
#line 1 "hpricot_scan.rl"
|
4172
4533
|
{te = p+1;}
|
4173
|
-
#line
|
4534
|
+
#line 105 "hpricot_scan.rl"
|
4174
4535
|
{ mark_aval = p; }
|
4175
|
-
#line
|
4536
|
+
#line 128 "hpricot_scan.rl"
|
4176
4537
|
{
|
4177
4538
|
ATTR(akey, aval);
|
4178
4539
|
}
|
@@ -4183,7 +4544,7 @@ st211:
|
|
4183
4544
|
if ( ++p == pe )
|
4184
4545
|
goto _test_eof211;
|
4185
4546
|
case 211:
|
4186
|
-
#line
|
4547
|
+
#line 4548 "hpricot_scan.c"
|
4187
4548
|
switch( (*p) ) {
|
4188
4549
|
case 34: goto tr228;
|
4189
4550
|
case 39: goto tr174;
|
@@ -4191,14 +4552,14 @@ case 211:
|
|
4191
4552
|
}
|
4192
4553
|
goto st99;
|
4193
4554
|
tr321:
|
4194
|
-
#line
|
4555
|
+
#line 105 "hpricot_scan.rl"
|
4195
4556
|
{ mark_aval = p; }
|
4196
4557
|
goto st122;
|
4197
4558
|
st122:
|
4198
4559
|
if ( ++p == pe )
|
4199
4560
|
goto _test_eof122;
|
4200
4561
|
case 122:
|
4201
|
-
#line
|
4562
|
+
#line 4563 "hpricot_scan.c"
|
4202
4563
|
switch( (*p) ) {
|
4203
4564
|
case 34: goto tr299;
|
4204
4565
|
case 39: goto tr299;
|
@@ -4206,14 +4567,14 @@ case 122:
|
|
4206
4567
|
}
|
4207
4568
|
goto st99;
|
4208
4569
|
tr296:
|
4209
|
-
#line
|
4570
|
+
#line 114 "hpricot_scan.rl"
|
4210
4571
|
{ SET(akey, p); }
|
4211
4572
|
goto st123;
|
4212
4573
|
st123:
|
4213
4574
|
if ( ++p == pe )
|
4214
4575
|
goto _test_eof123;
|
4215
4576
|
case 123:
|
4216
|
-
#line
|
4577
|
+
#line 4578 "hpricot_scan.c"
|
4217
4578
|
switch( (*p) ) {
|
4218
4579
|
case 13: goto tr300;
|
4219
4580
|
case 32: goto tr300;
|
@@ -4231,14 +4592,14 @@ case 123:
|
|
4231
4592
|
goto tr300;
|
4232
4593
|
goto tr210;
|
4233
4594
|
tr300:
|
4234
|
-
#line
|
4595
|
+
#line 105 "hpricot_scan.rl"
|
4235
4596
|
{ mark_aval = p; }
|
4236
4597
|
goto st124;
|
4237
4598
|
st124:
|
4238
4599
|
if ( ++p == pe )
|
4239
4600
|
goto _test_eof124;
|
4240
4601
|
case 124:
|
4241
|
-
#line
|
4602
|
+
#line 4603 "hpricot_scan.c"
|
4242
4603
|
switch( (*p) ) {
|
4243
4604
|
case 13: goto tr305;
|
4244
4605
|
case 32: goto tr305;
|
@@ -4256,13 +4617,13 @@ case 124:
|
|
4256
4617
|
goto tr305;
|
4257
4618
|
goto tr210;
|
4258
4619
|
tr305:
|
4259
|
-
#line
|
4620
|
+
#line 105 "hpricot_scan.rl"
|
4260
4621
|
{ mark_aval = p; }
|
4261
4622
|
goto st125;
|
4262
4623
|
tr308:
|
4263
|
-
#line
|
4624
|
+
#line 105 "hpricot_scan.rl"
|
4264
4625
|
{ mark_aval = p; }
|
4265
|
-
#line
|
4626
|
+
#line 110 "hpricot_scan.rl"
|
4266
4627
|
{
|
4267
4628
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4268
4629
|
else { SET(aval, p); }
|
@@ -4272,7 +4633,7 @@ st125:
|
|
4272
4633
|
if ( ++p == pe )
|
4273
4634
|
goto _test_eof125;
|
4274
4635
|
case 125:
|
4275
|
-
#line
|
4636
|
+
#line 4637 "hpricot_scan.c"
|
4276
4637
|
switch( (*p) ) {
|
4277
4638
|
case 13: goto tr305;
|
4278
4639
|
case 32: goto tr305;
|
@@ -4301,13 +4662,13 @@ case 125:
|
|
4301
4662
|
goto tr307;
|
4302
4663
|
goto tr210;
|
4303
4664
|
tr306:
|
4304
|
-
#line
|
4665
|
+
#line 105 "hpricot_scan.rl"
|
4305
4666
|
{ mark_aval = p; }
|
4306
4667
|
goto st126;
|
4307
4668
|
tr309:
|
4308
|
-
#line
|
4669
|
+
#line 105 "hpricot_scan.rl"
|
4309
4670
|
{ mark_aval = p; }
|
4310
|
-
#line
|
4671
|
+
#line 110 "hpricot_scan.rl"
|
4311
4672
|
{
|
4312
4673
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4313
4674
|
else { SET(aval, p); }
|
@@ -4317,7 +4678,7 @@ st126:
|
|
4317
4678
|
if ( ++p == pe )
|
4318
4679
|
goto _test_eof126;
|
4319
4680
|
case 126:
|
4320
|
-
#line
|
4681
|
+
#line 4682 "hpricot_scan.c"
|
4321
4682
|
switch( (*p) ) {
|
4322
4683
|
case 13: goto tr308;
|
4323
4684
|
case 32: goto tr308;
|
@@ -4346,14 +4707,14 @@ case 126:
|
|
4346
4707
|
goto tr307;
|
4347
4708
|
goto tr210;
|
4348
4709
|
tr310:
|
4349
|
-
#line
|
4710
|
+
#line 109 "hpricot_scan.rl"
|
4350
4711
|
{ SET(aval, p); }
|
4351
4712
|
goto st127;
|
4352
4713
|
st127:
|
4353
4714
|
if ( ++p == pe )
|
4354
4715
|
goto _test_eof127;
|
4355
4716
|
case 127:
|
4356
|
-
#line
|
4717
|
+
#line 4718 "hpricot_scan.c"
|
4357
4718
|
switch( (*p) ) {
|
4358
4719
|
case 13: goto tr211;
|
4359
4720
|
case 32: goto tr211;
|
@@ -4382,69 +4743,69 @@ case 127:
|
|
4382
4743
|
goto tr307;
|
4383
4744
|
goto tr210;
|
4384
4745
|
tr304:
|
4385
|
-
#line
|
4746
|
+
#line 105 "hpricot_scan.rl"
|
4386
4747
|
{ mark_aval = p; }
|
4387
|
-
#line
|
4748
|
+
#line 128 "hpricot_scan.rl"
|
4388
4749
|
{
|
4389
4750
|
ATTR(akey, aval);
|
4390
4751
|
}
|
4391
4752
|
goto st128;
|
4392
4753
|
tr223:
|
4393
|
-
#line
|
4754
|
+
#line 110 "hpricot_scan.rl"
|
4394
4755
|
{
|
4395
4756
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4396
4757
|
else { SET(aval, p); }
|
4397
4758
|
}
|
4398
|
-
#line
|
4759
|
+
#line 128 "hpricot_scan.rl"
|
4399
4760
|
{
|
4400
4761
|
ATTR(akey, aval);
|
4401
4762
|
}
|
4402
4763
|
goto st128;
|
4403
4764
|
tr283:
|
4404
|
-
#line
|
4765
|
+
#line 128 "hpricot_scan.rl"
|
4405
4766
|
{
|
4406
4767
|
ATTR(akey, aval);
|
4407
4768
|
}
|
4408
|
-
#line
|
4769
|
+
#line 110 "hpricot_scan.rl"
|
4409
4770
|
{
|
4410
4771
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4411
4772
|
else { SET(aval, p); }
|
4412
4773
|
}
|
4413
4774
|
goto st128;
|
4414
4775
|
tr288:
|
4415
|
-
#line
|
4776
|
+
#line 110 "hpricot_scan.rl"
|
4416
4777
|
{
|
4417
4778
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4418
4779
|
else { SET(aval, p); }
|
4419
4780
|
}
|
4420
|
-
#line
|
4781
|
+
#line 114 "hpricot_scan.rl"
|
4421
4782
|
{ SET(akey, p); }
|
4422
|
-
#line
|
4783
|
+
#line 128 "hpricot_scan.rl"
|
4423
4784
|
{
|
4424
4785
|
ATTR(akey, aval);
|
4425
4786
|
}
|
4426
4787
|
goto st128;
|
4427
4788
|
tr215:
|
4428
|
-
#line
|
4789
|
+
#line 105 "hpricot_scan.rl"
|
4429
4790
|
{ mark_aval = p; }
|
4430
|
-
#line
|
4791
|
+
#line 110 "hpricot_scan.rl"
|
4431
4792
|
{
|
4432
4793
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4433
4794
|
else { SET(aval, p); }
|
4434
4795
|
}
|
4435
|
-
#line
|
4796
|
+
#line 128 "hpricot_scan.rl"
|
4436
4797
|
{
|
4437
4798
|
ATTR(akey, aval);
|
4438
4799
|
}
|
4439
4800
|
goto st128;
|
4440
4801
|
tr312:
|
4441
|
-
#line
|
4802
|
+
#line 105 "hpricot_scan.rl"
|
4442
4803
|
{ mark_aval = p; }
|
4443
|
-
#line
|
4804
|
+
#line 128 "hpricot_scan.rl"
|
4444
4805
|
{
|
4445
4806
|
ATTR(akey, aval);
|
4446
4807
|
}
|
4447
|
-
#line
|
4808
|
+
#line 110 "hpricot_scan.rl"
|
4448
4809
|
{
|
4449
4810
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4450
4811
|
else { SET(aval, p); }
|
@@ -4454,7 +4815,7 @@ st128:
|
|
4454
4815
|
if ( ++p == pe )
|
4455
4816
|
goto _test_eof128;
|
4456
4817
|
case 128:
|
4457
|
-
#line
|
4818
|
+
#line 4819 "hpricot_scan.c"
|
4458
4819
|
switch( (*p) ) {
|
4459
4820
|
case 13: goto tr220;
|
4460
4821
|
case 32: goto tr220;
|
@@ -4472,14 +4833,14 @@ case 128:
|
|
4472
4833
|
goto tr220;
|
4473
4834
|
goto st97;
|
4474
4835
|
tr218:
|
4475
|
-
#line
|
4836
|
+
#line 105 "hpricot_scan.rl"
|
4476
4837
|
{ mark_aval = p; }
|
4477
4838
|
goto st129;
|
4478
4839
|
st129:
|
4479
4840
|
if ( ++p == pe )
|
4480
4841
|
goto _test_eof129;
|
4481
4842
|
case 129:
|
4482
|
-
#line
|
4843
|
+
#line 4844 "hpricot_scan.c"
|
4483
4844
|
switch( (*p) ) {
|
4484
4845
|
case 13: goto tr220;
|
4485
4846
|
case 32: goto tr220;
|
@@ -4497,14 +4858,14 @@ case 129:
|
|
4497
4858
|
goto tr220;
|
4498
4859
|
goto st97;
|
4499
4860
|
tr311:
|
4500
|
-
#line
|
4861
|
+
#line 109 "hpricot_scan.rl"
|
4501
4862
|
{ SET(aval, p); }
|
4502
4863
|
goto st130;
|
4503
4864
|
st130:
|
4504
4865
|
if ( ++p == pe )
|
4505
4866
|
goto _test_eof130;
|
4506
4867
|
case 130:
|
4507
|
-
#line
|
4868
|
+
#line 4869 "hpricot_scan.c"
|
4508
4869
|
switch( (*p) ) {
|
4509
4870
|
case 13: goto tr211;
|
4510
4871
|
case 32: goto tr211;
|
@@ -4533,14 +4894,14 @@ case 130:
|
|
4533
4894
|
goto tr307;
|
4534
4895
|
goto tr210;
|
4535
4896
|
tr302:
|
4536
|
-
#line
|
4897
|
+
#line 109 "hpricot_scan.rl"
|
4537
4898
|
{ SET(aval, p); }
|
4538
4899
|
goto st131;
|
4539
4900
|
st131:
|
4540
4901
|
if ( ++p == pe )
|
4541
4902
|
goto _test_eof131;
|
4542
4903
|
case 131:
|
4543
|
-
#line
|
4904
|
+
#line 4905 "hpricot_scan.c"
|
4544
4905
|
switch( (*p) ) {
|
4545
4906
|
case 32: goto tr315;
|
4546
4907
|
case 34: goto tr316;
|
@@ -4564,14 +4925,14 @@ case 131:
|
|
4564
4925
|
goto tr318;
|
4565
4926
|
goto tr216;
|
4566
4927
|
tr303:
|
4567
|
-
#line
|
4928
|
+
#line 109 "hpricot_scan.rl"
|
4568
4929
|
{ SET(aval, p); }
|
4569
4930
|
goto st132;
|
4570
4931
|
st132:
|
4571
4932
|
if ( ++p == pe )
|
4572
4933
|
goto _test_eof132;
|
4573
4934
|
case 132:
|
4574
|
-
#line
|
4935
|
+
#line 4936 "hpricot_scan.c"
|
4575
4936
|
switch( (*p) ) {
|
4576
4937
|
case 32: goto tr315;
|
4577
4938
|
case 34: goto tr322;
|
@@ -4595,18 +4956,18 @@ case 132:
|
|
4595
4956
|
goto tr318;
|
4596
4957
|
goto tr216;
|
4597
4958
|
tr301:
|
4598
|
-
#line
|
4959
|
+
#line 105 "hpricot_scan.rl"
|
4599
4960
|
{ mark_aval = p; }
|
4600
4961
|
goto st133;
|
4601
4962
|
tr289:
|
4602
|
-
#line
|
4963
|
+
#line 114 "hpricot_scan.rl"
|
4603
4964
|
{ SET(akey, p); }
|
4604
4965
|
goto st133;
|
4605
4966
|
st133:
|
4606
4967
|
if ( ++p == pe )
|
4607
4968
|
goto _test_eof133;
|
4608
4969
|
case 133:
|
4609
|
-
#line
|
4970
|
+
#line 4971 "hpricot_scan.c"
|
4610
4971
|
switch( (*p) ) {
|
4611
4972
|
case 13: goto tr308;
|
4612
4973
|
case 32: goto tr308;
|
@@ -4624,16 +4985,16 @@ case 133:
|
|
4624
4985
|
goto tr308;
|
4625
4986
|
goto tr210;
|
4626
4987
|
tr324:
|
4627
|
-
#line
|
4988
|
+
#line 110 "hpricot_scan.rl"
|
4628
4989
|
{
|
4629
4990
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4630
4991
|
else { SET(aval, p); }
|
4631
4992
|
}
|
4632
4993
|
goto st134;
|
4633
4994
|
tr286:
|
4634
|
-
#line
|
4995
|
+
#line 114 "hpricot_scan.rl"
|
4635
4996
|
{ SET(akey, p); }
|
4636
|
-
#line
|
4997
|
+
#line 110 "hpricot_scan.rl"
|
4637
4998
|
{
|
4638
4999
|
if (*(p-1) == '"' || *(p-1) == '\'') { SET(aval, p-1); }
|
4639
5000
|
else { SET(aval, p); }
|
@@ -4643,7 +5004,7 @@ st134:
|
|
4643
5004
|
if ( ++p == pe )
|
4644
5005
|
goto _test_eof134;
|
4645
5006
|
case 134:
|
4646
|
-
#line
|
5007
|
+
#line 5008 "hpricot_scan.c"
|
4647
5008
|
switch( (*p) ) {
|
4648
5009
|
case 13: goto tr323;
|
4649
5010
|
case 32: goto tr323;
|
@@ -4673,14 +5034,14 @@ case 134:
|
|
4673
5034
|
goto tr282;
|
4674
5035
|
goto st97;
|
4675
5036
|
tr275:
|
4676
|
-
#line
|
5037
|
+
#line 109 "hpricot_scan.rl"
|
4677
5038
|
{ SET(aval, p); }
|
4678
5039
|
goto st135;
|
4679
5040
|
st135:
|
4680
5041
|
if ( ++p == pe )
|
4681
5042
|
goto _test_eof135;
|
4682
5043
|
case 135:
|
4683
|
-
#line
|
5044
|
+
#line 5045 "hpricot_scan.c"
|
4684
5045
|
switch( (*p) ) {
|
4685
5046
|
case 13: goto tr326;
|
4686
5047
|
case 32: goto tr326;
|
@@ -4718,14 +5079,14 @@ case 136:
|
|
4718
5079
|
}
|
4719
5080
|
goto tr216;
|
4720
5081
|
tr251:
|
4721
|
-
#line
|
5082
|
+
#line 109 "hpricot_scan.rl"
|
4722
5083
|
{ SET(aval, p); }
|
4723
5084
|
goto st137;
|
4724
5085
|
st137:
|
4725
5086
|
if ( ++p == pe )
|
4726
5087
|
goto _test_eof137;
|
4727
5088
|
case 137:
|
4728
|
-
#line
|
5089
|
+
#line 5090 "hpricot_scan.c"
|
4729
5090
|
switch( (*p) ) {
|
4730
5091
|
case 32: goto tr330;
|
4731
5092
|
case 39: goto tr331;
|
@@ -4748,14 +5109,14 @@ case 137:
|
|
4748
5109
|
goto tr332;
|
4749
5110
|
goto tr328;
|
4750
5111
|
tr248:
|
4751
|
-
#line
|
5112
|
+
#line 105 "hpricot_scan.rl"
|
4752
5113
|
{ mark_aval = p; }
|
4753
5114
|
goto st138;
|
4754
5115
|
st138:
|
4755
5116
|
if ( ++p == pe )
|
4756
5117
|
goto _test_eof138;
|
4757
5118
|
case 138:
|
4758
|
-
#line
|
5119
|
+
#line 5120 "hpricot_scan.c"
|
4759
5120
|
switch( (*p) ) {
|
4760
5121
|
case 13: goto tr277;
|
4761
5122
|
case 32: goto tr277;
|
@@ -4773,14 +5134,14 @@ case 138:
|
|
4773
5134
|
goto tr277;
|
4774
5135
|
goto tr247;
|
4775
5136
|
tr185:
|
4776
|
-
#line
|
5137
|
+
#line 109 "hpricot_scan.rl"
|
4777
5138
|
{ SET(aval, p); }
|
4778
5139
|
goto st139;
|
4779
5140
|
st139:
|
4780
5141
|
if ( ++p == pe )
|
4781
5142
|
goto _test_eof139;
|
4782
5143
|
case 139:
|
4783
|
-
#line
|
5144
|
+
#line 5145 "hpricot_scan.c"
|
4784
5145
|
switch( (*p) ) {
|
4785
5146
|
case 32: goto tr336;
|
4786
5147
|
case 34: goto tr331;
|
@@ -4850,14 +5211,14 @@ case 143:
|
|
4850
5211
|
}
|
4851
5212
|
goto tr328;
|
4852
5213
|
tr120:
|
4853
|
-
#line
|
5214
|
+
#line 105 "hpricot_scan.rl"
|
4854
5215
|
{ mark_aval = p; }
|
4855
5216
|
goto st144;
|
4856
5217
|
st144:
|
4857
5218
|
if ( ++p == pe )
|
4858
5219
|
goto _test_eof144;
|
4859
5220
|
case 144:
|
4860
|
-
#line
|
5221
|
+
#line 5222 "hpricot_scan.c"
|
4861
5222
|
switch( (*p) ) {
|
4862
5223
|
case 13: goto tr148;
|
4863
5224
|
case 32: goto tr148;
|
@@ -4896,7 +5257,7 @@ st146:
|
|
4896
5257
|
if ( ++p == pe )
|
4897
5258
|
goto _test_eof146;
|
4898
5259
|
case 146:
|
4899
|
-
#line
|
5260
|
+
#line 5261 "hpricot_scan.c"
|
4900
5261
|
switch( (*p) ) {
|
4901
5262
|
case 32: goto st212;
|
4902
5263
|
case 63: goto st146;
|
@@ -4934,7 +5295,7 @@ st147:
|
|
4934
5295
|
if ( ++p == pe )
|
4935
5296
|
goto _test_eof147;
|
4936
5297
|
case 147:
|
4937
|
-
#line
|
5298
|
+
#line 5299 "hpricot_scan.c"
|
4938
5299
|
switch( (*p) ) {
|
4939
5300
|
case 32: goto st212;
|
4940
5301
|
case 63: goto st146;
|
@@ -5013,7 +5374,7 @@ st213:
|
|
5013
5374
|
if ( ++p == pe )
|
5014
5375
|
goto _test_eof213;
|
5015
5376
|
case 213:
|
5016
|
-
#line
|
5377
|
+
#line 5378 "hpricot_scan.c"
|
5017
5378
|
switch( (*p) ) {
|
5018
5379
|
case 32: goto tr348;
|
5019
5380
|
case 118: goto st150;
|
@@ -5105,14 +5466,14 @@ case 158:
|
|
5105
5466
|
goto tr359;
|
5106
5467
|
goto tr349;
|
5107
5468
|
tr359:
|
5108
|
-
#line
|
5469
|
+
#line 105 "hpricot_scan.rl"
|
5109
5470
|
{ mark_aval = p; }
|
5110
5471
|
goto st159;
|
5111
5472
|
st159:
|
5112
5473
|
if ( ++p == pe )
|
5113
5474
|
goto _test_eof159;
|
5114
5475
|
case 159:
|
5115
|
-
#line
|
5476
|
+
#line 5477 "hpricot_scan.c"
|
5116
5477
|
switch( (*p) ) {
|
5117
5478
|
case 34: goto tr360;
|
5118
5479
|
case 95: goto st159;
|
@@ -5130,14 +5491,14 @@ case 159:
|
|
5130
5491
|
goto st159;
|
5131
5492
|
goto tr349;
|
5132
5493
|
tr360:
|
5133
|
-
#line
|
5134
|
-
{ SET(aval, p); ATTR(
|
5494
|
+
#line 115 "hpricot_scan.rl"
|
5495
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("version")), aval); }
|
5135
5496
|
goto st160;
|
5136
5497
|
st160:
|
5137
5498
|
if ( ++p == pe )
|
5138
5499
|
goto _test_eof160;
|
5139
5500
|
case 160:
|
5140
|
-
#line
|
5501
|
+
#line 5502 "hpricot_scan.c"
|
5141
5502
|
switch( (*p) ) {
|
5142
5503
|
case 32: goto st161;
|
5143
5504
|
case 62: goto tr363;
|
@@ -5250,14 +5611,14 @@ case 172:
|
|
5250
5611
|
goto tr377;
|
5251
5612
|
goto tr349;
|
5252
5613
|
tr377:
|
5253
|
-
#line
|
5614
|
+
#line 105 "hpricot_scan.rl"
|
5254
5615
|
{ mark_aval = p; }
|
5255
5616
|
goto st173;
|
5256
5617
|
st173:
|
5257
5618
|
if ( ++p == pe )
|
5258
5619
|
goto _test_eof173;
|
5259
5620
|
case 173:
|
5260
|
-
#line
|
5621
|
+
#line 5622 "hpricot_scan.c"
|
5261
5622
|
switch( (*p) ) {
|
5262
5623
|
case 34: goto tr378;
|
5263
5624
|
case 95: goto st173;
|
@@ -5275,14 +5636,14 @@ case 173:
|
|
5275
5636
|
goto st173;
|
5276
5637
|
goto tr349;
|
5277
5638
|
tr378:
|
5278
|
-
#line
|
5279
|
-
{ SET(aval, p); ATTR(
|
5639
|
+
#line 116 "hpricot_scan.rl"
|
5640
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("encoding")), aval); }
|
5280
5641
|
goto st174;
|
5281
5642
|
st174:
|
5282
5643
|
if ( ++p == pe )
|
5283
5644
|
goto _test_eof174;
|
5284
5645
|
case 174:
|
5285
|
-
#line
|
5646
|
+
#line 5647 "hpricot_scan.c"
|
5286
5647
|
switch( (*p) ) {
|
5287
5648
|
case 32: goto st175;
|
5288
5649
|
case 62: goto tr363;
|
@@ -5400,14 +5761,14 @@ case 187:
|
|
5400
5761
|
}
|
5401
5762
|
goto tr349;
|
5402
5763
|
tr393:
|
5403
|
-
#line
|
5764
|
+
#line 105 "hpricot_scan.rl"
|
5404
5765
|
{ mark_aval = p; }
|
5405
5766
|
goto st188;
|
5406
5767
|
st188:
|
5407
5768
|
if ( ++p == pe )
|
5408
5769
|
goto _test_eof188;
|
5409
5770
|
case 188:
|
5410
|
-
#line
|
5771
|
+
#line 5772 "hpricot_scan.c"
|
5411
5772
|
if ( (*p) == 111 )
|
5412
5773
|
goto st189;
|
5413
5774
|
goto tr349;
|
@@ -5419,14 +5780,14 @@ case 189:
|
|
5419
5780
|
goto tr396;
|
5420
5781
|
goto tr349;
|
5421
5782
|
tr396:
|
5422
|
-
#line
|
5423
|
-
{ SET(aval, p); ATTR(
|
5783
|
+
#line 117 "hpricot_scan.rl"
|
5784
|
+
{ SET(aval, p); ATTR(ID2SYM(rb_intern("standalone")), aval); }
|
5424
5785
|
goto st190;
|
5425
5786
|
st190:
|
5426
5787
|
if ( ++p == pe )
|
5427
5788
|
goto _test_eof190;
|
5428
5789
|
case 190:
|
5429
|
-
#line
|
5790
|
+
#line 5791 "hpricot_scan.c"
|
5430
5791
|
switch( (*p) ) {
|
5431
5792
|
case 32: goto st190;
|
5432
5793
|
case 62: goto tr363;
|
@@ -5436,14 +5797,14 @@ case 190:
|
|
5436
5797
|
goto st190;
|
5437
5798
|
goto tr349;
|
5438
5799
|
tr394:
|
5439
|
-
#line
|
5800
|
+
#line 105 "hpricot_scan.rl"
|
5440
5801
|
{ mark_aval = p; }
|
5441
5802
|
goto st191;
|
5442
5803
|
st191:
|
5443
5804
|
if ( ++p == pe )
|
5444
5805
|
goto _test_eof191;
|
5445
5806
|
case 191:
|
5446
|
-
#line
|
5807
|
+
#line 5808 "hpricot_scan.c"
|
5447
5808
|
if ( (*p) == 101 )
|
5448
5809
|
goto st192;
|
5449
5810
|
goto tr349;
|
@@ -5464,14 +5825,14 @@ case 193:
|
|
5464
5825
|
}
|
5465
5826
|
goto tr349;
|
5466
5827
|
tr399:
|
5467
|
-
#line
|
5828
|
+
#line 105 "hpricot_scan.rl"
|
5468
5829
|
{ mark_aval = p; }
|
5469
5830
|
goto st194;
|
5470
5831
|
st194:
|
5471
5832
|
if ( ++p == pe )
|
5472
5833
|
goto _test_eof194;
|
5473
5834
|
case 194:
|
5474
|
-
#line
|
5835
|
+
#line 5836 "hpricot_scan.c"
|
5475
5836
|
if ( (*p) == 111 )
|
5476
5837
|
goto st195;
|
5477
5838
|
goto tr349;
|
@@ -5483,14 +5844,14 @@ case 195:
|
|
5483
5844
|
goto tr396;
|
5484
5845
|
goto tr349;
|
5485
5846
|
tr400:
|
5486
|
-
#line
|
5847
|
+
#line 105 "hpricot_scan.rl"
|
5487
5848
|
{ mark_aval = p; }
|
5488
5849
|
goto st196;
|
5489
5850
|
st196:
|
5490
5851
|
if ( ++p == pe )
|
5491
5852
|
goto _test_eof196;
|
5492
5853
|
case 196:
|
5493
|
-
#line
|
5854
|
+
#line 5855 "hpricot_scan.c"
|
5494
5855
|
if ( (*p) == 101 )
|
5495
5856
|
goto st197;
|
5496
5857
|
goto tr349;
|
@@ -5512,14 +5873,14 @@ case 198:
|
|
5512
5873
|
goto tr403;
|
5513
5874
|
goto tr349;
|
5514
5875
|
tr403:
|
5515
|
-
#line
|
5876
|
+
#line 105 "hpricot_scan.rl"
|
5516
5877
|
{ mark_aval = p; }
|
5517
5878
|
goto st199;
|
5518
5879
|
st199:
|
5519
5880
|
if ( ++p == pe )
|
5520
5881
|
goto _test_eof199;
|
5521
5882
|
case 199:
|
5522
|
-
#line
|
5883
|
+
#line 5884 "hpricot_scan.c"
|
5523
5884
|
switch( (*p) ) {
|
5524
5885
|
case 39: goto tr378;
|
5525
5886
|
case 95: goto st199;
|
@@ -5555,14 +5916,14 @@ case 200:
|
|
5555
5916
|
goto tr405;
|
5556
5917
|
goto tr349;
|
5557
5918
|
tr405:
|
5558
|
-
#line
|
5919
|
+
#line 105 "hpricot_scan.rl"
|
5559
5920
|
{ mark_aval = p; }
|
5560
5921
|
goto st201;
|
5561
5922
|
st201:
|
5562
5923
|
if ( ++p == pe )
|
5563
5924
|
goto _test_eof201;
|
5564
5925
|
case 201:
|
5565
|
-
#line
|
5926
|
+
#line 5927 "hpricot_scan.c"
|
5566
5927
|
switch( (*p) ) {
|
5567
5928
|
case 39: goto tr360;
|
5568
5929
|
case 95: goto st201;
|
@@ -5611,7 +5972,7 @@ st214:
|
|
5611
5972
|
case 214:
|
5612
5973
|
#line 1 "hpricot_scan.rl"
|
5613
5974
|
{ts = p;}
|
5614
|
-
#line
|
5975
|
+
#line 5976 "hpricot_scan.c"
|
5615
5976
|
switch( (*p) ) {
|
5616
5977
|
case 10: goto tr423;
|
5617
5978
|
case 45: goto tr424;
|
@@ -5625,7 +5986,7 @@ st215:
|
|
5625
5986
|
if ( ++p == pe )
|
5626
5987
|
goto _test_eof215;
|
5627
5988
|
case 215:
|
5628
|
-
#line
|
5989
|
+
#line 5990 "hpricot_scan.c"
|
5629
5990
|
if ( (*p) == 45 )
|
5630
5991
|
goto st202;
|
5631
5992
|
goto tr425;
|
@@ -5668,7 +6029,7 @@ st216:
|
|
5668
6029
|
case 216:
|
5669
6030
|
#line 1 "hpricot_scan.rl"
|
5670
6031
|
{ts = p;}
|
5671
|
-
#line
|
6032
|
+
#line 6033 "hpricot_scan.c"
|
5672
6033
|
switch( (*p) ) {
|
5673
6034
|
case 10: goto tr428;
|
5674
6035
|
case 93: goto tr429;
|
@@ -5682,7 +6043,7 @@ st217:
|
|
5682
6043
|
if ( ++p == pe )
|
5683
6044
|
goto _test_eof217;
|
5684
6045
|
case 217:
|
5685
|
-
#line
|
6046
|
+
#line 6047 "hpricot_scan.c"
|
5686
6047
|
if ( (*p) == 93 )
|
5687
6048
|
goto st203;
|
5688
6049
|
goto tr430;
|
@@ -5721,7 +6082,7 @@ st218:
|
|
5721
6082
|
case 218:
|
5722
6083
|
#line 1 "hpricot_scan.rl"
|
5723
6084
|
{ts = p;}
|
5724
|
-
#line
|
6085
|
+
#line 6086 "hpricot_scan.c"
|
5725
6086
|
switch( (*p) ) {
|
5726
6087
|
case 10: goto tr433;
|
5727
6088
|
case 62: goto tr434;
|
@@ -6181,11 +6542,12 @@ case 219:
|
|
6181
6542
|
}
|
6182
6543
|
|
6183
6544
|
}
|
6184
|
-
#line
|
6545
|
+
#line 564 "hpricot_scan.rl"
|
6185
6546
|
|
6186
|
-
if (
|
6187
|
-
|
6188
|
-
|
6547
|
+
if (cs == hpricot_scan_error) {
|
6548
|
+
if (buf != NULL)
|
6549
|
+
free(buf);
|
6550
|
+
if (!NIL_P(tag))
|
6189
6551
|
{
|
6190
6552
|
rb_raise(rb_eHpricotParseError, "parse error on element <%s>, starting on line %d.\n" NO_WAY_SERIOUSLY, RSTRING_PTR(tag), curline);
|
6191
6553
|
}
|
@@ -6195,7 +6557,7 @@ case 219:
|
|
6195
6557
|
}
|
6196
6558
|
}
|
6197
6559
|
|
6198
|
-
if (
|
6560
|
+
if (done && ele_open)
|
6199
6561
|
{
|
6200
6562
|
ele_open = 0;
|
6201
6563
|
if (ts > 0) {
|
@@ -6205,11 +6567,11 @@ case 219:
|
|
6205
6567
|
}
|
6206
6568
|
}
|
6207
6569
|
|
6208
|
-
if (
|
6570
|
+
if (ts == 0)
|
6209
6571
|
{
|
6210
6572
|
have = 0;
|
6211
6573
|
/* text nodes have no ts because each byte is parsed alone */
|
6212
|
-
if (
|
6574
|
+
if (mark_tag != NULL && text == 1)
|
6213
6575
|
{
|
6214
6576
|
if (done)
|
6215
6577
|
{
|
@@ -6224,12 +6586,15 @@ case 219:
|
|
6224
6586
|
CAT(tag, p);
|
6225
6587
|
}
|
6226
6588
|
}
|
6227
|
-
|
6589
|
+
if (io)
|
6590
|
+
mark_tag = buf;
|
6591
|
+
else
|
6592
|
+
mark_tag = RSTRING_PTR(port);
|
6228
6593
|
}
|
6229
|
-
else
|
6594
|
+
else if (io)
|
6230
6595
|
{
|
6231
6596
|
have = pe - ts;
|
6232
|
-
memmove(
|
6597
|
+
memmove(buf, ts, have);
|
6233
6598
|
SLIDE(tag);
|
6234
6599
|
SLIDE(akey);
|
6235
6600
|
SLIDE(aval);
|
@@ -6237,18 +6602,91 @@ case 219:
|
|
6237
6602
|
ts = buf;
|
6238
6603
|
}
|
6239
6604
|
}
|
6240
|
-
|
6605
|
+
|
6606
|
+
if (buf != NULL)
|
6607
|
+
free(buf);
|
6608
|
+
|
6609
|
+
if (S != NULL)
|
6610
|
+
{
|
6611
|
+
VALUE doc = S->doc;
|
6612
|
+
rb_gc_unregister_address(&S->doc);
|
6613
|
+
free(S);
|
6614
|
+
return doc;
|
6615
|
+
}
|
6616
|
+
|
6617
|
+
return Qnil;
|
6241
6618
|
}
|
6242
6619
|
|
6243
6620
|
void Init_hpricot_scan()
|
6244
6621
|
{
|
6245
|
-
|
6622
|
+
mHpricot = rb_define_module("Hpricot");
|
6246
6623
|
rb_define_attr(rb_singleton_class(mHpricot), "buffer_size", 1, 1);
|
6247
|
-
rb_define_singleton_method(mHpricot, "scan", hpricot_scan, 1);
|
6624
|
+
rb_define_singleton_method(mHpricot, "scan", hpricot_scan, -1);
|
6625
|
+
rb_define_singleton_method(mHpricot, "css", hpricot_css, 3);
|
6248
6626
|
rb_eHpricotParseError = rb_define_class_under(mHpricot, "ParseError", rb_eStandardError);
|
6249
6627
|
|
6628
|
+
cDoc = rb_define_class_under(mHpricot, "Doc", rb_cObject);
|
6629
|
+
rb_define_alloc_func(cDoc, hpricot_ele_alloc);
|
6630
|
+
rb_define_method(cDoc, "children", hpricot_ele_get_children, 0);
|
6631
|
+
rb_define_method(cDoc, "children=", hpricot_ele_set_children, 1);
|
6632
|
+
|
6633
|
+
cBaseEle = rb_define_class_under(mHpricot, "BaseEle", rb_cObject);
|
6634
|
+
rb_define_alloc_func(cBaseEle, hpricot_ele_alloc);
|
6635
|
+
rb_define_method(cBaseEle, "raw_string", hpricot_ele_get_raw, 0);
|
6636
|
+
rb_define_method(cBaseEle, "clear_raw", hpricot_ele_clear_raw, 0);
|
6637
|
+
rb_define_method(cBaseEle, "parent", hpricot_ele_get_parent, 0);
|
6638
|
+
rb_define_method(cBaseEle, "parent=", hpricot_ele_set_parent, 1);
|
6639
|
+
cCData = rb_define_class_under(mHpricot, "CData", cBaseEle);
|
6640
|
+
rb_define_method(cCData, "content", hpricot_ele_get_tag, 0);
|
6641
|
+
rb_define_method(cCData, "content=", hpricot_ele_set_tag, 1);
|
6642
|
+
cComment = rb_define_class_under(mHpricot, "Comment", cBaseEle);
|
6643
|
+
rb_define_method(cComment, "content", hpricot_ele_get_tag, 0);
|
6644
|
+
rb_define_method(cComment, "content=", hpricot_ele_set_tag, 1);
|
6645
|
+
cDocType = rb_define_class_under(mHpricot, "DocType", cBaseEle);
|
6646
|
+
rb_define_method(cDocType, "target", hpricot_ele_get_tag, 0);
|
6647
|
+
rb_define_method(cDocType, "target=", hpricot_ele_set_tag, 1);
|
6648
|
+
rb_define_method(cDocType, "public_id", hpricot_ele_get_public_id, 0);
|
6649
|
+
rb_define_method(cDocType, "public_id=", hpricot_ele_set_public_id, 1);
|
6650
|
+
rb_define_method(cDocType, "system_id", hpricot_ele_get_system_id, 0);
|
6651
|
+
rb_define_method(cDocType, "system_id=", hpricot_ele_set_system_id, 1);
|
6652
|
+
cElem = rb_define_class_under(mHpricot, "Elem", cBaseEle);
|
6653
|
+
rb_define_method(cElem, "raw_attributes", hpricot_ele_get_attr, 0);
|
6654
|
+
rb_define_method(cElem, "raw_attributes=", hpricot_ele_set_attr, 1);
|
6655
|
+
rb_define_method(cElem, "children", hpricot_ele_get_children, 0);
|
6656
|
+
rb_define_method(cElem, "children=", hpricot_ele_set_children, 1);
|
6657
|
+
rb_define_method(cElem, "etag", hpricot_ele_get_etag, 0);
|
6658
|
+
rb_define_method(cElem, "etag=", hpricot_ele_set_etag, 1);
|
6659
|
+
rb_define_method(cElem, "name", hpricot_ele_get_tag, 0);
|
6660
|
+
rb_define_method(cElem, "name=", hpricot_ele_set_tag, 1);
|
6661
|
+
cETag = rb_define_class_under(mHpricot, "ETag", cBaseEle);
|
6662
|
+
rb_define_method(cETag, "name", hpricot_ele_get_tag, 0);
|
6663
|
+
rb_define_method(cETag, "name=", hpricot_ele_set_tag, 1);
|
6664
|
+
cBogusETag = rb_define_class_under(mHpricot, "BogusETag", cETag);
|
6665
|
+
cText = rb_define_class_under(mHpricot, "Text", cBaseEle);
|
6666
|
+
rb_define_method(cText, "content", hpricot_ele_get_tag, 0);
|
6667
|
+
rb_define_method(cText, "content=", hpricot_ele_set_tag, 1);
|
6668
|
+
cXMLDecl = rb_define_class_under(mHpricot, "XMLDecl", cBaseEle);
|
6669
|
+
rb_define_method(cXMLDecl, "encoding", hpricot_ele_get_encoding, 0);
|
6670
|
+
rb_define_method(cXMLDecl, "encoding=", hpricot_ele_set_encoding, 1);
|
6671
|
+
rb_define_method(cXMLDecl, "standalone", hpricot_ele_get_standalone, 0);
|
6672
|
+
rb_define_method(cXMLDecl, "standalone=", hpricot_ele_set_standalone, 1);
|
6673
|
+
rb_define_method(cXMLDecl, "version", hpricot_ele_get_version, 0);
|
6674
|
+
rb_define_method(cXMLDecl, "version=", hpricot_ele_set_version, 1);
|
6675
|
+
cProcIns = rb_define_class_under(mHpricot, "ProcIns", cBaseEle);
|
6676
|
+
rb_define_method(cProcIns, "target", hpricot_ele_get_tag, 0);
|
6677
|
+
rb_define_method(cProcIns, "target=", hpricot_ele_set_tag, 1);
|
6678
|
+
rb_define_method(cProcIns, "content", hpricot_ele_get_attr, 0);
|
6679
|
+
rb_define_method(cProcIns, "content=", hpricot_ele_set_attr, 1);
|
6680
|
+
|
6681
|
+
s_ElementContent = rb_intern("ElementContent");
|
6682
|
+
symAllow = ID2SYM(rb_intern("allow"));
|
6683
|
+
symDeny = ID2SYM(rb_intern("deny"));
|
6684
|
+
s_downcase = rb_intern("downcase");
|
6685
|
+
s_new = rb_intern("new");
|
6686
|
+
s_parent = rb_intern("parent");
|
6250
6687
|
s_read = rb_intern("read");
|
6251
6688
|
s_to_str = rb_intern("to_str");
|
6689
|
+
iv_parent = rb_intern("parent");
|
6252
6690
|
sym_xmldecl = ID2SYM(rb_intern("xmldecl"));
|
6253
6691
|
sym_doctype = ID2SYM(rb_intern("doctype"));
|
6254
6692
|
sym_procins = ID2SYM(rb_intern("procins"));
|
@@ -6258,4 +6696,9 @@ void Init_hpricot_scan()
|
|
6258
6696
|
sym_comment = ID2SYM(rb_intern("comment"));
|
6259
6697
|
sym_cdata = ID2SYM(rb_intern("cdata"));
|
6260
6698
|
sym_text = ID2SYM(rb_intern("text"));
|
6699
|
+
sym_EMPTY = ID2SYM(rb_intern("EMPTY"));
|
6700
|
+
sym_CDATA = ID2SYM(rb_intern("CDATA"));
|
6701
|
+
|
6702
|
+
rb_const_set(mHpricot, rb_intern("ProcInsParse"),
|
6703
|
+
reProcInsParse = rb_eval_string("/\\A<\\?(\\S+)\\s+(.+)/m"));
|
6261
6704
|
}
|