oga 0.2.2-java → 0.2.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/changelog.md +9 -0
- data/ext/c/lexer.c +782 -621
- data/ext/c/lexer.rl +5 -5
- data/ext/java/org/liboga/xml/Lexer.java +265 -231
- data/ext/java/org/liboga/xml/Lexer.rl +3 -4
- data/ext/ragel/base_lexer.rl +23 -14
- data/lib/liboga.jar +0 -0
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/lexer.rb +6 -7
- data/lib/oga/xml/text.rb +2 -2
- metadata +2 -2
data/ext/c/lexer.rl
CHANGED
@@ -19,11 +19,11 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
19
19
|
#define advance_line(amount) \
|
20
20
|
rb_funcall(self, id_advance_line, 1, INT2NUM(amount));
|
21
21
|
|
22
|
-
#define
|
23
|
-
rb_funcall(self,
|
22
|
+
#define literal_html_element_p() \
|
23
|
+
rb_funcall(self, id_literal_html_element_p, 0) == Qtrue
|
24
24
|
|
25
25
|
ID id_advance_line;
|
26
|
-
ID
|
26
|
+
ID id_literal_html_element_p;
|
27
27
|
|
28
28
|
%%machine c_lexer;
|
29
29
|
|
@@ -173,8 +173,8 @@ void Init_liboga_xml_lexer()
|
|
173
173
|
VALUE mXML = rb_const_get(mOga, rb_intern("XML"));
|
174
174
|
VALUE cLexer = rb_define_class_under(mXML, "Lexer", rb_cObject);
|
175
175
|
|
176
|
-
id_advance_line
|
177
|
-
|
176
|
+
id_advance_line = rb_intern("advance_line");
|
177
|
+
id_literal_html_element_p = rb_intern("literal_html_element?");
|
178
178
|
|
179
179
|
rb_define_method(cLexer, "advance_native", oga_xml_lexer_advance, 1);
|
180
180
|
rb_define_method(cLexer, "reset_native", oga_xml_lexer_reset, 0);
|
@@ -43,17 +43,17 @@ public class Lexer extends RubyObject
|
|
43
43
|
private static byte[] init__java_lexer_actions_0()
|
44
44
|
{
|
45
45
|
return new byte [] {
|
46
|
-
0, 1, 0, 1,
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
2, 0,
|
56
|
-
2,
|
46
|
+
0, 1, 0, 1, 3, 1, 5, 1, 6, 1, 7, 1,
|
47
|
+
8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1,
|
48
|
+
14, 1, 15, 1, 18, 1, 19, 1, 20, 1, 21, 1,
|
49
|
+
22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1,
|
50
|
+
28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1,
|
51
|
+
34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1,
|
52
|
+
40, 1, 41, 1, 42, 1, 43, 1, 45, 1, 46, 1,
|
53
|
+
47, 1, 50, 1, 51, 1, 52, 1, 53, 1, 54, 1,
|
54
|
+
55, 1, 56, 1, 57, 1, 58, 1, 59, 2, 0, 1,
|
55
|
+
2, 0, 2, 2, 3, 4, 2, 6, 16, 2, 6, 17,
|
56
|
+
2, 6, 48, 2, 6, 49, 3, 6, 0, 44
|
57
57
|
};
|
58
58
|
}
|
59
59
|
|
@@ -65,11 +65,11 @@ private static short[] init__java_lexer_key_offsets_0()
|
|
65
65
|
return new short [] {
|
66
66
|
0, 0, 4, 5, 6, 7, 9, 11, 13, 15, 17, 19,
|
67
67
|
21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 41,
|
68
|
-
51, 60, 61, 62, 63,
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
51, 60, 61, 62, 63, 74, 76, 84, 93, 102, 103, 104,
|
69
|
+
105, 106, 107, 108, 109, 110, 126, 134, 143, 152, 161, 170,
|
70
|
+
179, 188, 197, 206, 215, 224, 235, 243, 244, 252, 261, 278,
|
71
|
+
287, 288, 289, 300, 311, 312, 313, 315, 317, 320, 322, 324,
|
72
|
+
326, 328, 330, 332, 334
|
73
73
|
};
|
74
74
|
}
|
75
75
|
|
@@ -84,28 +84,30 @@ private static char[] init__java_lexer_trans_keys_0()
|
|
84
84
|
68, 65, 84, 65, 91, 93, 93, 62, 93, 45, 95, 48,
|
85
85
|
57, 65, 90, 97, 122, 45, 58, 62, 95, 48, 57, 65,
|
86
86
|
90, 97, 122, 45, 95, 120, 48, 57, 65, 90, 97, 122,
|
87
|
-
10, 62,
|
88
|
-
|
89
|
-
95, 48, 57, 65, 90, 97, 122, 45, 95,
|
90
|
-
65, 90, 97, 122,
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
48, 57, 65, 90, 97, 122, 45,
|
95
|
-
90, 97, 122, 45,
|
96
|
-
45,
|
97
|
-
48, 57, 65, 90, 97, 122, 45,
|
98
|
-
90, 97, 122, 45,
|
99
|
-
45,
|
100
|
-
48, 57, 65, 90, 97, 122,
|
101
|
-
|
102
|
-
97, 122, 45, 95, 48, 57, 65, 90, 97, 122,
|
103
|
-
95, 48, 57, 65, 90, 97, 122,
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
95, 47, 57, 65, 90, 97, 122,
|
108
|
-
47,
|
87
|
+
10, 62, 60, 33, 45, 47, 63, 95, 48, 57, 65, 90,
|
88
|
+
97, 122, 9, 32, 45, 95, 48, 57, 65, 90, 97, 122,
|
89
|
+
45, 95, 109, 48, 57, 65, 90, 97, 122, 45, 95, 108,
|
90
|
+
48, 57, 65, 90, 97, 122, 63, 62, 39, 39, 34, 34,
|
91
|
+
93, 93, 9, 32, 34, 39, 45, 62, 80, 83, 91, 95,
|
92
|
+
48, 57, 65, 90, 97, 122, 45, 95, 48, 57, 65, 90,
|
93
|
+
97, 122, 45, 85, 95, 48, 57, 65, 90, 97, 122, 45,
|
94
|
+
66, 95, 48, 57, 65, 90, 97, 122, 45, 76, 95, 48,
|
95
|
+
57, 65, 90, 97, 122, 45, 73, 95, 48, 57, 65, 90,
|
96
|
+
97, 122, 45, 67, 95, 48, 57, 65, 90, 97, 122, 45,
|
97
|
+
89, 95, 48, 57, 65, 90, 97, 122, 45, 83, 95, 48,
|
98
|
+
57, 65, 90, 97, 122, 45, 84, 95, 48, 57, 65, 90,
|
99
|
+
97, 122, 45, 69, 95, 48, 57, 65, 90, 97, 122, 45,
|
100
|
+
77, 95, 48, 57, 65, 90, 97, 122, 34, 39, 45, 63,
|
101
|
+
95, 48, 57, 65, 90, 97, 122, 45, 95, 48, 57, 65,
|
102
|
+
90, 97, 122, 62, 45, 95, 48, 57, 65, 90, 97, 122,
|
103
|
+
45, 58, 95, 48, 57, 65, 90, 97, 122, 9, 10, 13,
|
104
|
+
32, 34, 39, 45, 47, 61, 62, 95, 48, 57, 65, 90,
|
105
|
+
97, 122, 45, 58, 95, 48, 57, 65, 90, 97, 122, 60,
|
106
|
+
60, 33, 45, 60, 63, 95, 47, 57, 65, 90, 97, 122,
|
107
|
+
33, 45, 60, 63, 95, 47, 57, 65, 90, 97, 122, 60,
|
108
|
+
60, 47, 60, 60, 115, 60, 99, 116, 60, 114, 60, 105,
|
109
|
+
60, 112, 60, 116, 60, 62, 60, 121, 60, 108, 60, 101,
|
110
|
+
0
|
109
111
|
};
|
110
112
|
}
|
111
113
|
|
@@ -117,11 +119,11 @@ private static byte[] init__java_lexer_single_lengths_0()
|
|
117
119
|
return new byte [] {
|
118
120
|
0, 4, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
|
119
121
|
2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4,
|
120
|
-
3, 1, 1, 1,
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
122
|
+
3, 1, 1, 1, 5, 2, 2, 3, 3, 1, 1, 1,
|
123
|
+
1, 1, 1, 1, 1, 10, 2, 3, 3, 3, 3, 3,
|
124
|
+
3, 3, 3, 3, 3, 5, 2, 1, 2, 3, 11, 3,
|
125
|
+
1, 1, 5, 5, 1, 1, 2, 2, 3, 2, 2, 2,
|
126
|
+
2, 2, 2, 2, 2
|
125
127
|
};
|
126
128
|
}
|
127
129
|
|
@@ -133,11 +135,11 @@ private static byte[] init__java_lexer_range_lengths_0()
|
|
133
135
|
return new byte [] {
|
134
136
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
135
137
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3,
|
136
|
-
3, 0, 0, 0,
|
137
|
-
0,
|
138
|
-
3, 3, 3, 3, 3, 3, 3,
|
139
|
-
|
140
|
-
0
|
138
|
+
3, 0, 0, 0, 3, 0, 3, 3, 3, 0, 0, 0,
|
139
|
+
0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3,
|
140
|
+
3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3,
|
141
|
+
0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
142
|
+
0, 0, 0, 0, 0
|
141
143
|
};
|
142
144
|
}
|
143
145
|
|
@@ -149,11 +151,11 @@ private static short[] init__java_lexer_index_offsets_0()
|
|
149
151
|
return new short [] {
|
150
152
|
0, 0, 5, 7, 9, 11, 14, 17, 20, 23, 26, 29,
|
151
153
|
32, 35, 37, 39, 41, 43, 45, 47, 49, 51, 54, 60,
|
152
|
-
68, 75, 77, 79, 81,
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
154
|
+
68, 75, 77, 79, 81, 90, 93, 99, 106, 113, 115, 117,
|
155
|
+
119, 121, 123, 125, 127, 129, 143, 149, 156, 163, 170, 177,
|
156
|
+
184, 191, 198, 205, 212, 219, 228, 234, 236, 242, 249, 264,
|
157
|
+
271, 273, 275, 284, 293, 295, 297, 300, 303, 307, 310, 313,
|
158
|
+
316, 319, 322, 325, 328
|
157
159
|
};
|
158
160
|
}
|
159
161
|
|
@@ -169,26 +171,28 @@ private static byte[] init__java_lexer_indicies_0()
|
|
169
171
|
0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21,
|
170
172
|
20, 22, 20, 23, 22, 20, 24, 24, 24, 24, 24, 0,
|
171
173
|
24, 25, 26, 24, 24, 24, 24, 0, 27, 27, 28, 27,
|
172
|
-
27, 27, 0, 29, 30, 31, 30, 33, 32,
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
98,
|
190
|
-
|
191
|
-
|
174
|
+
27, 27, 0, 29, 30, 31, 30, 33, 32, 35, 36, 25,
|
175
|
+
37, 36, 36, 36, 36, 34, 14, 14, 38, 27, 27, 27,
|
176
|
+
27, 27, 39, 27, 27, 41, 27, 27, 27, 40, 27, 27,
|
177
|
+
42, 27, 27, 27, 40, 44, 43, 46, 45, 48, 47, 49,
|
178
|
+
47, 51, 50, 52, 50, 54, 53, 55, 53, 56, 56, 57,
|
179
|
+
58, 59, 60, 61, 62, 63, 59, 59, 59, 59, 30, 59,
|
180
|
+
59, 59, 59, 59, 64, 59, 66, 59, 59, 59, 59, 65,
|
181
|
+
59, 67, 59, 59, 59, 59, 65, 59, 68, 59, 59, 59,
|
182
|
+
59, 65, 59, 69, 59, 59, 59, 59, 65, 59, 70, 59,
|
183
|
+
59, 59, 59, 65, 59, 71, 59, 59, 59, 59, 65, 59,
|
184
|
+
72, 59, 59, 59, 59, 65, 59, 73, 59, 59, 59, 59,
|
185
|
+
65, 59, 74, 59, 59, 59, 59, 65, 59, 70, 59, 59,
|
186
|
+
59, 59, 65, 76, 77, 78, 79, 78, 78, 78, 78, 75,
|
187
|
+
78, 78, 78, 78, 78, 80, 82, 81, 83, 83, 83, 83,
|
188
|
+
83, 30, 83, 85, 83, 83, 83, 83, 84, 86, 29, 87,
|
189
|
+
86, 88, 89, 90, 91, 86, 92, 90, 90, 90, 90, 30,
|
190
|
+
90, 94, 90, 90, 90, 90, 93, 96, 95, 98, 95, 99,
|
191
|
+
99, 98, 99, 99, 99, 99, 99, 95, 100, 100, 98, 100,
|
192
|
+
100, 100, 100, 100, 95, 102, 101, 102, 101, 105, 102, 101,
|
193
|
+
102, 106, 101, 102, 107, 108, 101, 102, 109, 101, 102, 110,
|
194
|
+
101, 102, 111, 101, 102, 112, 101, 102, 113, 101, 102, 114,
|
195
|
+
101, 102, 115, 101, 102, 112, 101, 0
|
192
196
|
};
|
193
197
|
}
|
194
198
|
|
@@ -198,16 +202,16 @@ private static final byte _java_lexer_indicies[] = init__java_lexer_indicies_0()
|
|
198
202
|
private static byte[] init__java_lexer_trans_targs_0()
|
199
203
|
{
|
200
204
|
return new byte [] {
|
201
|
-
|
202
|
-
11, 12,
|
203
|
-
23, 22,
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
205
|
+
27, 2, 6, 13, 3, 4, 5, 27, 7, 8, 9, 10,
|
206
|
+
11, 12, 29, 14, 15, 16, 17, 18, 19, 20, 21, 27,
|
207
|
+
23, 22, 27, 30, 31, 58, 0, 58, 27, 28, 27, 1,
|
208
|
+
27, 24, 27, 27, 27, 32, 30, 33, 34, 33, 33, 36,
|
209
|
+
35, 35, 38, 37, 37, 40, 39, 39, 41, 41, 41, 42,
|
210
|
+
41, 43, 48, 41, 41, 41, 44, 45, 46, 47, 42, 49,
|
211
|
+
50, 51, 52, 53, 53, 53, 54, 55, 53, 53, 53, 57,
|
212
|
+
56, 56, 58, 25, 58, 58, 59, 26, 58, 58, 58, 61,
|
213
|
+
63, 60, 62, 60, 60, 65, 66, 64, 64, 67, 68, 69,
|
214
|
+
74, 70, 71, 72, 73, 64, 75, 76
|
211
215
|
};
|
212
216
|
}
|
213
217
|
|
@@ -219,14 +223,14 @@ private static byte[] init__java_lexer_trans_actions_0()
|
|
219
223
|
return new byte [] {
|
220
224
|
101, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0,
|
221
225
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87,
|
222
|
-
0, 0, 91, 123, 0, 59, 0, 69,
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
226
|
+
0, 0, 91, 123, 0, 59, 0, 69, 93, 7, 99, 0,
|
227
|
+
89, 0, 95, 103, 97, 0, 120, 11, 0, 13, 9, 1,
|
228
|
+
15, 17, 1, 19, 21, 1, 23, 25, 33, 31, 29, 117,
|
229
|
+
35, 0, 0, 27, 39, 37, 0, 0, 0, 0, 114, 0,
|
230
|
+
0, 0, 0, 47, 45, 43, 0, 0, 49, 51, 41, 0,
|
231
|
+
55, 53, 57, 0, 65, 63, 0, 0, 67, 71, 61, 1,
|
232
|
+
105, 77, 105, 75, 73, 126, 108, 83, 81, 1, 1, 1,
|
233
|
+
1, 1, 1, 1, 1, 79, 1, 1
|
230
234
|
};
|
231
235
|
}
|
232
236
|
|
@@ -238,11 +242,11 @@ private static byte[] init__java_lexer_to_state_actions_0()
|
|
238
242
|
return new byte [] {
|
239
243
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
240
244
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
241
|
-
0, 0, 0,
|
242
|
-
0,
|
243
|
-
|
244
|
-
3, 0, 0,
|
245
|
-
0
|
245
|
+
0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 3,
|
246
|
+
0, 3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0,
|
247
|
+
0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 3, 0,
|
248
|
+
3, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0,
|
249
|
+
0, 0, 0, 0, 0
|
246
250
|
};
|
247
251
|
}
|
248
252
|
|
@@ -254,11 +258,11 @@ private static byte[] init__java_lexer_from_state_actions_0()
|
|
254
258
|
return new byte [] {
|
255
259
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
256
260
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
257
|
-
0, 0, 0,
|
258
|
-
0,
|
259
|
-
|
260
|
-
5, 0, 0, 5, 0,
|
261
|
-
0
|
261
|
+
0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 0, 5,
|
262
|
+
0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0,
|
263
|
+
0, 0, 0, 0, 0, 5, 0, 0, 5, 0, 5, 0,
|
264
|
+
5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,
|
265
|
+
0, 0, 0, 0, 0
|
262
266
|
};
|
263
267
|
}
|
264
268
|
|
@@ -270,32 +274,32 @@ private static short[] init__java_lexer_eof_trans_0()
|
|
270
274
|
return new short [] {
|
271
275
|
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
272
276
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
273
|
-
1, 0, 0,
|
274
|
-
|
275
|
-
|
276
|
-
0,
|
277
|
-
|
277
|
+
1, 0, 0, 0, 35, 39, 40, 41, 41, 0, 46, 0,
|
278
|
+
50, 0, 53, 0, 56, 0, 65, 66, 66, 66, 66, 66,
|
279
|
+
66, 66, 66, 66, 66, 0, 81, 82, 0, 85, 0, 94,
|
280
|
+
0, 98, 98, 98, 0, 104, 105, 105, 105, 105, 105, 105,
|
281
|
+
105, 105, 105, 105, 105
|
278
282
|
};
|
279
283
|
}
|
280
284
|
|
281
285
|
private static final short _java_lexer_eof_trans[] = init__java_lexer_eof_trans_0();
|
282
286
|
|
283
287
|
|
284
|
-
static final int java_lexer_start =
|
285
|
-
static final int java_lexer_first_final =
|
288
|
+
static final int java_lexer_start = 27;
|
289
|
+
static final int java_lexer_first_final = 27;
|
286
290
|
static final int java_lexer_error = 0;
|
287
291
|
|
288
|
-
static final int java_lexer_en_proc_ins_body =
|
289
|
-
static final int java_lexer_en_string_squote =
|
290
|
-
static final int java_lexer_en_string_dquote =
|
291
|
-
static final int java_lexer_en_doctype_inline =
|
292
|
-
static final int java_lexer_en_doctype =
|
293
|
-
static final int java_lexer_en_xml_decl =
|
294
|
-
static final int java_lexer_en_element_name =
|
295
|
-
static final int java_lexer_en_element_head =
|
296
|
-
static final int java_lexer_en_text =
|
297
|
-
static final int
|
298
|
-
static final int java_lexer_en_main =
|
292
|
+
static final int java_lexer_en_proc_ins_body = 33;
|
293
|
+
static final int java_lexer_en_string_squote = 35;
|
294
|
+
static final int java_lexer_en_string_dquote = 37;
|
295
|
+
static final int java_lexer_en_doctype_inline = 39;
|
296
|
+
static final int java_lexer_en_doctype = 41;
|
297
|
+
static final int java_lexer_en_xml_decl = 53;
|
298
|
+
static final int java_lexer_en_element_name = 56;
|
299
|
+
static final int java_lexer_en_element_head = 58;
|
300
|
+
static final int java_lexer_en_text = 60;
|
301
|
+
static final int java_lexer_en_literal_html_element = 64;
|
302
|
+
static final int java_lexer_en_main = 27;
|
299
303
|
|
300
304
|
|
301
305
|
// line 39 "ext/java/org/liboga/xml/Lexer.rl"
|
@@ -390,7 +394,7 @@ static final int java_lexer_en_main = 34;
|
|
390
394
|
String id_on_xml_decl_start = "on_xml_decl_start";
|
391
395
|
|
392
396
|
|
393
|
-
// line
|
397
|
+
// line 398 "ext/java/org/liboga/xml/Lexer.java"
|
394
398
|
{
|
395
399
|
int _klen;
|
396
400
|
int _trans = 0;
|
@@ -415,11 +419,11 @@ case 1:
|
|
415
419
|
_nacts = (int) _java_lexer_actions[_acts++];
|
416
420
|
while ( _nacts-- > 0 ) {
|
417
421
|
switch ( _java_lexer_actions[_acts++] ) {
|
418
|
-
case
|
422
|
+
case 5:
|
419
423
|
// line 1 "NONE"
|
420
424
|
{ts = p;}
|
421
425
|
break;
|
422
|
-
// line
|
426
|
+
// line 427 "ext/java/org/liboga/xml/Lexer.java"
|
423
427
|
}
|
424
428
|
}
|
425
429
|
|
@@ -490,14 +494,18 @@ case 3:
|
|
490
494
|
}
|
491
495
|
break;
|
492
496
|
case 1:
|
493
|
-
// line
|
497
|
+
// line 385 "ext/ragel/base_lexer.rl"
|
494
498
|
{ mark = p; }
|
495
499
|
break;
|
496
|
-
case
|
500
|
+
case 2:
|
501
|
+
// line 420 "ext/ragel/base_lexer.rl"
|
502
|
+
{ mark = p; }
|
503
|
+
break;
|
504
|
+
case 6:
|
497
505
|
// line 1 "NONE"
|
498
506
|
{te = p+1;}
|
499
507
|
break;
|
500
|
-
case
|
508
|
+
case 7:
|
501
509
|
// line 116 "ext/ragel/base_lexer.rl"
|
502
510
|
{te = p+1;{
|
503
511
|
callback(id_on_text, data, encoding, mark, ts);
|
@@ -505,18 +513,18 @@ case 3:
|
|
505
513
|
|
506
514
|
mark = 0;
|
507
515
|
|
508
|
-
( this.cs) =
|
516
|
+
( this.cs) = 27;
|
509
517
|
}}
|
510
518
|
break;
|
511
|
-
case
|
519
|
+
case 8:
|
512
520
|
// line 125 "ext/ragel/base_lexer.rl"
|
513
521
|
{te = p+1;}
|
514
522
|
break;
|
515
|
-
case
|
523
|
+
case 9:
|
516
524
|
// line 125 "ext/ragel/base_lexer.rl"
|
517
525
|
{te = p;p--;}
|
518
526
|
break;
|
519
|
-
case
|
527
|
+
case 10:
|
520
528
|
// line 163 "ext/ragel/base_lexer.rl"
|
521
529
|
{te = p+1;{
|
522
530
|
callback_simple(id_on_string_squote);
|
@@ -524,7 +532,7 @@ case 3:
|
|
524
532
|
{( this.cs) = ( this.stack)[--( this.top)];_goto_targ = 2; if (true) continue _goto;}
|
525
533
|
}}
|
526
534
|
break;
|
527
|
-
case
|
535
|
+
case 11:
|
528
536
|
// line 137 "ext/ragel/base_lexer.rl"
|
529
537
|
{te = p;p--;{
|
530
538
|
callback(id_on_string_body, data, encoding, ts, te);
|
@@ -537,7 +545,7 @@ case 3:
|
|
537
545
|
}
|
538
546
|
}}
|
539
547
|
break;
|
540
|
-
case
|
548
|
+
case 12:
|
541
549
|
// line 173 "ext/ragel/base_lexer.rl"
|
542
550
|
{te = p+1;{
|
543
551
|
callback_simple(id_on_string_dquote);
|
@@ -545,7 +553,7 @@ case 3:
|
|
545
553
|
{( this.cs) = ( this.stack)[--( this.top)];_goto_targ = 2; if (true) continue _goto;}
|
546
554
|
}}
|
547
555
|
break;
|
548
|
-
case
|
556
|
+
case 13:
|
549
557
|
// line 137 "ext/ragel/base_lexer.rl"
|
550
558
|
{te = p;p--;{
|
551
559
|
callback(id_on_string_body, data, encoding, ts, te);
|
@@ -558,11 +566,11 @@ case 3:
|
|
558
566
|
}
|
559
567
|
}}
|
560
568
|
break;
|
561
|
-
case
|
569
|
+
case 14:
|
562
570
|
// line 210 "ext/ragel/base_lexer.rl"
|
563
|
-
{te = p+1;{ ( this.cs) =
|
571
|
+
{te = p+1;{ ( this.cs) = 41; }}
|
564
572
|
break;
|
565
|
-
case
|
573
|
+
case 15:
|
566
574
|
// line 199 "ext/ragel/base_lexer.rl"
|
567
575
|
{te = p;p--;{
|
568
576
|
callback(id_on_doctype_inline, data, encoding, ts, te);
|
@@ -575,52 +583,52 @@ case 3:
|
|
575
583
|
}
|
576
584
|
}}
|
577
585
|
break;
|
578
|
-
case
|
586
|
+
case 16:
|
579
587
|
// line 216 "ext/ragel/base_lexer.rl"
|
580
588
|
{( this.act) = 9;}
|
581
589
|
break;
|
582
|
-
case
|
590
|
+
case 17:
|
583
591
|
// line 231 "ext/ragel/base_lexer.rl"
|
584
592
|
{( this.act) = 14;}
|
585
593
|
break;
|
586
|
-
case
|
594
|
+
case 18:
|
587
595
|
// line 221 "ext/ragel/base_lexer.rl"
|
588
|
-
{te = p+1;{ ( this.cs) =
|
596
|
+
{te = p+1;{ ( this.cs) = 39; }}
|
589
597
|
break;
|
590
|
-
case
|
598
|
+
case 19:
|
591
599
|
// line 148 "ext/ragel/base_lexer.rl"
|
592
600
|
{te = p+1;{
|
593
601
|
callback_simple(id_on_string_squote);
|
594
602
|
|
595
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
603
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 35; _goto_targ = 2; if (true) continue _goto;}
|
596
604
|
}}
|
597
605
|
break;
|
598
|
-
case
|
606
|
+
case 20:
|
599
607
|
// line 154 "ext/ragel/base_lexer.rl"
|
600
608
|
{te = p+1;{
|
601
609
|
callback_simple(id_on_string_dquote);
|
602
610
|
|
603
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
611
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 37; _goto_targ = 2; if (true) continue _goto;}
|
604
612
|
}}
|
605
613
|
break;
|
606
|
-
case
|
614
|
+
case 21:
|
607
615
|
// line 229 "ext/ragel/base_lexer.rl"
|
608
616
|
{te = p+1;}
|
609
617
|
break;
|
610
|
-
case
|
618
|
+
case 22:
|
611
619
|
// line 235 "ext/ragel/base_lexer.rl"
|
612
620
|
{te = p+1;{
|
613
621
|
callback_simple(id_on_doctype_end);
|
614
|
-
( this.cs) =
|
622
|
+
( this.cs) = 27;
|
615
623
|
}}
|
616
624
|
break;
|
617
|
-
case
|
625
|
+
case 23:
|
618
626
|
// line 231 "ext/ragel/base_lexer.rl"
|
619
627
|
{te = p;p--;{
|
620
628
|
callback(id_on_doctype_name, data, encoding, ts, te);
|
621
629
|
}}
|
622
630
|
break;
|
623
|
-
case
|
631
|
+
case 24:
|
624
632
|
// line 1 "NONE"
|
625
633
|
{ switch( ( this.act) ) {
|
626
634
|
case 9:
|
@@ -636,120 +644,118 @@ case 3:
|
|
636
644
|
}
|
637
645
|
}
|
638
646
|
break;
|
639
|
-
case
|
647
|
+
case 25:
|
640
648
|
// line 255 "ext/ragel/base_lexer.rl"
|
641
649
|
{te = p+1;{
|
642
650
|
callback_simple(id_on_xml_decl_end);
|
643
|
-
( this.cs) =
|
651
|
+
( this.cs) = 27;
|
644
652
|
}}
|
645
653
|
break;
|
646
|
-
case
|
654
|
+
case 26:
|
647
655
|
// line 148 "ext/ragel/base_lexer.rl"
|
648
656
|
{te = p+1;{
|
649
657
|
callback_simple(id_on_string_squote);
|
650
658
|
|
651
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
659
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 35; _goto_targ = 2; if (true) continue _goto;}
|
652
660
|
}}
|
653
661
|
break;
|
654
|
-
case
|
662
|
+
case 27:
|
655
663
|
// line 154 "ext/ragel/base_lexer.rl"
|
656
664
|
{te = p+1;{
|
657
665
|
callback_simple(id_on_string_dquote);
|
658
666
|
|
659
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
667
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 37; _goto_targ = 2; if (true) continue _goto;}
|
660
668
|
}}
|
661
669
|
break;
|
662
|
-
case
|
670
|
+
case 28:
|
663
671
|
// line 268 "ext/ragel/base_lexer.rl"
|
664
672
|
{te = p+1;}
|
665
673
|
break;
|
666
|
-
case
|
674
|
+
case 29:
|
667
675
|
// line 261 "ext/ragel/base_lexer.rl"
|
668
676
|
{te = p;p--;{
|
669
677
|
callback(id_on_attribute, data, encoding, ts, te);
|
670
678
|
}}
|
671
679
|
break;
|
672
|
-
case
|
680
|
+
case 30:
|
673
681
|
// line 268 "ext/ragel/base_lexer.rl"
|
674
682
|
{te = p;p--;}
|
675
683
|
break;
|
676
|
-
case
|
684
|
+
case 31:
|
677
685
|
// line 295 "ext/ragel/base_lexer.rl"
|
678
686
|
{te = p+1;{
|
679
687
|
callback(id_on_element_ns, data, encoding, ts, te - 1);
|
680
688
|
}}
|
681
689
|
break;
|
682
|
-
case
|
690
|
+
case 32:
|
683
691
|
// line 299 "ext/ragel/base_lexer.rl"
|
684
692
|
{te = p;p--;{
|
685
693
|
callback(id_on_element_name, data, encoding, ts, te);
|
686
|
-
( this.cs) =
|
694
|
+
( this.cs) = 58;
|
687
695
|
}}
|
688
696
|
break;
|
689
|
-
case
|
697
|
+
case 33:
|
690
698
|
// line 308 "ext/ragel/base_lexer.rl"
|
691
699
|
{te = p+1;}
|
692
700
|
break;
|
693
|
-
case
|
701
|
+
case 34:
|
694
702
|
// line 310 "ext/ragel/base_lexer.rl"
|
695
703
|
{te = p+1;{
|
696
704
|
callback_simple(id_advance_line);
|
697
705
|
}}
|
698
706
|
break;
|
699
|
-
case
|
707
|
+
case 35:
|
700
708
|
// line 315 "ext/ragel/base_lexer.rl"
|
701
709
|
{te = p+1;{
|
702
710
|
callback(id_on_attribute_ns, data, encoding, ts, te - 1);
|
703
711
|
}}
|
704
712
|
break;
|
705
|
-
case
|
713
|
+
case 36:
|
706
714
|
// line 148 "ext/ragel/base_lexer.rl"
|
707
715
|
{te = p+1;{
|
708
716
|
callback_simple(id_on_string_squote);
|
709
717
|
|
710
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
718
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 35; _goto_targ = 2; if (true) continue _goto;}
|
711
719
|
}}
|
712
720
|
break;
|
713
|
-
case
|
721
|
+
case 37:
|
714
722
|
// line 154 "ext/ragel/base_lexer.rl"
|
715
723
|
{te = p+1;{
|
716
724
|
callback_simple(id_on_string_dquote);
|
717
725
|
|
718
|
-
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) =
|
726
|
+
{( this.stack)[( this.top)++] = ( this.cs); ( this.cs) = 37; _goto_targ = 2; if (true) continue _goto;}
|
719
727
|
}}
|
720
728
|
break;
|
721
|
-
case
|
729
|
+
case 38:
|
722
730
|
// line 328 "ext/ragel/base_lexer.rl"
|
723
731
|
{te = p+1;{
|
724
732
|
callback_simple(id_on_element_open_end);
|
725
733
|
|
726
|
-
if (
|
734
|
+
if ( literal_html_element_p() )
|
727
735
|
{
|
728
|
-
|
729
|
-
|
730
|
-
( this.cs) = 71;
|
736
|
+
( this.cs) = 64;
|
731
737
|
}
|
732
738
|
else
|
733
739
|
{
|
734
|
-
( this.cs) =
|
740
|
+
( this.cs) = 27;
|
735
741
|
}
|
736
742
|
}}
|
737
743
|
break;
|
738
|
-
case
|
739
|
-
// line
|
744
|
+
case 39:
|
745
|
+
// line 342 "ext/ragel/base_lexer.rl"
|
740
746
|
{te = p+1;{
|
741
747
|
callback_simple(id_on_element_end);
|
742
|
-
( this.cs) =
|
748
|
+
( this.cs) = 27;
|
743
749
|
}}
|
744
750
|
break;
|
745
|
-
case
|
751
|
+
case 40:
|
746
752
|
// line 319 "ext/ragel/base_lexer.rl"
|
747
753
|
{te = p;p--;{
|
748
754
|
callback(id_on_attribute, data, encoding, ts, te);
|
749
755
|
}}
|
750
756
|
break;
|
751
|
-
case
|
752
|
-
// line
|
757
|
+
case 41:
|
758
|
+
// line 371 "ext/ragel/base_lexer.rl"
|
753
759
|
{te = p+1;{
|
754
760
|
callback(id_on_text, data, encoding, ts, te);
|
755
761
|
|
@@ -760,11 +766,11 @@ case 3:
|
|
760
766
|
lines = 0;
|
761
767
|
}
|
762
768
|
|
763
|
-
( this.cs) =
|
769
|
+
( this.cs) = 27;
|
764
770
|
}}
|
765
771
|
break;
|
766
|
-
case
|
767
|
-
// line
|
772
|
+
case 42:
|
773
|
+
// line 385 "ext/ragel/base_lexer.rl"
|
768
774
|
{te = p+1;{
|
769
775
|
callback(id_on_text, data, encoding, ts, mark);
|
770
776
|
|
@@ -778,11 +784,11 @@ case 3:
|
|
778
784
|
lines = 0;
|
779
785
|
}
|
780
786
|
|
781
|
-
( this.cs) =
|
787
|
+
( this.cs) = 27;
|
782
788
|
}}
|
783
789
|
break;
|
784
|
-
case
|
785
|
-
// line
|
790
|
+
case 43:
|
791
|
+
// line 371 "ext/ragel/base_lexer.rl"
|
786
792
|
{te = p;p--;{
|
787
793
|
callback(id_on_text, data, encoding, ts, te);
|
788
794
|
|
@@ -793,14 +799,19 @@ case 3:
|
|
793
799
|
lines = 0;
|
794
800
|
}
|
795
801
|
|
796
|
-
( this.cs) =
|
802
|
+
( this.cs) = 27;
|
797
803
|
}}
|
798
804
|
break;
|
799
|
-
case
|
800
|
-
// line
|
805
|
+
case 44:
|
806
|
+
// line 409 "ext/ragel/base_lexer.rl"
|
807
|
+
{( this.act) = 33;}
|
808
|
+
break;
|
809
|
+
case 45:
|
810
|
+
// line 420 "ext/ragel/base_lexer.rl"
|
801
811
|
{te = p+1;{
|
802
|
-
callback(id_on_text, data, encoding,
|
812
|
+
callback(id_on_text, data, encoding, ts, mark);
|
803
813
|
|
814
|
+
p = mark - 1;
|
804
815
|
mark = 0;
|
805
816
|
|
806
817
|
if ( lines > 0 )
|
@@ -810,72 +821,92 @@ case 3:
|
|
810
821
|
lines = 0;
|
811
822
|
}
|
812
823
|
|
813
|
-
|
824
|
+
( this.cs) = 27;
|
825
|
+
}}
|
826
|
+
break;
|
827
|
+
case 46:
|
828
|
+
// line 409 "ext/ragel/base_lexer.rl"
|
829
|
+
{te = p;p--;{
|
830
|
+
callback(id_on_text, data, encoding, ts, te);
|
814
831
|
|
815
|
-
(
|
832
|
+
if ( lines > 0 )
|
833
|
+
{
|
834
|
+
advance_line(lines);
|
835
|
+
|
836
|
+
lines = 0;
|
837
|
+
}
|
816
838
|
}}
|
817
839
|
break;
|
818
|
-
case
|
819
|
-
// line
|
820
|
-
{
|
840
|
+
case 47:
|
841
|
+
// line 1 "NONE"
|
842
|
+
{ switch( ( this.act) ) {
|
843
|
+
case 0:
|
844
|
+
{{( this.cs) = 0; _goto_targ = 2; if (true) continue _goto;}}
|
821
845
|
break;
|
822
|
-
case
|
823
|
-
|
824
|
-
|
846
|
+
case 33:
|
847
|
+
{{p = ((te))-1;}
|
848
|
+
callback(id_on_text, data, encoding, ts, te);
|
849
|
+
|
850
|
+
if ( lines > 0 )
|
851
|
+
{
|
852
|
+
advance_line(lines);
|
853
|
+
|
854
|
+
lines = 0;
|
855
|
+
}
|
856
|
+
}
|
825
857
|
break;
|
826
|
-
|
827
|
-
|
828
|
-
{{p = ((te))-1;}}
|
858
|
+
}
|
859
|
+
}
|
829
860
|
break;
|
830
|
-
case
|
861
|
+
case 48:
|
831
862
|
// line 248 "ext/ragel/base_lexer.rl"
|
832
863
|
{( this.act) = 36;}
|
833
864
|
break;
|
834
|
-
case
|
865
|
+
case 49:
|
835
866
|
// line 106 "ext/ragel/base_lexer.rl"
|
836
867
|
{( this.act) = 39;}
|
837
868
|
break;
|
838
|
-
case
|
869
|
+
case 50:
|
839
870
|
// line 72 "ext/ragel/base_lexer.rl"
|
840
871
|
{te = p+1;{
|
841
872
|
callback(id_on_comment, data, encoding, ts + 4, te - 3);
|
842
873
|
}}
|
843
874
|
break;
|
844
|
-
case
|
875
|
+
case 51:
|
845
876
|
// line 88 "ext/ragel/base_lexer.rl"
|
846
877
|
{te = p+1;{
|
847
878
|
callback(id_on_cdata, data, encoding, ts + 9, te - 3);
|
848
879
|
}}
|
849
880
|
break;
|
850
|
-
case
|
881
|
+
case 52:
|
851
882
|
// line 283 "ext/ragel/base_lexer.rl"
|
852
883
|
{te = p+1;{
|
853
884
|
callback_simple(id_on_element_start);
|
854
885
|
p--;
|
855
|
-
( this.cs) =
|
886
|
+
( this.cs) = 56;
|
856
887
|
}}
|
857
888
|
break;
|
858
|
-
case
|
889
|
+
case 53:
|
859
890
|
// line 289 "ext/ragel/base_lexer.rl"
|
860
891
|
{te = p+1;{
|
861
892
|
callback_simple(id_on_element_end);
|
862
893
|
}}
|
863
894
|
break;
|
864
|
-
case
|
865
|
-
// line
|
895
|
+
case 54:
|
896
|
+
// line 356 "ext/ragel/base_lexer.rl"
|
866
897
|
{te = p+1;{
|
867
898
|
p--;
|
868
|
-
( this.cs) =
|
899
|
+
( this.cs) = 60;
|
869
900
|
}}
|
870
901
|
break;
|
871
|
-
case
|
902
|
+
case 55:
|
872
903
|
// line 192 "ext/ragel/base_lexer.rl"
|
873
904
|
{te = p;p--;{
|
874
905
|
callback_simple(id_on_doctype_start);
|
875
|
-
( this.cs) =
|
906
|
+
( this.cs) = 41;
|
876
907
|
}}
|
877
908
|
break;
|
878
|
-
case
|
909
|
+
case 56:
|
879
910
|
// line 106 "ext/ragel/base_lexer.rl"
|
880
911
|
{te = p;p--;{
|
881
912
|
callback_simple(id_on_proc_ins_start);
|
@@ -883,30 +914,30 @@ case 3:
|
|
883
914
|
|
884
915
|
mark = te;
|
885
916
|
|
886
|
-
( this.cs) =
|
917
|
+
( this.cs) = 33;
|
887
918
|
}}
|
888
919
|
break;
|
889
|
-
case
|
890
|
-
// line
|
920
|
+
case 57:
|
921
|
+
// line 356 "ext/ragel/base_lexer.rl"
|
891
922
|
{te = p;p--;{
|
892
923
|
p--;
|
893
|
-
( this.cs) =
|
924
|
+
( this.cs) = 60;
|
894
925
|
}}
|
895
926
|
break;
|
896
|
-
case
|
897
|
-
// line
|
927
|
+
case 58:
|
928
|
+
// line 356 "ext/ragel/base_lexer.rl"
|
898
929
|
{{p = ((te))-1;}{
|
899
930
|
p--;
|
900
|
-
( this.cs) =
|
931
|
+
( this.cs) = 60;
|
901
932
|
}}
|
902
933
|
break;
|
903
|
-
case
|
934
|
+
case 59:
|
904
935
|
// line 1 "NONE"
|
905
936
|
{ switch( ( this.act) ) {
|
906
937
|
case 36:
|
907
938
|
{{p = ((te))-1;}
|
908
939
|
callback_simple(id_on_xml_decl_start);
|
909
|
-
( this.cs) =
|
940
|
+
( this.cs) = 53;
|
910
941
|
}
|
911
942
|
break;
|
912
943
|
case 39:
|
@@ -916,13 +947,13 @@ case 3:
|
|
916
947
|
|
917
948
|
mark = te;
|
918
949
|
|
919
|
-
( this.cs) =
|
950
|
+
( this.cs) = 33;
|
920
951
|
}
|
921
952
|
break;
|
922
953
|
}
|
923
954
|
}
|
924
955
|
break;
|
925
|
-
// line
|
956
|
+
// line 957 "ext/java/org/liboga/xml/Lexer.java"
|
926
957
|
}
|
927
958
|
}
|
928
959
|
}
|
@@ -932,11 +963,15 @@ case 2:
|
|
932
963
|
_nacts = (int) _java_lexer_actions[_acts++];
|
933
964
|
while ( _nacts-- > 0 ) {
|
934
965
|
switch ( _java_lexer_actions[_acts++] ) {
|
935
|
-
case
|
966
|
+
case 3:
|
936
967
|
// line 1 "NONE"
|
937
968
|
{ts = -1;}
|
938
969
|
break;
|
939
|
-
|
970
|
+
case 4:
|
971
|
+
// line 1 "NONE"
|
972
|
+
{( this.act) = 0;}
|
973
|
+
break;
|
974
|
+
// line 975 "ext/java/org/liboga/xml/Lexer.java"
|
940
975
|
}
|
941
976
|
}
|
942
977
|
|
@@ -1024,17 +1059,16 @@ case 5:
|
|
1024
1059
|
}
|
1025
1060
|
|
1026
1061
|
/**
|
1027
|
-
*
|
1028
|
-
* Oga::XML::Lexer#inside_html_script? for more information.
|
1062
|
+
* See * Oga::XML::Lexer#literal_html_element? for more information.
|
1029
1063
|
*/
|
1030
|
-
public Boolean
|
1064
|
+
public Boolean literal_html_element_p()
|
1031
1065
|
{
|
1032
1066
|
ThreadContext context = this.runtime.getCurrentContext();
|
1033
1067
|
|
1034
|
-
return this.callMethod(context, "
|
1068
|
+
return this.callMethod(context, "literal_html_element?").isTrue();
|
1035
1069
|
}
|
1036
1070
|
}
|
1037
1071
|
|
1038
1072
|
|
1039
|
-
// line
|
1073
|
+
// line 207 "ext/java/org/liboga/xml/Lexer.rl"
|
1040
1074
|
|