oga 0.2.0-java → 0.2.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/doc/changelog.md +47 -0
- data/ext/c/lexer.c +847 -639
- data/ext/c/lexer.rl +39 -14
- data/ext/java/org/liboga/xml/Lexer.java +369 -263
- data/ext/java/org/liboga/xml/Lexer.rl +36 -0
- data/ext/ragel/base_lexer.rl +93 -35
- data/lib/liboga.jar +0 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/document.rb +7 -0
- data/lib/oga/xml/element.rb +3 -6
- data/lib/oga/xml/entities.rb +13 -4
- data/lib/oga/xml/lexer.rb +17 -0
- data/lib/oga/xml/parser.rb +95 -84
- data/lib/oga/xml/text.rb +9 -1
- metadata +2 -2
data/ext/c/lexer.rl
CHANGED
@@ -16,14 +16,14 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
16
16
|
#define callback_simple(name) \
|
17
17
|
liboga_xml_lexer_callback_simple(self, name);
|
18
18
|
|
19
|
-
#define
|
20
|
-
|
19
|
+
#define advance_line(amount) \
|
20
|
+
rb_funcall(self, id_advance_line, 1, INT2NUM(amount));
|
21
21
|
|
22
|
-
#define
|
23
|
-
|
22
|
+
#define inside_html_script_p() \
|
23
|
+
rb_funcall(self, id_inside_html_script_p, 0) == Qtrue
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
ID id_advance_line;
|
26
|
+
ID id_inside_html_script_p;
|
27
27
|
|
28
28
|
%%machine c_lexer;
|
29
29
|
|
@@ -38,16 +38,15 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
38
38
|
*/
|
39
39
|
void liboga_xml_lexer_callback(
|
40
40
|
VALUE self,
|
41
|
-
|
41
|
+
VALUE name,
|
42
42
|
rb_encoding *encoding,
|
43
43
|
const char *ts,
|
44
44
|
const char *te
|
45
45
|
)
|
46
46
|
{
|
47
|
-
VALUE value
|
48
|
-
VALUE method = rb_intern(name);
|
47
|
+
VALUE value = rb_enc_str_new(ts, te - ts, encoding);
|
49
48
|
|
50
|
-
rb_funcall(self,
|
49
|
+
rb_funcall(self, name, 1, value);
|
51
50
|
}
|
52
51
|
|
53
52
|
/**
|
@@ -57,11 +56,9 @@ void liboga_xml_lexer_callback(
|
|
57
56
|
* @example
|
58
57
|
* liboga_xml_lexer_callback_simple(self, "on_cdata_start");
|
59
58
|
*/
|
60
|
-
void liboga_xml_lexer_callback_simple(VALUE self,
|
59
|
+
void liboga_xml_lexer_callback_simple(VALUE self, VALUE name)
|
61
60
|
{
|
62
|
-
|
63
|
-
|
64
|
-
rb_funcall(self, method, 0);
|
61
|
+
rb_funcall(self, name, 0);
|
65
62
|
}
|
66
63
|
|
67
64
|
%% write data;
|
@@ -93,6 +90,31 @@ VALUE oga_xml_lexer_advance(VALUE self, VALUE data_block)
|
|
93
90
|
|
94
91
|
int lines = state->lines;
|
95
92
|
|
93
|
+
ID id_advance_line = rb_intern("advance_line");
|
94
|
+
ID id_on_attribute = rb_intern("on_attribute");
|
95
|
+
ID id_on_attribute_ns = rb_intern("on_attribute_ns");
|
96
|
+
ID id_on_cdata = rb_intern("on_cdata");
|
97
|
+
ID id_on_comment = rb_intern("on_comment");
|
98
|
+
ID id_on_doctype_end = rb_intern("on_doctype_end");
|
99
|
+
ID id_on_doctype_inline = rb_intern("on_doctype_inline");
|
100
|
+
ID id_on_doctype_name = rb_intern("on_doctype_name");
|
101
|
+
ID id_on_doctype_start = rb_intern("on_doctype_start");
|
102
|
+
ID id_on_doctype_type = rb_intern("on_doctype_type");
|
103
|
+
ID id_on_element_end = rb_intern("on_element_end");
|
104
|
+
ID id_on_element_name = rb_intern("on_element_name");
|
105
|
+
ID id_on_element_ns = rb_intern("on_element_ns");
|
106
|
+
ID id_on_element_open_end = rb_intern("on_element_open_end");
|
107
|
+
ID id_on_element_start = rb_intern("on_element_start");
|
108
|
+
ID id_on_proc_ins_end = rb_intern("on_proc_ins_end");
|
109
|
+
ID id_on_proc_ins_name = rb_intern("on_proc_ins_name");
|
110
|
+
ID id_on_proc_ins_start = rb_intern("on_proc_ins_start");
|
111
|
+
ID id_on_string_body = rb_intern("on_string_body");
|
112
|
+
ID id_on_string_dquote = rb_intern("on_string_dquote");
|
113
|
+
ID id_on_string_squote = rb_intern("on_string_squote");
|
114
|
+
ID id_on_text = rb_intern("on_text");
|
115
|
+
ID id_on_xml_decl_end = rb_intern("on_xml_decl_end");
|
116
|
+
ID id_on_xml_decl_start = rb_intern("on_xml_decl_start");
|
117
|
+
|
96
118
|
%% write exec;
|
97
119
|
|
98
120
|
state->lines = lines;
|
@@ -151,6 +173,9 @@ void Init_liboga_xml_lexer()
|
|
151
173
|
VALUE mXML = rb_const_get(mOga, rb_intern("XML"));
|
152
174
|
VALUE cLexer = rb_define_class_under(mXML, "Lexer", rb_cObject);
|
153
175
|
|
176
|
+
id_advance_line = rb_intern("advance_line");
|
177
|
+
id_inside_html_script_p = rb_intern("inside_html_script?");
|
178
|
+
|
154
179
|
rb_define_method(cLexer, "advance_native", oga_xml_lexer_advance, 1);
|
155
180
|
rb_define_method(cLexer, "reset_native", oga_xml_lexer_reset, 0);
|
156
181
|
|
@@ -45,14 +45,15 @@ private static byte[] init__java_lexer_actions_0()
|
|
45
45
|
return new byte [] {
|
46
46
|
0, 1, 0, 1, 2, 1, 3, 1, 4, 1, 5, 1,
|
47
47
|
6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1,
|
48
|
-
|
48
|
+
12, 1, 13, 1, 16, 1, 17, 1, 18, 1, 19, 1,
|
49
49
|
20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1,
|
50
50
|
26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1,
|
51
51
|
32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1,
|
52
|
-
38, 1, 39, 1,
|
53
|
-
|
54
|
-
|
55
|
-
4,
|
52
|
+
38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 44, 1,
|
53
|
+
45, 1, 48, 1, 49, 1, 50, 1, 51, 1, 52, 1,
|
54
|
+
53, 1, 54, 1, 55, 1, 56, 1, 57, 2, 0, 1,
|
55
|
+
2, 0, 43, 2, 4, 0, 2, 4, 14, 2, 4, 15,
|
56
|
+
2, 4, 46, 2, 4, 47
|
56
57
|
};
|
57
58
|
}
|
58
59
|
|
@@ -64,10 +65,11 @@ private static short[] init__java_lexer_key_offsets_0()
|
|
64
65
|
return new short [] {
|
65
66
|
0, 0, 4, 5, 6, 7, 9, 11, 13, 15, 17, 19,
|
66
67
|
21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 41,
|
67
|
-
51, 60,
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
51, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
69
|
+
81, 83, 91, 100, 109, 110, 111, 112, 113, 114, 115, 116,
|
70
|
+
117, 133, 141, 150, 159, 168, 177, 186, 195, 204, 213, 222,
|
71
|
+
231, 242, 250, 251, 259, 268, 285, 294, 295, 296, 307, 318,
|
72
|
+
319
|
71
73
|
};
|
72
74
|
}
|
73
75
|
|
@@ -82,27 +84,28 @@ private static char[] init__java_lexer_trans_keys_0()
|
|
82
84
|
68, 65, 84, 65, 91, 93, 93, 62, 93, 45, 95, 48,
|
83
85
|
57, 65, 90, 97, 122, 45, 58, 62, 95, 48, 57, 65,
|
84
86
|
90, 97, 122, 45, 95, 120, 48, 57, 65, 90, 97, 122,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
122, 45,
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
97, 122,
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
87
|
+
10, 62, 115, 99, 114, 105, 112, 116, 62, 60, 33, 45,
|
88
|
+
47, 63, 95, 48, 57, 65, 90, 97, 122, 9, 32, 45,
|
89
|
+
95, 48, 57, 65, 90, 97, 122, 45, 95, 109, 48, 57,
|
90
|
+
65, 90, 97, 122, 45, 95, 108, 48, 57, 65, 90, 97,
|
91
|
+
122, 63, 62, 39, 39, 34, 34, 93, 93, 9, 32, 34,
|
92
|
+
39, 45, 62, 80, 83, 91, 95, 48, 57, 65, 90, 97,
|
93
|
+
122, 45, 95, 48, 57, 65, 90, 97, 122, 45, 85, 95,
|
94
|
+
48, 57, 65, 90, 97, 122, 45, 66, 95, 48, 57, 65,
|
95
|
+
90, 97, 122, 45, 76, 95, 48, 57, 65, 90, 97, 122,
|
96
|
+
45, 73, 95, 48, 57, 65, 90, 97, 122, 45, 67, 95,
|
97
|
+
48, 57, 65, 90, 97, 122, 45, 89, 95, 48, 57, 65,
|
98
|
+
90, 97, 122, 45, 83, 95, 48, 57, 65, 90, 97, 122,
|
99
|
+
45, 84, 95, 48, 57, 65, 90, 97, 122, 45, 69, 95,
|
100
|
+
48, 57, 65, 90, 97, 122, 45, 77, 95, 48, 57, 65,
|
101
|
+
90, 97, 122, 34, 39, 45, 63, 95, 48, 57, 65, 90,
|
102
|
+
97, 122, 45, 95, 48, 57, 65, 90, 97, 122, 62, 45,
|
103
|
+
95, 48, 57, 65, 90, 97, 122, 45, 58, 95, 48, 57,
|
104
|
+
65, 90, 97, 122, 9, 10, 13, 32, 34, 39, 45, 47,
|
105
|
+
61, 62, 95, 48, 57, 65, 90, 97, 122, 45, 58, 95,
|
106
|
+
48, 57, 65, 90, 97, 122, 60, 60, 33, 45, 60, 63,
|
107
|
+
95, 47, 57, 65, 90, 97, 122, 33, 45, 60, 63, 95,
|
108
|
+
47, 57, 65, 90, 97, 122, 60, 47, 0
|
106
109
|
};
|
107
110
|
}
|
108
111
|
|
@@ -114,10 +117,11 @@ private static byte[] init__java_lexer_single_lengths_0()
|
|
114
117
|
return new byte [] {
|
115
118
|
0, 4, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
|
116
119
|
2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4,
|
117
|
-
3,
|
118
|
-
|
119
|
-
|
120
|
-
1, 1, 5, 5
|
120
|
+
3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
|
121
|
+
2, 2, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
|
122
|
+
10, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
123
|
+
5, 2, 1, 2, 3, 11, 3, 1, 1, 5, 5, 1,
|
124
|
+
1
|
121
125
|
};
|
122
126
|
}
|
123
127
|
|
@@ -129,10 +133,11 @@ private static byte[] init__java_lexer_range_lengths_0()
|
|
129
133
|
return new byte [] {
|
130
134
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
131
135
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
|
132
|
-
3, 0, 0, 0, 0, 0,
|
133
|
-
0,
|
134
|
-
3, 3, 3, 3, 3, 3, 3,
|
135
|
-
0, 0, 3, 3
|
136
|
+
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
|
137
|
+
0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
138
|
+
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
139
|
+
3, 3, 0, 3, 3, 3, 3, 0, 0, 3, 3, 0,
|
140
|
+
0
|
136
141
|
};
|
137
142
|
}
|
138
143
|
|
@@ -144,10 +149,11 @@ private static short[] init__java_lexer_index_offsets_0()
|
|
144
149
|
return new short [] {
|
145
150
|
0, 0, 5, 7, 9, 11, 14, 17, 20, 23, 26, 29,
|
146
151
|
32, 35, 37, 39, 41, 43, 45, 47, 49, 51, 54, 60,
|
147
|
-
68, 75,
|
148
|
-
|
149
|
-
|
150
|
-
|
152
|
+
68, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
|
153
|
+
104, 107, 113, 120, 127, 129, 131, 133, 135, 137, 139, 141,
|
154
|
+
143, 157, 163, 170, 177, 184, 191, 198, 205, 212, 219, 226,
|
155
|
+
233, 242, 248, 250, 256, 263, 278, 285, 287, 289, 298, 307,
|
156
|
+
309
|
151
157
|
};
|
152
158
|
}
|
153
159
|
|
@@ -163,25 +169,26 @@ private static byte[] init__java_lexer_indicies_0()
|
|
163
169
|
0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21,
|
164
170
|
20, 22, 20, 23, 22, 20, 24, 24, 24, 24, 24, 0,
|
165
171
|
24, 25, 26, 24, 24, 24, 24, 0, 27, 27, 28, 27,
|
166
|
-
27, 27, 0, 29, 30,
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
172
|
+
27, 27, 0, 29, 30, 31, 30, 33, 32, 34, 32, 35,
|
173
|
+
32, 36, 32, 37, 32, 38, 32, 39, 32, 41, 40, 43,
|
174
|
+
44, 25, 45, 44, 44, 44, 44, 42, 14, 14, 46, 27,
|
175
|
+
27, 27, 27, 27, 47, 27, 27, 49, 27, 27, 27, 48,
|
176
|
+
27, 27, 50, 27, 27, 27, 48, 52, 51, 54, 53, 56,
|
177
|
+
55, 57, 55, 59, 58, 60, 58, 62, 61, 63, 61, 64,
|
178
|
+
64, 65, 66, 67, 68, 69, 70, 71, 67, 67, 67, 67,
|
179
|
+
30, 67, 67, 67, 67, 67, 72, 67, 74, 67, 67, 67,
|
180
|
+
67, 73, 67, 75, 67, 67, 67, 67, 73, 67, 76, 67,
|
181
|
+
67, 67, 67, 73, 67, 77, 67, 67, 67, 67, 73, 67,
|
182
|
+
78, 67, 67, 67, 67, 73, 67, 79, 67, 67, 67, 67,
|
183
|
+
73, 67, 80, 67, 67, 67, 67, 73, 67, 81, 67, 67,
|
184
|
+
67, 67, 73, 67, 82, 67, 67, 67, 67, 73, 67, 78,
|
185
|
+
67, 67, 67, 67, 73, 84, 85, 86, 87, 86, 86, 86,
|
186
|
+
86, 83, 86, 86, 86, 86, 86, 88, 90, 89, 91, 91,
|
187
|
+
91, 91, 91, 30, 91, 93, 91, 91, 91, 91, 92, 94,
|
188
|
+
29, 95, 94, 96, 97, 98, 99, 94, 100, 98, 98, 98,
|
189
|
+
98, 30, 98, 102, 98, 98, 98, 98, 101, 104, 103, 106,
|
190
|
+
103, 107, 107, 106, 107, 107, 107, 107, 107, 103, 108, 108,
|
191
|
+
106, 108, 108, 108, 108, 108, 103, 110, 109, 112, 111, 0
|
185
192
|
};
|
186
193
|
}
|
187
194
|
|
@@ -191,15 +198,16 @@ private static final byte _java_lexer_indicies[] = init__java_lexer_indicies_0()
|
|
191
198
|
private static byte[] init__java_lexer_trans_targs_0()
|
192
199
|
{
|
193
200
|
return new byte [] {
|
194
|
-
|
195
|
-
11, 12,
|
196
|
-
23, 22,
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
201
|
+
34, 2, 6, 13, 3, 4, 5, 34, 7, 8, 9, 10,
|
202
|
+
11, 12, 36, 14, 15, 16, 17, 18, 19, 20, 21, 34,
|
203
|
+
23, 22, 34, 37, 38, 65, 0, 65, 71, 28, 29, 30,
|
204
|
+
31, 32, 33, 71, 34, 35, 34, 1, 34, 24, 34, 34,
|
205
|
+
34, 39, 37, 40, 41, 40, 40, 43, 42, 42, 45, 44,
|
206
|
+
44, 47, 46, 46, 48, 48, 48, 49, 48, 50, 55, 48,
|
207
|
+
48, 48, 51, 52, 53, 54, 49, 56, 57, 58, 59, 60,
|
208
|
+
60, 60, 61, 62, 60, 60, 60, 64, 63, 63, 65, 25,
|
209
|
+
65, 65, 66, 26, 65, 65, 65, 68, 70, 67, 69, 67,
|
210
|
+
67, 71, 72, 71, 27
|
203
211
|
};
|
204
212
|
}
|
205
213
|
|
@@ -209,15 +217,16 @@ private static final byte _java_lexer_trans_targs[] = init__java_lexer_trans_tar
|
|
209
217
|
private static byte[] init__java_lexer_trans_actions_0()
|
210
218
|
{
|
211
219
|
return new byte [] {
|
212
|
-
|
213
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
214
|
-
0, 0,
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
220
|
+
101, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0,
|
221
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
|
222
|
+
0, 0, 91, 123, 0, 59, 0, 69, 83, 0, 0, 0,
|
223
|
+
0, 0, 0, 79, 93, 7, 99, 0, 89, 0, 95, 103,
|
224
|
+
97, 0, 120, 11, 0, 13, 9, 1, 15, 17, 1, 19,
|
225
|
+
21, 1, 23, 25, 33, 31, 29, 117, 35, 0, 0, 27,
|
226
|
+
39, 37, 0, 0, 0, 0, 114, 0, 0, 0, 0, 47,
|
227
|
+
45, 43, 0, 0, 49, 51, 41, 0, 55, 53, 57, 0,
|
228
|
+
65, 63, 0, 0, 67, 71, 61, 1, 105, 77, 105, 75,
|
229
|
+
73, 108, 111, 81, 0
|
221
230
|
};
|
222
231
|
}
|
223
232
|
|
@@ -229,10 +238,11 @@ private static byte[] init__java_lexer_to_state_actions_0()
|
|
229
238
|
return new byte [] {
|
230
239
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
231
240
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
232
|
-
0, 0, 0, 0, 0,
|
233
|
-
0,
|
234
|
-
|
235
|
-
3, 0, 0, 0
|
241
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
242
|
+
0, 0, 0, 0, 3, 0, 3, 0, 3, 0, 3, 0,
|
243
|
+
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
244
|
+
3, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0, 3,
|
245
|
+
0
|
236
246
|
};
|
237
247
|
}
|
238
248
|
|
@@ -244,10 +254,11 @@ private static byte[] init__java_lexer_from_state_actions_0()
|
|
244
254
|
return new byte [] {
|
245
255
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
246
256
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
247
|
-
0, 0, 0, 0, 0,
|
248
|
-
0,
|
249
|
-
|
250
|
-
5, 0, 0, 0
|
257
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
|
258
|
+
0, 0, 0, 0, 5, 0, 5, 0, 5, 0, 5, 0,
|
259
|
+
5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
260
|
+
5, 0, 0, 5, 0, 5, 0, 5, 0, 0, 0, 5,
|
261
|
+
0
|
251
262
|
};
|
252
263
|
}
|
253
264
|
|
@@ -259,29 +270,32 @@ private static short[] init__java_lexer_eof_trans_0()
|
|
259
270
|
return new short [] {
|
260
271
|
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
261
272
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
262
|
-
1, 0, 0,
|
263
|
-
48,
|
264
|
-
|
265
|
-
0,
|
273
|
+
1, 0, 0, 33, 33, 33, 33, 33, 33, 33, 0, 43,
|
274
|
+
47, 48, 49, 49, 0, 54, 0, 58, 0, 61, 0, 64,
|
275
|
+
0, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
|
276
|
+
0, 89, 90, 0, 93, 0, 102, 0, 106, 106, 106, 0,
|
277
|
+
112
|
266
278
|
};
|
267
279
|
}
|
268
280
|
|
269
281
|
private static final short _java_lexer_eof_trans[] = init__java_lexer_eof_trans_0();
|
270
282
|
|
271
283
|
|
272
|
-
static final int java_lexer_start =
|
273
|
-
static final int java_lexer_first_final =
|
284
|
+
static final int java_lexer_start = 34;
|
285
|
+
static final int java_lexer_first_final = 34;
|
274
286
|
static final int java_lexer_error = 0;
|
275
287
|
|
276
|
-
static final int java_lexer_en_proc_ins_body =
|
277
|
-
static final int java_lexer_en_string_squote =
|
278
|
-
static final int java_lexer_en_string_dquote =
|
279
|
-
static final int
|
280
|
-
static final int
|
281
|
-
static final int
|
282
|
-
static final int
|
283
|
-
static final int
|
284
|
-
static final int
|
288
|
+
static final int java_lexer_en_proc_ins_body = 40;
|
289
|
+
static final int java_lexer_en_string_squote = 42;
|
290
|
+
static final int java_lexer_en_string_dquote = 44;
|
291
|
+
static final int java_lexer_en_doctype_inline = 46;
|
292
|
+
static final int java_lexer_en_doctype = 48;
|
293
|
+
static final int java_lexer_en_xml_decl = 60;
|
294
|
+
static final int java_lexer_en_element_name = 63;
|
295
|
+
static final int java_lexer_en_element_head = 65;
|
296
|
+
static final int java_lexer_en_text = 67;
|
297
|
+
static final int java_lexer_en_script_text = 71;
|
298
|
+
static final int java_lexer_en_main = 34;
|
285
299
|
|
286
300
|
|
287
301
|
// line 39 "ext/java/org/liboga/xml/Lexer.rl"
|
@@ -350,8 +364,33 @@ static final int java_lexer_en_main = 29;
|
|
350
364
|
int pe = data.length;
|
351
365
|
int eof = data.length;
|
352
366
|
|
367
|
+
String id_advance_line = "advance_line";
|
368
|
+
String id_on_attribute = "on_attribute";
|
369
|
+
String id_on_attribute_ns = "on_attribute_ns";
|
370
|
+
String id_on_cdata = "on_cdata";
|
371
|
+
String id_on_comment = "on_comment";
|
372
|
+
String id_on_doctype_end = "on_doctype_end";
|
373
|
+
String id_on_doctype_inline = "on_doctype_inline";
|
374
|
+
String id_on_doctype_name = "on_doctype_name";
|
375
|
+
String id_on_doctype_start = "on_doctype_start";
|
376
|
+
String id_on_doctype_type = "on_doctype_type";
|
377
|
+
String id_on_element_end = "on_element_end";
|
378
|
+
String id_on_element_name = "on_element_name";
|
379
|
+
String id_on_element_ns = "on_element_ns";
|
380
|
+
String id_on_element_open_end = "on_element_open_end";
|
381
|
+
String id_on_element_start = "on_element_start";
|
382
|
+
String id_on_proc_ins_end = "on_proc_ins_end";
|
383
|
+
String id_on_proc_ins_name = "on_proc_ins_name";
|
384
|
+
String id_on_proc_ins_start = "on_proc_ins_start";
|
385
|
+
String id_on_string_body = "on_string_body";
|
386
|
+
String id_on_string_dquote = "on_string_dquote";
|
387
|
+
String id_on_string_squote = "on_string_squote";
|
388
|
+
String id_on_text = "on_text";
|
389
|
+
String id_on_xml_decl_end = "on_xml_decl_end";
|
390
|
+
String id_on_xml_decl_start = "on_xml_decl_start";
|
391
|
+
|
353
392
|
|
354
|
-
// line
|
393
|
+
// line 394 "ext/java/org/liboga/xml/Lexer.java"
|
355
394
|
{
|
356
395
|
int _klen;
|
357
396
|
int _trans = 0;
|
@@ -380,7 +419,7 @@ case 1:
|
|
380
419
|
// line 1 "NONE"
|
381
420
|
{ts = p;}
|
382
421
|
break;
|
383
|
-
// line
|
422
|
+
// line 423 "ext/java/org/liboga/xml/Lexer.java"
|
384
423
|
}
|
385
424
|
}
|
386
425
|
|
@@ -445,13 +484,13 @@ case 3:
|
|
445
484
|
switch ( _java_lexer_actions[_acts++] )
|
446
485
|
{
|
447
486
|
case 0:
|
448
|
-
// line
|
487
|
+
// line 51 "ext/ragel/base_lexer.rl"
|
449
488
|
{
|
450
489
|
if ( data[p] == '\n' ) lines++;
|
451
490
|
}
|
452
491
|
break;
|
453
492
|
case 1:
|
454
|
-
// line
|
493
|
+
// line 387 "ext/ragel/base_lexer.rl"
|
455
494
|
{ mark = p; }
|
456
495
|
break;
|
457
496
|
case 4:
|
@@ -459,36 +498,36 @@ case 3:
|
|
459
498
|
{te = p+1;}
|
460
499
|
break;
|
461
500
|
case 5:
|
462
|
-
// line
|
501
|
+
// line 116 "ext/ragel/base_lexer.rl"
|
463
502
|
{te = p+1;{
|
464
|
-
callback(
|
465
|
-
callback_simple(
|
503
|
+
callback(id_on_text, data, encoding, mark, ts);
|
504
|
+
callback_simple(id_on_proc_ins_end);
|
466
505
|
|
467
506
|
mark = 0;
|
468
507
|
|
469
|
-
( this.cs) =
|
508
|
+
( this.cs) = 34;
|
470
509
|
}}
|
471
510
|
break;
|
472
511
|
case 6:
|
473
|
-
// line
|
512
|
+
// line 125 "ext/ragel/base_lexer.rl"
|
474
513
|
{te = p+1;}
|
475
514
|
break;
|
476
515
|
case 7:
|
477
|
-
// line
|
516
|
+
// line 125 "ext/ragel/base_lexer.rl"
|
478
517
|
{te = p;p--;}
|
479
518
|
break;
|
480
519
|
case 8:
|
481
|
-
// line
|
520
|
+
// line 163 "ext/ragel/base_lexer.rl"
|
482
521
|
{te = p+1;{
|
483
|
-
callback_simple(
|
522
|
+
callback_simple(id_on_string_squote);
|
484
523
|
|
485
524
|
{( this.cs) = ( this.stack)[--( this.top)];_goto_targ = 2; if (true) continue _goto;}
|
486
525
|
}}
|
487
526
|
break;
|
488
527
|
case 9:
|
489
|
-
// line
|
528
|
+
// line 137 "ext/ragel/base_lexer.rl"
|
490
529
|
{te = p;p--;{
|
491
|
-
callback(
|
530
|
+
callback(id_on_string_body, data, encoding, ts, te);
|
492
531
|
|
493
532
|
if ( lines > 0 )
|
494
533
|
{
|
@@ -499,17 +538,17 @@ case 3:
|
|
499
538
|
}}
|
500
539
|
break;
|
501
540
|
case 10:
|
502
|
-
// line
|
541
|
+
// line 173 "ext/ragel/base_lexer.rl"
|
503
542
|
{te = p+1;{
|
504
|
-
callback_simple(
|
543
|
+
callback_simple(id_on_string_dquote);
|
505
544
|
|
506
545
|
{( this.cs) = ( this.stack)[--( this.top)];_goto_targ = 2; if (true) continue _goto;}
|
507
546
|
}}
|
508
547
|
break;
|
509
548
|
case 11:
|
510
|
-
// line
|
549
|
+
// line 137 "ext/ragel/base_lexer.rl"
|
511
550
|
{te = p;p--;{
|
512
|
-
callback(
|
551
|
+
callback(id_on_string_body, data, encoding, ts, te);
|
513
552
|
|
514
553
|
if ( lines > 0 )
|
515
554
|
{
|
@@ -520,174 +559,199 @@ case 3:
|
|
520
559
|
}}
|
521
560
|
break;
|
522
561
|
case 12:
|
523
|
-
// line
|
524
|
-
{( this.
|
562
|
+
// line 210 "ext/ragel/base_lexer.rl"
|
563
|
+
{te = p+1;{ ( this.cs) = 48; }}
|
525
564
|
break;
|
526
565
|
case 13:
|
527
|
-
// line
|
528
|
-
{
|
566
|
+
// line 199 "ext/ragel/base_lexer.rl"
|
567
|
+
{te = p;p--;{
|
568
|
+
callback(id_on_doctype_inline, data, encoding, ts, te);
|
569
|
+
|
570
|
+
if ( lines > 0 )
|
571
|
+
{
|
572
|
+
advance_line(lines);
|
573
|
+
|
574
|
+
lines = 0;
|
575
|
+
}
|
576
|
+
}}
|
529
577
|
break;
|
530
578
|
case 14:
|
531
|
-
// line
|
532
|
-
{
|
533
|
-
callback("on_doctype_inline", data, encoding, ts + 1, te - 1);
|
534
|
-
}}
|
579
|
+
// line 216 "ext/ragel/base_lexer.rl"
|
580
|
+
{( this.act) = 9;}
|
535
581
|
break;
|
536
582
|
case 15:
|
537
|
-
// line
|
583
|
+
// line 231 "ext/ragel/base_lexer.rl"
|
584
|
+
{( this.act) = 14;}
|
585
|
+
break;
|
586
|
+
case 16:
|
587
|
+
// line 221 "ext/ragel/base_lexer.rl"
|
588
|
+
{te = p+1;{ ( this.cs) = 46; }}
|
589
|
+
break;
|
590
|
+
case 17:
|
591
|
+
// line 148 "ext/ragel/base_lexer.rl"
|
538
592
|
{te = p+1;{
|
539
|
-
callback_simple(
|
593
|
+
callback_simple(id_on_string_squote);
|
540
594
|
|
541
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
595
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 42; _goto_targ = 2; if (true) continue _goto;}
|
542
596
|
}}
|
543
597
|
break;
|
544
|
-
case
|
545
|
-
// line
|
598
|
+
case 18:
|
599
|
+
// line 154 "ext/ragel/base_lexer.rl"
|
546
600
|
{te = p+1;{
|
547
|
-
callback_simple(
|
601
|
+
callback_simple(id_on_string_dquote);
|
548
602
|
|
549
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
603
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 44; _goto_targ = 2; if (true) continue _goto;}
|
550
604
|
}}
|
551
605
|
break;
|
552
|
-
case
|
553
|
-
// line
|
606
|
+
case 19:
|
607
|
+
// line 229 "ext/ragel/base_lexer.rl"
|
554
608
|
{te = p+1;}
|
555
609
|
break;
|
556
|
-
case
|
557
|
-
// line
|
610
|
+
case 20:
|
611
|
+
// line 235 "ext/ragel/base_lexer.rl"
|
558
612
|
{te = p+1;{
|
559
|
-
callback_simple(
|
560
|
-
( this.cs) =
|
613
|
+
callback_simple(id_on_doctype_end);
|
614
|
+
( this.cs) = 34;
|
561
615
|
}}
|
562
616
|
break;
|
563
|
-
case
|
564
|
-
// line
|
617
|
+
case 21:
|
618
|
+
// line 231 "ext/ragel/base_lexer.rl"
|
565
619
|
{te = p;p--;{
|
566
|
-
callback(
|
620
|
+
callback(id_on_doctype_name, data, encoding, ts, te);
|
567
621
|
}}
|
568
622
|
break;
|
569
|
-
case
|
623
|
+
case 22:
|
570
624
|
// line 1 "NONE"
|
571
625
|
{ switch( ( this.act) ) {
|
572
|
-
case
|
626
|
+
case 9:
|
573
627
|
{{p = ((te))-1;}
|
574
|
-
callback(
|
628
|
+
callback(id_on_doctype_type, data, encoding, ts, te);
|
575
629
|
}
|
576
630
|
break;
|
577
|
-
case
|
631
|
+
case 14:
|
578
632
|
{{p = ((te))-1;}
|
579
|
-
callback(
|
633
|
+
callback(id_on_doctype_name, data, encoding, ts, te);
|
580
634
|
}
|
581
635
|
break;
|
582
636
|
}
|
583
637
|
}
|
584
638
|
break;
|
585
|
-
case
|
586
|
-
// line
|
639
|
+
case 23:
|
640
|
+
// line 255 "ext/ragel/base_lexer.rl"
|
587
641
|
{te = p+1;{
|
588
|
-
callback_simple(
|
589
|
-
( this.cs) =
|
642
|
+
callback_simple(id_on_xml_decl_end);
|
643
|
+
( this.cs) = 34;
|
590
644
|
}}
|
591
645
|
break;
|
592
|
-
case
|
593
|
-
// line
|
646
|
+
case 24:
|
647
|
+
// line 148 "ext/ragel/base_lexer.rl"
|
594
648
|
{te = p+1;{
|
595
|
-
callback_simple(
|
649
|
+
callback_simple(id_on_string_squote);
|
596
650
|
|
597
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
651
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 42; _goto_targ = 2; if (true) continue _goto;}
|
598
652
|
}}
|
599
653
|
break;
|
600
|
-
case
|
601
|
-
// line
|
654
|
+
case 25:
|
655
|
+
// line 154 "ext/ragel/base_lexer.rl"
|
602
656
|
{te = p+1;{
|
603
|
-
callback_simple(
|
657
|
+
callback_simple(id_on_string_dquote);
|
604
658
|
|
605
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
659
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 44; _goto_targ = 2; if (true) continue _goto;}
|
606
660
|
}}
|
607
661
|
break;
|
608
|
-
case
|
609
|
-
// line
|
662
|
+
case 26:
|
663
|
+
// line 268 "ext/ragel/base_lexer.rl"
|
610
664
|
{te = p+1;}
|
611
665
|
break;
|
612
|
-
case
|
613
|
-
// line
|
666
|
+
case 27:
|
667
|
+
// line 261 "ext/ragel/base_lexer.rl"
|
614
668
|
{te = p;p--;{
|
615
|
-
callback(
|
669
|
+
callback(id_on_attribute, data, encoding, ts, te);
|
616
670
|
}}
|
617
671
|
break;
|
618
|
-
case
|
619
|
-
// line
|
672
|
+
case 28:
|
673
|
+
// line 268 "ext/ragel/base_lexer.rl"
|
620
674
|
{te = p;p--;}
|
621
675
|
break;
|
622
|
-
case
|
623
|
-
// line
|
676
|
+
case 29:
|
677
|
+
// line 295 "ext/ragel/base_lexer.rl"
|
624
678
|
{te = p+1;{
|
625
|
-
callback(
|
679
|
+
callback(id_on_element_ns, data, encoding, ts, te - 1);
|
626
680
|
}}
|
627
681
|
break;
|
628
|
-
case
|
629
|
-
// line
|
682
|
+
case 30:
|
683
|
+
// line 299 "ext/ragel/base_lexer.rl"
|
630
684
|
{te = p;p--;{
|
631
|
-
callback(
|
632
|
-
( this.cs) =
|
685
|
+
callback(id_on_element_name, data, encoding, ts, te);
|
686
|
+
( this.cs) = 65;
|
633
687
|
}}
|
634
688
|
break;
|
635
|
-
case
|
636
|
-
// line
|
689
|
+
case 31:
|
690
|
+
// line 308 "ext/ragel/base_lexer.rl"
|
637
691
|
{te = p+1;}
|
638
692
|
break;
|
639
|
-
case
|
640
|
-
// line
|
693
|
+
case 32:
|
694
|
+
// line 310 "ext/ragel/base_lexer.rl"
|
641
695
|
{te = p+1;{
|
642
|
-
callback_simple(
|
696
|
+
callback_simple(id_advance_line);
|
643
697
|
}}
|
644
698
|
break;
|
645
|
-
case
|
646
|
-
// line
|
699
|
+
case 33:
|
700
|
+
// line 315 "ext/ragel/base_lexer.rl"
|
647
701
|
{te = p+1;{
|
648
|
-
callback(
|
702
|
+
callback(id_on_attribute_ns, data, encoding, ts, te - 1);
|
649
703
|
}}
|
650
704
|
break;
|
651
|
-
case
|
652
|
-
// line
|
705
|
+
case 34:
|
706
|
+
// line 148 "ext/ragel/base_lexer.rl"
|
653
707
|
{te = p+1;{
|
654
|
-
callback_simple(
|
708
|
+
callback_simple(id_on_string_squote);
|
655
709
|
|
656
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
710
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 42; _goto_targ = 2; if (true) continue _goto;}
|
657
711
|
}}
|
658
712
|
break;
|
659
|
-
case
|
660
|
-
// line
|
713
|
+
case 35:
|
714
|
+
// line 154 "ext/ragel/base_lexer.rl"
|
661
715
|
{te = p+1;{
|
662
|
-
callback_simple(
|
716
|
+
callback_simple(id_on_string_dquote);
|
663
717
|
|
664
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
718
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 44; _goto_targ = 2; if (true) continue _goto;}
|
665
719
|
}}
|
666
720
|
break;
|
667
|
-
case
|
668
|
-
// line
|
721
|
+
case 36:
|
722
|
+
// line 328 "ext/ragel/base_lexer.rl"
|
669
723
|
{te = p+1;{
|
670
|
-
callback_simple(
|
671
|
-
|
724
|
+
callback_simple(id_on_element_open_end);
|
725
|
+
|
726
|
+
if ( inside_html_script_p() )
|
727
|
+
{
|
728
|
+
mark = ts + 1;
|
729
|
+
|
730
|
+
( this.cs) = 71;
|
731
|
+
}
|
732
|
+
else
|
733
|
+
{
|
734
|
+
( this.cs) = 34;
|
735
|
+
}
|
672
736
|
}}
|
673
737
|
break;
|
674
|
-
case
|
675
|
-
// line
|
738
|
+
case 37:
|
739
|
+
// line 344 "ext/ragel/base_lexer.rl"
|
676
740
|
{te = p+1;{
|
677
|
-
callback_simple(
|
678
|
-
( this.cs) =
|
741
|
+
callback_simple(id_on_element_end);
|
742
|
+
( this.cs) = 34;
|
679
743
|
}}
|
680
744
|
break;
|
681
|
-
case
|
682
|
-
// line
|
745
|
+
case 38:
|
746
|
+
// line 319 "ext/ragel/base_lexer.rl"
|
683
747
|
{te = p;p--;{
|
684
|
-
callback(
|
748
|
+
callback(id_on_attribute, data, encoding, ts, te);
|
685
749
|
}}
|
686
750
|
break;
|
687
|
-
case
|
688
|
-
// line
|
751
|
+
case 39:
|
752
|
+
// line 373 "ext/ragel/base_lexer.rl"
|
689
753
|
{te = p+1;{
|
690
|
-
callback(
|
754
|
+
callback(id_on_text, data, encoding, ts, te);
|
691
755
|
|
692
756
|
if ( lines > 0 )
|
693
757
|
{
|
@@ -696,13 +760,13 @@ case 3:
|
|
696
760
|
lines = 0;
|
697
761
|
}
|
698
762
|
|
699
|
-
( this.cs) =
|
763
|
+
( this.cs) = 34;
|
700
764
|
}}
|
701
765
|
break;
|
702
|
-
case
|
703
|
-
// line
|
766
|
+
case 40:
|
767
|
+
// line 387 "ext/ragel/base_lexer.rl"
|
704
768
|
{te = p+1;{
|
705
|
-
callback(
|
769
|
+
callback(id_on_text, data, encoding, ts, mark);
|
706
770
|
|
707
771
|
p = mark - 1;
|
708
772
|
mark = 0;
|
@@ -714,13 +778,13 @@ case 3:
|
|
714
778
|
lines = 0;
|
715
779
|
}
|
716
780
|
|
717
|
-
( this.cs) =
|
781
|
+
( this.cs) = 34;
|
718
782
|
}}
|
719
783
|
break;
|
720
|
-
case
|
721
|
-
// line
|
784
|
+
case 41:
|
785
|
+
// line 373 "ext/ragel/base_lexer.rl"
|
722
786
|
{te = p;p--;{
|
723
|
-
callback(
|
787
|
+
callback(id_on_text, data, encoding, ts, te);
|
724
788
|
|
725
789
|
if ( lines > 0 )
|
726
790
|
{
|
@@ -729,105 +793,136 @@ case 3:
|
|
729
793
|
lines = 0;
|
730
794
|
}
|
731
795
|
|
732
|
-
( this.cs) =
|
796
|
+
( this.cs) = 34;
|
733
797
|
}}
|
734
798
|
break;
|
735
|
-
case
|
736
|
-
// line
|
737
|
-
{
|
799
|
+
case 42:
|
800
|
+
// line 408 "ext/ragel/base_lexer.rl"
|
801
|
+
{te = p+1;{
|
802
|
+
callback(id_on_text, data, encoding, mark, ts);
|
803
|
+
|
804
|
+
mark = 0;
|
805
|
+
|
806
|
+
if ( lines > 0 )
|
807
|
+
{
|
808
|
+
advance_line(lines);
|
809
|
+
|
810
|
+
lines = 0;
|
811
|
+
}
|
812
|
+
|
813
|
+
callback_simple(id_on_element_end);
|
814
|
+
|
815
|
+
( this.cs) = 34;
|
816
|
+
}}
|
738
817
|
break;
|
739
|
-
case
|
740
|
-
// line
|
741
|
-
{
|
818
|
+
case 43:
|
819
|
+
// line 425 "ext/ragel/base_lexer.rl"
|
820
|
+
{te = p+1;}
|
742
821
|
break;
|
743
|
-
case
|
744
|
-
// line
|
822
|
+
case 44:
|
823
|
+
// line 425 "ext/ragel/base_lexer.rl"
|
824
|
+
{te = p;p--;}
|
825
|
+
break;
|
826
|
+
case 45:
|
827
|
+
// line 425 "ext/ragel/base_lexer.rl"
|
828
|
+
{{p = ((te))-1;}}
|
829
|
+
break;
|
830
|
+
case 46:
|
831
|
+
// line 248 "ext/ragel/base_lexer.rl"
|
832
|
+
{( this.act) = 36;}
|
833
|
+
break;
|
834
|
+
case 47:
|
835
|
+
// line 106 "ext/ragel/base_lexer.rl"
|
836
|
+
{( this.act) = 39;}
|
837
|
+
break;
|
838
|
+
case 48:
|
839
|
+
// line 72 "ext/ragel/base_lexer.rl"
|
745
840
|
{te = p+1;{
|
746
|
-
callback(
|
841
|
+
callback(id_on_comment, data, encoding, ts + 4, te - 3);
|
747
842
|
}}
|
748
843
|
break;
|
749
|
-
case
|
750
|
-
// line
|
844
|
+
case 49:
|
845
|
+
// line 88 "ext/ragel/base_lexer.rl"
|
751
846
|
{te = p+1;{
|
752
|
-
callback(
|
847
|
+
callback(id_on_cdata, data, encoding, ts + 9, te - 3);
|
753
848
|
}}
|
754
849
|
break;
|
755
|
-
case
|
756
|
-
// line
|
850
|
+
case 50:
|
851
|
+
// line 283 "ext/ragel/base_lexer.rl"
|
757
852
|
{te = p+1;{
|
758
|
-
callback_simple(
|
853
|
+
callback_simple(id_on_element_start);
|
759
854
|
p--;
|
760
|
-
( this.cs) =
|
855
|
+
( this.cs) = 63;
|
761
856
|
}}
|
762
857
|
break;
|
763
|
-
case
|
764
|
-
// line
|
858
|
+
case 51:
|
859
|
+
// line 289 "ext/ragel/base_lexer.rl"
|
765
860
|
{te = p+1;{
|
766
|
-
callback_simple(
|
861
|
+
callback_simple(id_on_element_end);
|
767
862
|
}}
|
768
863
|
break;
|
769
|
-
case
|
770
|
-
// line
|
864
|
+
case 52:
|
865
|
+
// line 358 "ext/ragel/base_lexer.rl"
|
771
866
|
{te = p+1;{
|
772
867
|
p--;
|
773
|
-
( this.cs) =
|
868
|
+
( this.cs) = 67;
|
774
869
|
}}
|
775
870
|
break;
|
776
|
-
case
|
777
|
-
// line
|
871
|
+
case 53:
|
872
|
+
// line 192 "ext/ragel/base_lexer.rl"
|
778
873
|
{te = p;p--;{
|
779
|
-
callback_simple(
|
780
|
-
( this.cs) =
|
874
|
+
callback_simple(id_on_doctype_start);
|
875
|
+
( this.cs) = 48;
|
781
876
|
}}
|
782
877
|
break;
|
783
|
-
case
|
784
|
-
// line
|
878
|
+
case 54:
|
879
|
+
// line 106 "ext/ragel/base_lexer.rl"
|
785
880
|
{te = p;p--;{
|
786
|
-
callback_simple(
|
787
|
-
callback(
|
881
|
+
callback_simple(id_on_proc_ins_start);
|
882
|
+
callback(id_on_proc_ins_name, data, encoding, ts + 2, te);
|
788
883
|
|
789
884
|
mark = te;
|
790
885
|
|
791
|
-
( this.cs) =
|
886
|
+
( this.cs) = 40;
|
792
887
|
}}
|
793
888
|
break;
|
794
|
-
case
|
795
|
-
// line
|
889
|
+
case 55:
|
890
|
+
// line 358 "ext/ragel/base_lexer.rl"
|
796
891
|
{te = p;p--;{
|
797
892
|
p--;
|
798
|
-
( this.cs) =
|
893
|
+
( this.cs) = 67;
|
799
894
|
}}
|
800
895
|
break;
|
801
|
-
case
|
802
|
-
// line
|
896
|
+
case 56:
|
897
|
+
// line 358 "ext/ragel/base_lexer.rl"
|
803
898
|
{{p = ((te))-1;}{
|
804
899
|
p--;
|
805
|
-
( this.cs) =
|
900
|
+
( this.cs) = 67;
|
806
901
|
}}
|
807
902
|
break;
|
808
|
-
case
|
903
|
+
case 57:
|
809
904
|
// line 1 "NONE"
|
810
905
|
{ switch( ( this.act) ) {
|
811
|
-
case
|
906
|
+
case 36:
|
812
907
|
{{p = ((te))-1;}
|
813
|
-
callback_simple(
|
814
|
-
( this.cs) =
|
908
|
+
callback_simple(id_on_xml_decl_start);
|
909
|
+
( this.cs) = 60;
|
815
910
|
}
|
816
911
|
break;
|
817
|
-
case
|
912
|
+
case 39:
|
818
913
|
{{p = ((te))-1;}
|
819
|
-
callback_simple(
|
820
|
-
callback(
|
914
|
+
callback_simple(id_on_proc_ins_start);
|
915
|
+
callback(id_on_proc_ins_name, data, encoding, ts + 2, te);
|
821
916
|
|
822
917
|
mark = te;
|
823
918
|
|
824
|
-
( this.cs) =
|
919
|
+
( this.cs) = 40;
|
825
920
|
}
|
826
921
|
break;
|
827
922
|
}
|
828
923
|
}
|
829
924
|
break;
|
830
|
-
// line
|
925
|
+
// line 926 "ext/java/org/liboga/xml/Lexer.java"
|
831
926
|
}
|
832
927
|
}
|
833
928
|
}
|
@@ -841,7 +936,7 @@ case 2:
|
|
841
936
|
// line 1 "NONE"
|
842
937
|
{ts = -1;}
|
843
938
|
break;
|
844
|
-
// line
|
939
|
+
// line 940 "ext/java/org/liboga/xml/Lexer.java"
|
845
940
|
}
|
846
941
|
}
|
847
942
|
|
@@ -868,7 +963,7 @@ case 5:
|
|
868
963
|
break; }
|
869
964
|
}
|
870
965
|
|
871
|
-
// line
|
966
|
+
// line 130 "ext/java/org/liboga/xml/Lexer.rl"
|
872
967
|
|
873
968
|
this.lines = lines;
|
874
969
|
|
@@ -927,8 +1022,19 @@ case 5:
|
|
927
1022
|
|
928
1023
|
this.callMethod(context, "advance_line", lines);
|
929
1024
|
}
|
1025
|
+
|
1026
|
+
/**
|
1027
|
+
* Returns true if we're in an HTML script tag. See
|
1028
|
+
* Oga::XML::Lexer#inside_html_script? for more information.
|
1029
|
+
*/
|
1030
|
+
public Boolean inside_html_script_p()
|
1031
|
+
{
|
1032
|
+
ThreadContext context = this.runtime.getCurrentContext();
|
1033
|
+
|
1034
|
+
return this.callMethod(context, "inside_html_script?").isTrue();
|
1035
|
+
}
|
930
1036
|
}
|
931
1037
|
|
932
1038
|
|
933
|
-
// line
|
1039
|
+
// line 208 "ext/java/org/liboga/xml/Lexer.rl"
|
934
1040
|
|