trenni 1.7.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +7 -3
  4. data/Gemfile +4 -0
  5. data/README.md +72 -10
  6. data/Rakefile +85 -0
  7. data/benchmark/call_vs_yield.rb +51 -0
  8. data/benchmark/interpolation_vs_concat.rb +29 -0
  9. data/benchmark/io_vs_string.rb +14 -4
  10. data/entities.json +2233 -0
  11. data/ext/trenni/extconf.rb +13 -0
  12. data/ext/trenni/markup.c +1981 -0
  13. data/ext/trenni/markup.h +6 -0
  14. data/ext/trenni/markup.rl +223 -0
  15. data/ext/trenni/template.c +1113 -0
  16. data/ext/trenni/template.h +6 -0
  17. data/ext/trenni/template.rl +77 -0
  18. data/ext/trenni/trenni.c +64 -0
  19. data/ext/trenni/trenni.h +28 -0
  20. data/lib/trenni.rb +1 -0
  21. data/lib/trenni/buffer.rb +13 -2
  22. data/lib/trenni/builder.rb +54 -47
  23. data/lib/trenni/entities.rb +2154 -0
  24. data/lib/trenni/entities.trenni +34 -0
  25. data/lib/trenni/fallback/markup.rb +1648 -0
  26. data/lib/trenni/fallback/markup.rl +236 -0
  27. data/lib/trenni/fallback/template.rb +843 -0
  28. data/lib/trenni/fallback/template.rl +97 -0
  29. data/lib/trenni/markup.rb +76 -0
  30. data/lib/trenni/native.rb +28 -0
  31. data/lib/trenni/parse_delegate.rb +34 -0
  32. data/lib/trenni/{scanner.rb → parse_error.rb} +9 -54
  33. data/lib/trenni/parsers.rb +12 -0
  34. data/lib/trenni/substitutions.rb +45 -0
  35. data/lib/trenni/template.rb +52 -135
  36. data/lib/trenni/version.rb +1 -1
  37. data/parsers/trenni/entities.rl +11 -0
  38. data/parsers/trenni/markup.rl +43 -0
  39. data/parsers/trenni/template.rl +60 -0
  40. data/spec/trenni/builder_spec.rb +37 -62
  41. data/spec/trenni/corpus/large.rb +4605 -0
  42. data/spec/trenni/corpus/large.xhtml +726 -0
  43. data/spec/trenni/markup_parser_spec.rb +233 -0
  44. data/spec/trenni/markup_spec.rb +48 -0
  45. data/spec/trenni/parsers_performance_spec.rb +44 -0
  46. data/spec/trenni/template_error_spec.rb +36 -0
  47. data/spec/trenni/template_performance_spec.rb +102 -0
  48. data/spec/trenni/template_spec.rb +90 -64
  49. data/spec/trenni/template_spec/basic.trenni +1 -0
  50. data/spec/trenni/template_spec/capture.trenni +2 -2
  51. data/spec/trenni/template_spec/error.trenni +4 -0
  52. data/trenni.gemspec +9 -6
  53. metadata +57 -15
  54. data/lib/trenni/parser.rb +0 -153
  55. data/spec/trenni/parser_spec.rb +0 -144
@@ -0,0 +1,6 @@
1
+
2
+ #pragma once
3
+
4
+ #include "trenni.h"
5
+
6
+ VALUE Trenni_Native_parse_markup(VALUE self, VALUE buffer, VALUE delegate, VALUE entities);
@@ -0,0 +1,223 @@
1
+
2
+ #include "markup.h"
3
+
4
+ #include <ruby/encoding.h>
5
+
6
+ %%{
7
+ machine Trenni_markup_parser;
8
+
9
+ # Track the location of an identifier (tag name, attribute name, etc)
10
+ action identifier_begin {
11
+ identifier.begin = p;
12
+ }
13
+
14
+ action identifier_end {
15
+ identifier.end = p;
16
+ }
17
+
18
+ action pcdata_begin {
19
+ pcdata = Qnil;
20
+ }
21
+
22
+ action pcdata_end {
23
+ }
24
+
25
+ action characters_begin {
26
+ characters.begin = p;
27
+ }
28
+
29
+ action characters_end {
30
+ characters.end = p;
31
+
32
+ Trenni_append_token(&pcdata, encoding, characters);
33
+ }
34
+
35
+ action entity_error {
36
+ Trenni_raise_error("could not parse entity", buffer, p-s);
37
+ }
38
+
39
+ action entity_begin {
40
+ entity.begin = p;
41
+ }
42
+
43
+ action entity_name {
44
+ entity.end = p;
45
+
46
+ Trenni_append_string(&pcdata, encoding,
47
+ rb_funcall(entities, rb_intern("[]"), 1, Trenni_token(entity, encoding))
48
+ );
49
+ }
50
+
51
+ action entity_hex {
52
+ entity.end = p;
53
+
54
+ codepoint = strtoul(entity.begin, (char **)&entity.end, 16);
55
+
56
+ Trenni_append_codepoint(&pcdata, encoding, codepoint);
57
+ }
58
+
59
+ action entity_number {
60
+ entity.end = p;
61
+
62
+ codepoint = strtoul(entity.begin, (char **)&entity.end, 10);
63
+
64
+ Trenni_append_codepoint(&pcdata, encoding, codepoint);
65
+ }
66
+
67
+ action doctype_begin {
68
+ doctype.begin = p;
69
+ }
70
+
71
+ action doctype_end {
72
+ doctype.end = p;
73
+
74
+ rb_funcall(delegate, id_doctype, 1, Trenni_token(doctype, encoding));
75
+ }
76
+
77
+ action doctype_error {
78
+ Trenni_raise_error("could not parse doctype", buffer, p-s);
79
+ }
80
+
81
+ action comment_begin {
82
+ comment.begin = p;
83
+ }
84
+
85
+ action comment_end {
86
+ comment.end = p;
87
+
88
+ rb_funcall(delegate, id_comment, 1, Trenni_token(comment, encoding));
89
+ }
90
+
91
+ action comment_error {
92
+ Trenni_raise_error("could not parse comment", buffer, p-s);
93
+ }
94
+
95
+ action instruction_begin {
96
+ instruction.begin = p;
97
+ }
98
+
99
+ action instruction_text_begin {
100
+ }
101
+
102
+ action instruction_text_end {
103
+ }
104
+
105
+ action instruction_end {
106
+ instruction.end = p;
107
+
108
+ rb_funcall(delegate, id_instruction, 1, Trenni_token(instruction, encoding));
109
+ }
110
+
111
+ action instruction_error {
112
+ Trenni_raise_error("could not parse instruction", buffer, p-s);
113
+ }
114
+
115
+ action tag_name {
116
+ // Reset self-closing state - we don't know yet.
117
+ self_closing = 0;
118
+
119
+ rb_funcall(delegate, id_open_tag_begin, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
120
+ }
121
+
122
+ action tag_opening_begin {
123
+ }
124
+
125
+ action tag_self_closing {
126
+ self_closing = 1;
127
+ }
128
+
129
+ action attribute_begin {
130
+ has_value = 0;
131
+ }
132
+
133
+ action attribute_value {
134
+ has_value = 1;
135
+ }
136
+
137
+ action attribute_empty {
138
+ has_value = 2;
139
+ }
140
+
141
+ action attribute {
142
+ if (has_value == 1) {
143
+ rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
144
+ } else if (has_value == 2) {
145
+ rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), empty_string);
146
+ } else {
147
+ rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), Qtrue);
148
+ }
149
+ }
150
+
151
+ action tag_opening_end {
152
+ rb_funcall(delegate, id_open_tag_end, 1, self_closing == 1 ? Qtrue : Qfalse);
153
+ }
154
+
155
+ action tag_closing_begin {
156
+ }
157
+
158
+ action tag_closing_end {
159
+ rb_funcall(delegate, id_close_tag, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
160
+ }
161
+
162
+ action tag_error {
163
+ Trenni_raise_error("could not parse tag", buffer, p-s);
164
+ }
165
+
166
+ action cdata_begin {
167
+ cdata.begin = p;
168
+ }
169
+
170
+ action cdata_end {
171
+ cdata.end = p;
172
+
173
+ rb_funcall(delegate, id_cdata, 1, Trenni_token(cdata, encoding));
174
+ }
175
+
176
+ action cdata_error {
177
+ Trenni_raise_error("could not parse cdata", buffer, p-s);
178
+ }
179
+
180
+ action text_begin {
181
+
182
+ }
183
+
184
+ action text_end {
185
+ // Entities are handled separately:
186
+ rb_funcall(delegate, id_text, 1, pcdata);
187
+ }
188
+
189
+ include markup "trenni/markup.rl";
190
+
191
+ write data;
192
+ }%%
193
+
194
+ VALUE Trenni_Native_parse_markup(VALUE self, VALUE buffer, VALUE delegate, VALUE entities) {
195
+ VALUE string = rb_funcall(buffer, id_read, 0);
196
+
197
+ rb_encoding *encoding = rb_enc_get(string);
198
+
199
+ VALUE pcdata = Qnil;
200
+
201
+ VALUE empty_string = rb_obj_freeze(rb_enc_str_new("", 0, encoding));
202
+
203
+ const char *s, *p, *pe, *eof;
204
+ unsigned long cs, top = 0, stack[2] = {0};
205
+ unsigned long codepoint = 0;
206
+
207
+ Token identifier = {0}, cdata = {0}, characters = {0}, entity = {0}, doctype = {0}, comment = {0}, instruction = {0};
208
+ unsigned self_closing = 0, has_value = 0;
209
+
210
+ s = p = RSTRING_PTR(string);
211
+ eof = pe = p + RSTRING_LEN(string);
212
+
213
+ %%{
214
+ write init;
215
+ write exec;
216
+ }%%
217
+
218
+ if (p != eof) {
219
+ Trenni_raise_error("could not parse all input", buffer, p-s);
220
+ }
221
+
222
+ return Qnil;
223
+ }
@@ -0,0 +1,1113 @@
1
+
2
+ #line 1 "template.rl"
3
+
4
+ #include "template.h"
5
+
6
+
7
+ #line 8 "template.c"
8
+ static const int Trenni_template_parser_start = 43;
9
+ static const int Trenni_template_parser_first_final = 43;
10
+ static const int Trenni_template_parser_error = 0;
11
+
12
+ static const int Trenni_template_parser_en_parse_nested_expression = 21;
13
+ static const int Trenni_template_parser_en_parse_expression = 32;
14
+ static const int Trenni_template_parser_en_main = 43;
15
+
16
+
17
+ #line 50 "template.rl"
18
+
19
+
20
+ VALUE Trenni_Native_parse_template(VALUE self, VALUE buffer, VALUE delegate) {
21
+ VALUE string = rb_funcall(buffer, id_read, 0);
22
+
23
+ rb_encoding *encoding = rb_enc_get(string);
24
+
25
+ VALUE newline = rb_obj_freeze(rb_enc_str_new("\n", 1, encoding));
26
+
27
+ const char *s, *p, *pe, *eof, *ts, *te;
28
+ unsigned long cs, act, top = 0, stack[32] = {0};
29
+
30
+ Token expression = {0}, instruction = {0};
31
+
32
+ s = p = RSTRING_PTR(string);
33
+ eof = pe = p + RSTRING_LEN(string);
34
+
35
+
36
+ #line 37 "template.c"
37
+ {
38
+ cs = Trenni_template_parser_start;
39
+ top = 0;
40
+ ts = 0;
41
+ te = 0;
42
+ act = 0;
43
+ }
44
+
45
+ #line 46 "template.c"
46
+ {
47
+ if ( p == pe )
48
+ goto _test_eof;
49
+ goto _resume;
50
+
51
+ _again:
52
+ switch ( cs ) {
53
+ case 43: goto st43;
54
+ case 44: goto st44;
55
+ case 45: goto st45;
56
+ case 1: goto st1;
57
+ case 2: goto st2;
58
+ case 3: goto st3;
59
+ case 4: goto st4;
60
+ case 5: goto st5;
61
+ case 46: goto st46;
62
+ case 6: goto st6;
63
+ case 7: goto st7;
64
+ case 8: goto st8;
65
+ case 9: goto st9;
66
+ case 10: goto st10;
67
+ case 11: goto st11;
68
+ case 47: goto st47;
69
+ case 12: goto st12;
70
+ case 48: goto st48;
71
+ case 13: goto st13;
72
+ case 14: goto st14;
73
+ case 15: goto st15;
74
+ case 0: goto st0;
75
+ case 16: goto st16;
76
+ case 17: goto st17;
77
+ case 18: goto st18;
78
+ case 19: goto st19;
79
+ case 20: goto st20;
80
+ case 21: goto st21;
81
+ case 22: goto st22;
82
+ case 23: goto st23;
83
+ case 24: goto st24;
84
+ case 25: goto st25;
85
+ case 26: goto st26;
86
+ case 27: goto st27;
87
+ case 49: goto st49;
88
+ case 28: goto st28;
89
+ case 50: goto st50;
90
+ case 29: goto st29;
91
+ case 30: goto st30;
92
+ case 31: goto st31;
93
+ case 51: goto st51;
94
+ case 52: goto st52;
95
+ case 32: goto st32;
96
+ case 33: goto st33;
97
+ case 34: goto st34;
98
+ case 35: goto st35;
99
+ case 36: goto st36;
100
+ case 37: goto st37;
101
+ case 38: goto st38;
102
+ case 53: goto st53;
103
+ case 39: goto st39;
104
+ case 54: goto st54;
105
+ case 40: goto st40;
106
+ case 41: goto st41;
107
+ case 42: goto st42;
108
+ case 55: goto st55;
109
+ case 56: goto st56;
110
+ default: break;
111
+ }
112
+
113
+ if ( ++p == pe )
114
+ goto _test_eof;
115
+ _resume:
116
+ switch ( cs )
117
+ {
118
+ tr0:
119
+ #line 43 "template.rl"
120
+ {{p = ((te))-1;}{
121
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
122
+ }}
123
+ goto st43;
124
+ tr5:
125
+ #line 43 "template.rl"
126
+ {{p = ((te))-1;}{
127
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
128
+ }}
129
+ goto st43;
130
+ tr9:
131
+ #line 23 "template.rl"
132
+ {
133
+ Trenni_raise_error("failed to parse instruction", buffer, p-s);
134
+ }
135
+ #line 43 "template.rl"
136
+ {{p = ((te))-1;}{
137
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
138
+ }}
139
+ goto st43;
140
+ tr14:
141
+ #line 1 "NONE"
142
+ { switch( act ) {
143
+ case 1:
144
+ {{p = ((te))-1;}
145
+ rb_funcall(delegate, id_instruction, 2, Trenni_token(instruction, encoding), newline);
146
+ }
147
+ break;
148
+ case 3:
149
+ {{p = ((te))-1;}
150
+ rb_funcall(delegate, id_instruction, 1, Trenni_token(instruction, encoding));
151
+ }
152
+ break;
153
+ case 6:
154
+ {{p = ((te))-1;}
155
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
156
+ }
157
+ break;
158
+ }
159
+ }
160
+ goto st43;
161
+ tr23:
162
+ #line 43 "template.rl"
163
+ {te = p+1;{
164
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
165
+ }}
166
+ goto st43;
167
+ tr77:
168
+ #line 43 "template.rl"
169
+ {te = p;p--;{
170
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
171
+ }}
172
+ goto st43;
173
+ tr80:
174
+ #line 43 "template.rl"
175
+ {te = p;p--;{
176
+ rb_funcall(delegate, id_text, 1, Trenni_string(ts, te, encoding));
177
+ }}
178
+ goto st43;
179
+ tr82:
180
+ cs = 43;
181
+ #line 27 "template.rl"
182
+ {
183
+ expression.begin = p;
184
+ }
185
+ #line 53 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
186
+ {te = p;p--;{cs = 32;}}
187
+ goto _again;
188
+ st43:
189
+ #line 1 "NONE"
190
+ {ts = 0;}
191
+ if ( ++p == pe )
192
+ goto _test_eof43;
193
+ case 43:
194
+ #line 1 "NONE"
195
+ {ts = p;}
196
+ #line 197 "template.c"
197
+ switch( (*p) ) {
198
+ case 10: goto tr2;
199
+ case 32: goto tr74;
200
+ case 35: goto st12;
201
+ case 60: goto st13;
202
+ }
203
+ if ( 9 <= (*p) && (*p) <= 13 )
204
+ goto tr74;
205
+ goto tr6;
206
+ tr6:
207
+ #line 1 "NONE"
208
+ {te = p+1;}
209
+ goto st44;
210
+ st44:
211
+ if ( ++p == pe )
212
+ goto _test_eof44;
213
+ case 44:
214
+ #line 215 "template.c"
215
+ switch( (*p) ) {
216
+ case 10: goto tr2;
217
+ case 35: goto st4;
218
+ case 60: goto st5;
219
+ }
220
+ goto tr6;
221
+ tr2:
222
+ #line 1 "NONE"
223
+ {te = p+1;}
224
+ goto st45;
225
+ st45:
226
+ if ( ++p == pe )
227
+ goto _test_eof45;
228
+ case 45:
229
+ #line 230 "template.c"
230
+ switch( (*p) ) {
231
+ case 10: goto tr2;
232
+ case 35: goto st2;
233
+ case 60: goto st3;
234
+ }
235
+ goto st1;
236
+ st1:
237
+ if ( ++p == pe )
238
+ goto _test_eof1;
239
+ case 1:
240
+ switch( (*p) ) {
241
+ case 10: goto tr2;
242
+ case 35: goto st2;
243
+ case 60: goto st3;
244
+ }
245
+ goto st1;
246
+ st2:
247
+ if ( ++p == pe )
248
+ goto _test_eof2;
249
+ case 2:
250
+ if ( (*p) == 123 )
251
+ goto tr0;
252
+ goto st1;
253
+ st3:
254
+ if ( ++p == pe )
255
+ goto _test_eof3;
256
+ case 3:
257
+ if ( (*p) == 63 )
258
+ goto tr0;
259
+ goto st1;
260
+ st4:
261
+ if ( ++p == pe )
262
+ goto _test_eof4;
263
+ case 4:
264
+ if ( (*p) == 123 )
265
+ goto tr5;
266
+ goto tr6;
267
+ st5:
268
+ if ( ++p == pe )
269
+ goto _test_eof5;
270
+ case 5:
271
+ if ( (*p) == 63 )
272
+ goto tr5;
273
+ goto tr6;
274
+ tr74:
275
+ #line 1 "NONE"
276
+ {te = p+1;}
277
+ #line 43 "template.rl"
278
+ {act = 6;}
279
+ goto st46;
280
+ st46:
281
+ if ( ++p == pe )
282
+ goto _test_eof46;
283
+ case 46:
284
+ #line 285 "template.c"
285
+ switch( (*p) ) {
286
+ case 10: goto tr2;
287
+ case 32: goto tr74;
288
+ case 35: goto st4;
289
+ case 60: goto st6;
290
+ }
291
+ if ( 9 <= (*p) && (*p) <= 13 )
292
+ goto tr74;
293
+ goto tr6;
294
+ st6:
295
+ if ( ++p == pe )
296
+ goto _test_eof6;
297
+ case 6:
298
+ if ( (*p) == 63 )
299
+ goto st7;
300
+ goto tr6;
301
+ st7:
302
+ if ( ++p == pe )
303
+ goto _test_eof7;
304
+ case 7:
305
+ if ( (*p) == 114 )
306
+ goto st8;
307
+ goto tr5;
308
+ st8:
309
+ if ( ++p == pe )
310
+ goto _test_eof8;
311
+ case 8:
312
+ if ( (*p) == 32 )
313
+ goto tr10;
314
+ if ( 9 <= (*p) && (*p) <= 13 )
315
+ goto tr10;
316
+ goto tr5;
317
+ tr10:
318
+ #line 7 "template.rl"
319
+ {
320
+ instruction.begin = p;
321
+ }
322
+ goto st9;
323
+ st9:
324
+ if ( ++p == pe )
325
+ goto _test_eof9;
326
+ case 9:
327
+ #line 328 "template.c"
328
+ if ( (*p) == 63 )
329
+ goto tr12;
330
+ goto st9;
331
+ tr12:
332
+ #line 11 "template.rl"
333
+ {
334
+ instruction.end = p;
335
+ }
336
+ goto st10;
337
+ st10:
338
+ if ( ++p == pe )
339
+ goto _test_eof10;
340
+ case 10:
341
+ #line 342 "template.c"
342
+ if ( (*p) == 62 )
343
+ goto st11;
344
+ goto st9;
345
+ st11:
346
+ if ( ++p == pe )
347
+ goto _test_eof11;
348
+ case 11:
349
+ switch( (*p) ) {
350
+ case 10: goto tr15;
351
+ case 32: goto st11;
352
+ }
353
+ if ( 9 <= (*p) && (*p) <= 13 )
354
+ goto st11;
355
+ goto tr14;
356
+ tr15:
357
+ #line 1 "NONE"
358
+ {te = p+1;}
359
+ #line 19 "template.rl"
360
+ {act = 1;}
361
+ goto st47;
362
+ tr27:
363
+ #line 1 "NONE"
364
+ {te = p+1;}
365
+ #line 15 "template.rl"
366
+ {act = 3;}
367
+ goto st47;
368
+ st47:
369
+ if ( ++p == pe )
370
+ goto _test_eof47;
371
+ case 47:
372
+ #line 373 "template.c"
373
+ switch( (*p) ) {
374
+ case 10: goto tr15;
375
+ case 32: goto st11;
376
+ }
377
+ if ( 9 <= (*p) && (*p) <= 13 )
378
+ goto st11;
379
+ goto tr14;
380
+ st12:
381
+ if ( ++p == pe )
382
+ goto _test_eof12;
383
+ case 12:
384
+ if ( (*p) == 123 )
385
+ goto st48;
386
+ goto tr6;
387
+ st48:
388
+ if ( ++p == pe )
389
+ goto _test_eof48;
390
+ case 48:
391
+ goto tr82;
392
+ st13:
393
+ if ( ++p == pe )
394
+ goto _test_eof13;
395
+ case 13:
396
+ if ( (*p) == 63 )
397
+ goto st14;
398
+ goto tr6;
399
+ st14:
400
+ if ( ++p == pe )
401
+ goto _test_eof14;
402
+ case 14:
403
+ switch( (*p) ) {
404
+ case 47: goto tr19;
405
+ case 96: goto tr19;
406
+ case 114: goto st18;
407
+ }
408
+ if ( (*p) < 59 ) {
409
+ if ( 0 <= (*p) && (*p) <= 44 )
410
+ goto tr19;
411
+ } else if ( (*p) > 64 ) {
412
+ if ( (*p) > 94 ) {
413
+ if ( 123 <= (*p) )
414
+ goto tr19;
415
+ } else if ( (*p) >= 91 )
416
+ goto tr19;
417
+ } else
418
+ goto tr19;
419
+ goto st15;
420
+ st15:
421
+ if ( ++p == pe )
422
+ goto _test_eof15;
423
+ case 15:
424
+ switch( (*p) ) {
425
+ case 32: goto st16;
426
+ case 47: goto tr19;
427
+ case 96: goto tr19;
428
+ }
429
+ if ( (*p) < 14 ) {
430
+ if ( (*p) > 8 ) {
431
+ if ( 9 <= (*p) && (*p) <= 13 )
432
+ goto st16;
433
+ } else if ( (*p) >= 0 )
434
+ goto tr19;
435
+ } else if ( (*p) > 44 ) {
436
+ if ( (*p) < 91 ) {
437
+ if ( 59 <= (*p) && (*p) <= 64 )
438
+ goto tr19;
439
+ } else if ( (*p) > 94 ) {
440
+ if ( 123 <= (*p) )
441
+ goto tr19;
442
+ } else
443
+ goto tr19;
444
+ } else
445
+ goto tr19;
446
+ goto st15;
447
+ tr19:
448
+ #line 23 "template.rl"
449
+ {
450
+ Trenni_raise_error("failed to parse instruction", buffer, p-s);
451
+ }
452
+ goto st0;
453
+ #line 454 "template.c"
454
+ st0:
455
+ cs = 0;
456
+ goto _out;
457
+ st16:
458
+ if ( ++p == pe )
459
+ goto _test_eof16;
460
+ case 16:
461
+ if ( (*p) == 63 )
462
+ goto st17;
463
+ goto st16;
464
+ st17:
465
+ if ( ++p == pe )
466
+ goto _test_eof17;
467
+ case 17:
468
+ if ( (*p) == 62 )
469
+ goto tr23;
470
+ goto st16;
471
+ st18:
472
+ if ( ++p == pe )
473
+ goto _test_eof18;
474
+ case 18:
475
+ switch( (*p) ) {
476
+ case 32: goto tr24;
477
+ case 47: goto tr19;
478
+ case 96: goto tr19;
479
+ }
480
+ if ( (*p) < 14 ) {
481
+ if ( (*p) > 8 ) {
482
+ if ( 9 <= (*p) && (*p) <= 13 )
483
+ goto tr24;
484
+ } else if ( (*p) >= 0 )
485
+ goto tr19;
486
+ } else if ( (*p) > 44 ) {
487
+ if ( (*p) < 91 ) {
488
+ if ( 59 <= (*p) && (*p) <= 64 )
489
+ goto tr19;
490
+ } else if ( (*p) > 94 ) {
491
+ if ( 123 <= (*p) )
492
+ goto tr19;
493
+ } else
494
+ goto tr19;
495
+ } else
496
+ goto tr19;
497
+ goto st15;
498
+ tr24:
499
+ #line 7 "template.rl"
500
+ {
501
+ instruction.begin = p;
502
+ }
503
+ goto st19;
504
+ st19:
505
+ if ( ++p == pe )
506
+ goto _test_eof19;
507
+ case 19:
508
+ #line 509 "template.c"
509
+ if ( (*p) == 63 )
510
+ goto tr26;
511
+ goto st19;
512
+ tr26:
513
+ #line 11 "template.rl"
514
+ {
515
+ instruction.end = p;
516
+ }
517
+ goto st20;
518
+ st20:
519
+ if ( ++p == pe )
520
+ goto _test_eof20;
521
+ case 20:
522
+ #line 523 "template.c"
523
+ if ( (*p) == 62 )
524
+ goto tr27;
525
+ goto st19;
526
+ tr31:
527
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
528
+ {{stack[top++] = 21; goto st21;}}
529
+ goto st21;
530
+ st21:
531
+ #line 1 "NONE"
532
+ {ts = 0;}
533
+ if ( ++p == pe )
534
+ goto _test_eof21;
535
+ case 21:
536
+ #line 537 "template.c"
537
+ switch( (*p) ) {
538
+ case 34: goto st22;
539
+ case 39: goto st30;
540
+ case 123: goto tr31;
541
+ case 125: goto tr32;
542
+ }
543
+ goto st21;
544
+ tr47:
545
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
546
+ {{stack[top++] = 22; goto st21;}}
547
+ goto st22;
548
+ st22:
549
+ #line 1 "NONE"
550
+ {ts = 0;}
551
+ if ( ++p == pe )
552
+ goto _test_eof22;
553
+ case 22:
554
+ #line 555 "template.c"
555
+ switch( (*p) ) {
556
+ case 34: goto st23;
557
+ case 35: goto st29;
558
+ }
559
+ goto st22;
560
+ tr37:
561
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
562
+ {{stack[top++] = 23; goto st21;}}
563
+ goto st23;
564
+ tr39:
565
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
566
+ {{stack[top++] = 23; goto st21;}}
567
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
568
+ {{stack[top++] = 23; goto st21;}}
569
+ goto st23;
570
+ st23:
571
+ #line 1 "NONE"
572
+ {ts = 0;}
573
+ if ( ++p == pe )
574
+ goto _test_eof23;
575
+ case 23:
576
+ #line 577 "template.c"
577
+ switch( (*p) ) {
578
+ case 35: goto st24;
579
+ case 39: goto st25;
580
+ case 123: goto tr37;
581
+ case 125: goto tr38;
582
+ }
583
+ goto st23;
584
+ st24:
585
+ if ( ++p == pe )
586
+ goto _test_eof24;
587
+ case 24:
588
+ switch( (*p) ) {
589
+ case 35: goto st24;
590
+ case 39: goto st25;
591
+ case 123: goto tr39;
592
+ case 125: goto tr38;
593
+ }
594
+ goto st23;
595
+ tr46:
596
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
597
+ {{stack[top++] = 25; goto st21;}}
598
+ goto st25;
599
+ st25:
600
+ #line 1 "NONE"
601
+ {ts = 0;}
602
+ if ( ++p == pe )
603
+ goto _test_eof25;
604
+ case 25:
605
+ #line 606 "template.c"
606
+ switch( (*p) ) {
607
+ case 34: goto st26;
608
+ case 35: goto st28;
609
+ case 39: goto st26;
610
+ }
611
+ goto st25;
612
+ tr43:
613
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
614
+ {{stack[top++] = 26; goto st21;}}
615
+ goto st26;
616
+ tr45:
617
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
618
+ {{stack[top++] = 26; goto st21;}}
619
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
620
+ {{stack[top++] = 26; goto st21;}}
621
+ goto st26;
622
+ st26:
623
+ #line 1 "NONE"
624
+ {ts = 0;}
625
+ if ( ++p == pe )
626
+ goto _test_eof26;
627
+ case 26:
628
+ #line 629 "template.c"
629
+ switch( (*p) ) {
630
+ case 35: goto st27;
631
+ case 123: goto tr43;
632
+ case 125: goto tr44;
633
+ }
634
+ goto st26;
635
+ st27:
636
+ if ( ++p == pe )
637
+ goto _test_eof27;
638
+ case 27:
639
+ switch( (*p) ) {
640
+ case 35: goto st27;
641
+ case 123: goto tr45;
642
+ case 125: goto tr44;
643
+ }
644
+ goto st26;
645
+ tr44:
646
+ #line 20 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
647
+ {{cs = stack[--top];goto _again;}}
648
+ goto st49;
649
+ st49:
650
+ if ( ++p == pe )
651
+ goto _test_eof49;
652
+ case 49:
653
+ #line 654 "template.c"
654
+ switch( (*p) ) {
655
+ case 34: goto st26;
656
+ case 35: goto st28;
657
+ case 39: goto st26;
658
+ }
659
+ goto st25;
660
+ st28:
661
+ if ( ++p == pe )
662
+ goto _test_eof28;
663
+ case 28:
664
+ switch( (*p) ) {
665
+ case 34: goto st26;
666
+ case 35: goto st28;
667
+ case 39: goto st26;
668
+ case 123: goto tr46;
669
+ }
670
+ goto st25;
671
+ tr38:
672
+ #line 20 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
673
+ {{cs = stack[--top];goto _again;}}
674
+ goto st50;
675
+ st50:
676
+ if ( ++p == pe )
677
+ goto _test_eof50;
678
+ case 50:
679
+ #line 680 "template.c"
680
+ switch( (*p) ) {
681
+ case 34: goto st23;
682
+ case 35: goto st29;
683
+ }
684
+ goto st22;
685
+ st29:
686
+ if ( ++p == pe )
687
+ goto _test_eof29;
688
+ case 29:
689
+ switch( (*p) ) {
690
+ case 34: goto st23;
691
+ case 35: goto st29;
692
+ case 123: goto tr47;
693
+ }
694
+ goto st22;
695
+ st30:
696
+ if ( ++p == pe )
697
+ goto _test_eof30;
698
+ case 30:
699
+ if ( (*p) == 39 )
700
+ goto st31;
701
+ goto st30;
702
+ tr49:
703
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
704
+ {{stack[top++] = 31; goto st21;}}
705
+ goto st31;
706
+ st31:
707
+ #line 1 "NONE"
708
+ {ts = 0;}
709
+ if ( ++p == pe )
710
+ goto _test_eof31;
711
+ case 31:
712
+ #line 713 "template.c"
713
+ switch( (*p) ) {
714
+ case 34: goto st25;
715
+ case 123: goto tr49;
716
+ case 125: goto tr50;
717
+ }
718
+ goto st31;
719
+ tr50:
720
+ #line 20 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
721
+ {{cs = stack[--top];goto _again;}}
722
+ goto st51;
723
+ st51:
724
+ if ( ++p == pe )
725
+ goto _test_eof51;
726
+ case 51:
727
+ #line 728 "template.c"
728
+ if ( (*p) == 39 )
729
+ goto st31;
730
+ goto st30;
731
+ tr32:
732
+ #line 20 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
733
+ {{cs = stack[--top];goto _again;}}
734
+ goto st52;
735
+ st52:
736
+ if ( ++p == pe )
737
+ goto _test_eof52;
738
+ case 52:
739
+ #line 740 "template.c"
740
+ goto st0;
741
+ tr54:
742
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
743
+ {{stack[top++] = 32; goto st21;}}
744
+ goto st32;
745
+ st32:
746
+ #line 1 "NONE"
747
+ {ts = 0;}
748
+ if ( ++p == pe )
749
+ goto _test_eof32;
750
+ case 32:
751
+ #line 752 "template.c"
752
+ switch( (*p) ) {
753
+ case 34: goto st33;
754
+ case 39: goto st41;
755
+ case 123: goto tr54;
756
+ case 125: goto tr55;
757
+ }
758
+ goto st32;
759
+ tr70:
760
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
761
+ {{stack[top++] = 33; goto st21;}}
762
+ goto st33;
763
+ st33:
764
+ #line 1 "NONE"
765
+ {ts = 0;}
766
+ if ( ++p == pe )
767
+ goto _test_eof33;
768
+ case 33:
769
+ #line 770 "template.c"
770
+ switch( (*p) ) {
771
+ case 34: goto st34;
772
+ case 35: goto st40;
773
+ }
774
+ goto st33;
775
+ tr60:
776
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
777
+ {{stack[top++] = 34; goto st21;}}
778
+ goto st34;
779
+ tr62:
780
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
781
+ {{stack[top++] = 34; goto st21;}}
782
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
783
+ {{stack[top++] = 34; goto st21;}}
784
+ goto st34;
785
+ st34:
786
+ #line 1 "NONE"
787
+ {ts = 0;}
788
+ if ( ++p == pe )
789
+ goto _test_eof34;
790
+ case 34:
791
+ #line 792 "template.c"
792
+ switch( (*p) ) {
793
+ case 35: goto st35;
794
+ case 39: goto st36;
795
+ case 123: goto tr60;
796
+ case 125: goto tr61;
797
+ }
798
+ goto st34;
799
+ st35:
800
+ if ( ++p == pe )
801
+ goto _test_eof35;
802
+ case 35:
803
+ switch( (*p) ) {
804
+ case 35: goto st35;
805
+ case 39: goto st36;
806
+ case 123: goto tr62;
807
+ case 125: goto tr61;
808
+ }
809
+ goto st34;
810
+ tr69:
811
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
812
+ {{stack[top++] = 36; goto st21;}}
813
+ goto st36;
814
+ st36:
815
+ #line 1 "NONE"
816
+ {ts = 0;}
817
+ if ( ++p == pe )
818
+ goto _test_eof36;
819
+ case 36:
820
+ #line 821 "template.c"
821
+ switch( (*p) ) {
822
+ case 34: goto st37;
823
+ case 35: goto st39;
824
+ case 39: goto st37;
825
+ }
826
+ goto st36;
827
+ tr66:
828
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
829
+ {{stack[top++] = 37; goto st21;}}
830
+ goto st37;
831
+ tr68:
832
+ #line 13 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
833
+ {{stack[top++] = 37; goto st21;}}
834
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
835
+ {{stack[top++] = 37; goto st21;}}
836
+ goto st37;
837
+ st37:
838
+ #line 1 "NONE"
839
+ {ts = 0;}
840
+ if ( ++p == pe )
841
+ goto _test_eof37;
842
+ case 37:
843
+ #line 844 "template.c"
844
+ switch( (*p) ) {
845
+ case 35: goto st38;
846
+ case 123: goto tr66;
847
+ case 125: goto tr67;
848
+ }
849
+ goto st37;
850
+ st38:
851
+ if ( ++p == pe )
852
+ goto _test_eof38;
853
+ case 38:
854
+ switch( (*p) ) {
855
+ case 35: goto st38;
856
+ case 123: goto tr68;
857
+ case 125: goto tr67;
858
+ }
859
+ goto st37;
860
+ tr67:
861
+ cs = 53;
862
+ #line 31 "template.rl"
863
+ {
864
+ expression.end = p;
865
+ }
866
+ #line 35 "template.rl"
867
+ {
868
+ rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
869
+ }
870
+ #line 21 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
871
+ {cs = 43;}
872
+ goto _again;
873
+ st53:
874
+ if ( ++p == pe )
875
+ goto _test_eof53;
876
+ case 53:
877
+ #line 878 "template.c"
878
+ switch( (*p) ) {
879
+ case 34: goto st37;
880
+ case 35: goto st39;
881
+ case 39: goto st37;
882
+ }
883
+ goto st36;
884
+ st39:
885
+ if ( ++p == pe )
886
+ goto _test_eof39;
887
+ case 39:
888
+ switch( (*p) ) {
889
+ case 34: goto st37;
890
+ case 35: goto st39;
891
+ case 39: goto st37;
892
+ case 123: goto tr69;
893
+ }
894
+ goto st36;
895
+ tr61:
896
+ cs = 54;
897
+ #line 31 "template.rl"
898
+ {
899
+ expression.end = p;
900
+ }
901
+ #line 35 "template.rl"
902
+ {
903
+ rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
904
+ }
905
+ #line 21 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
906
+ {cs = 43;}
907
+ goto _again;
908
+ st54:
909
+ if ( ++p == pe )
910
+ goto _test_eof54;
911
+ case 54:
912
+ #line 913 "template.c"
913
+ switch( (*p) ) {
914
+ case 34: goto st34;
915
+ case 35: goto st40;
916
+ }
917
+ goto st33;
918
+ st40:
919
+ if ( ++p == pe )
920
+ goto _test_eof40;
921
+ case 40:
922
+ switch( (*p) ) {
923
+ case 34: goto st34;
924
+ case 35: goto st40;
925
+ case 123: goto tr70;
926
+ }
927
+ goto st33;
928
+ st41:
929
+ if ( ++p == pe )
930
+ goto _test_eof41;
931
+ case 41:
932
+ if ( (*p) == 39 )
933
+ goto st42;
934
+ goto st41;
935
+ tr72:
936
+ #line 17 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
937
+ {{stack[top++] = 42; goto st21;}}
938
+ goto st42;
939
+ st42:
940
+ #line 1 "NONE"
941
+ {ts = 0;}
942
+ if ( ++p == pe )
943
+ goto _test_eof42;
944
+ case 42:
945
+ #line 946 "template.c"
946
+ switch( (*p) ) {
947
+ case 34: goto st36;
948
+ case 123: goto tr72;
949
+ case 125: goto tr73;
950
+ }
951
+ goto st42;
952
+ tr73:
953
+ cs = 55;
954
+ #line 31 "template.rl"
955
+ {
956
+ expression.end = p;
957
+ }
958
+ #line 35 "template.rl"
959
+ {
960
+ rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
961
+ }
962
+ #line 21 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
963
+ {cs = 43;}
964
+ goto _again;
965
+ st55:
966
+ if ( ++p == pe )
967
+ goto _test_eof55;
968
+ case 55:
969
+ #line 970 "template.c"
970
+ if ( (*p) == 39 )
971
+ goto st42;
972
+ goto st41;
973
+ tr55:
974
+ cs = 56;
975
+ #line 31 "template.rl"
976
+ {
977
+ expression.end = p;
978
+ }
979
+ #line 35 "template.rl"
980
+ {
981
+ rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
982
+ }
983
+ #line 21 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
984
+ {cs = 43;}
985
+ goto _again;
986
+ st56:
987
+ if ( ++p == pe )
988
+ goto _test_eof56;
989
+ case 56:
990
+ #line 991 "template.c"
991
+ goto st0;
992
+ }
993
+ _test_eof43: cs = 43; goto _test_eof;
994
+ _test_eof44: cs = 44; goto _test_eof;
995
+ _test_eof45: cs = 45; goto _test_eof;
996
+ _test_eof1: cs = 1; goto _test_eof;
997
+ _test_eof2: cs = 2; goto _test_eof;
998
+ _test_eof3: cs = 3; goto _test_eof;
999
+ _test_eof4: cs = 4; goto _test_eof;
1000
+ _test_eof5: cs = 5; goto _test_eof;
1001
+ _test_eof46: cs = 46; goto _test_eof;
1002
+ _test_eof6: cs = 6; goto _test_eof;
1003
+ _test_eof7: cs = 7; goto _test_eof;
1004
+ _test_eof8: cs = 8; goto _test_eof;
1005
+ _test_eof9: cs = 9; goto _test_eof;
1006
+ _test_eof10: cs = 10; goto _test_eof;
1007
+ _test_eof11: cs = 11; goto _test_eof;
1008
+ _test_eof47: cs = 47; goto _test_eof;
1009
+ _test_eof12: cs = 12; goto _test_eof;
1010
+ _test_eof48: cs = 48; goto _test_eof;
1011
+ _test_eof13: cs = 13; goto _test_eof;
1012
+ _test_eof14: cs = 14; goto _test_eof;
1013
+ _test_eof15: cs = 15; goto _test_eof;
1014
+ _test_eof16: cs = 16; goto _test_eof;
1015
+ _test_eof17: cs = 17; goto _test_eof;
1016
+ _test_eof18: cs = 18; goto _test_eof;
1017
+ _test_eof19: cs = 19; goto _test_eof;
1018
+ _test_eof20: cs = 20; goto _test_eof;
1019
+ _test_eof21: cs = 21; goto _test_eof;
1020
+ _test_eof22: cs = 22; goto _test_eof;
1021
+ _test_eof23: cs = 23; goto _test_eof;
1022
+ _test_eof24: cs = 24; goto _test_eof;
1023
+ _test_eof25: cs = 25; goto _test_eof;
1024
+ _test_eof26: cs = 26; goto _test_eof;
1025
+ _test_eof27: cs = 27; goto _test_eof;
1026
+ _test_eof49: cs = 49; goto _test_eof;
1027
+ _test_eof28: cs = 28; goto _test_eof;
1028
+ _test_eof50: cs = 50; goto _test_eof;
1029
+ _test_eof29: cs = 29; goto _test_eof;
1030
+ _test_eof30: cs = 30; goto _test_eof;
1031
+ _test_eof31: cs = 31; goto _test_eof;
1032
+ _test_eof51: cs = 51; goto _test_eof;
1033
+ _test_eof52: cs = 52; goto _test_eof;
1034
+ _test_eof32: cs = 32; goto _test_eof;
1035
+ _test_eof33: cs = 33; goto _test_eof;
1036
+ _test_eof34: cs = 34; goto _test_eof;
1037
+ _test_eof35: cs = 35; goto _test_eof;
1038
+ _test_eof36: cs = 36; goto _test_eof;
1039
+ _test_eof37: cs = 37; goto _test_eof;
1040
+ _test_eof38: cs = 38; goto _test_eof;
1041
+ _test_eof53: cs = 53; goto _test_eof;
1042
+ _test_eof39: cs = 39; goto _test_eof;
1043
+ _test_eof54: cs = 54; goto _test_eof;
1044
+ _test_eof40: cs = 40; goto _test_eof;
1045
+ _test_eof41: cs = 41; goto _test_eof;
1046
+ _test_eof42: cs = 42; goto _test_eof;
1047
+ _test_eof55: cs = 55; goto _test_eof;
1048
+ _test_eof56: cs = 56; goto _test_eof;
1049
+
1050
+ _test_eof: {}
1051
+ if ( p == eof )
1052
+ {
1053
+ switch ( cs ) {
1054
+ case 44: goto tr77;
1055
+ case 45: goto tr80;
1056
+ case 1: goto tr0;
1057
+ case 2: goto tr0;
1058
+ case 3: goto tr0;
1059
+ case 4: goto tr5;
1060
+ case 5: goto tr5;
1061
+ case 46: goto tr77;
1062
+ case 6: goto tr5;
1063
+ case 7: goto tr5;
1064
+ case 8: goto tr9;
1065
+ case 9: goto tr9;
1066
+ case 10: goto tr9;
1067
+ case 11: goto tr14;
1068
+ case 47: goto tr14;
1069
+ case 48: goto tr82;
1070
+ case 14:
1071
+ case 15:
1072
+ case 16:
1073
+ case 17:
1074
+ case 18:
1075
+ case 19:
1076
+ case 20:
1077
+ #line 23 "template.rl"
1078
+ {
1079
+ Trenni_raise_error("failed to parse instruction", buffer, p-s);
1080
+ }
1081
+ break;
1082
+ case 32:
1083
+ case 33:
1084
+ case 34:
1085
+ case 35:
1086
+ case 36:
1087
+ case 37:
1088
+ case 38:
1089
+ case 39:
1090
+ case 40:
1091
+ case 41:
1092
+ case 42:
1093
+ #line 39 "template.rl"
1094
+ {
1095
+ Trenni_raise_error("failed to parse expression", buffer, p-s);
1096
+ }
1097
+ break;
1098
+ #line 1099 "template.c"
1099
+ }
1100
+ }
1101
+
1102
+ _out: {}
1103
+ }
1104
+
1105
+ #line 70 "template.rl"
1106
+
1107
+
1108
+ if (p != eof) {
1109
+ Trenni_raise_error("could not parse all input", buffer, p-s);
1110
+ }
1111
+
1112
+ return Qnil;
1113
+ }