trenni 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f6e48e9727b8f616cace8e7090227e13388ef58
4
- data.tar.gz: 6e871441287d048b9dda16dd0dc428510b8055d2
3
+ metadata.gz: 7f978da77175a9071cf75459ecc67b76c46611a5
4
+ data.tar.gz: 69e8b067fdee4bcd19fcc9380c58c7e905571e9f
5
5
  SHA512:
6
- metadata.gz: 9f45256745878e56128149e0a90a0f0e1cc171e8e17a1ce7feb02caff0f4d5a6a787be74e392e0d56991f40d1321eb2148ded8e1e23c30d14933ac160ffc91cf
7
- data.tar.gz: 40f78cceea83878d176d71de6f0c29c45111e9b5a2dcb8fa1f83cd48f739192cacbb8508d44c293d97244e8679fd981fcf400963d32eed5bfa06bfa541ba6fe6
6
+ metadata.gz: 061165c578720fe3647d7290a1dfc293826a3366f22ad4d4ea52596ede57398535b29734cc5da009a540ae21059e7f226df8c93d0cb37d4ca8870194e64e0361
7
+ data.tar.gz: e7c2baa36ea1f88c9b16ccbccc26639c454ca3e5e812e20c7e6505b55a97043e592e46efb455a71b7b2156a7e837916f8948d307a0535a9b11ab794407d77ddf
data/Gemfile CHANGED
@@ -10,6 +10,9 @@ group :development do
10
10
  gem "benchmark-ips"
11
11
 
12
12
  gem "rake-compiler"
13
+
14
+ # For comparisons:
15
+ gem "nokogiri"
13
16
  end
14
17
 
15
18
  group :test do
data/README.md CHANGED
@@ -18,6 +18,36 @@ In addition, I wanted a simple markup parser and builder for HTML style markup.
18
18
 
19
19
  The 2nd release of Trenni in 2016 saw an overhaul of the internal parsers. I used [Ragel](http://www.colm.net/open-source/ragel/) to implement efficient event-based markup and template parsers, which can be compiled to both C and Ruby. This provides a native code path where possible giving speed-ups between 10x - 20x. In addition, the formal grammar is more robust.
20
20
 
21
+ ## Is it fast?
22
+
23
+ It's faster than Nokogiri for parsing markup:
24
+
25
+ Trenni::Native
26
+ Warming up --------------------------------------
27
+ Large (Trenni) 71.000 i/100ms
28
+ Large (Nokogiri) 28.000 i/100ms
29
+ Calculating -------------------------------------
30
+ Large (Trenni) 662.050 (± 3.9%) i/s - 3.337k in 5.048115s
31
+ Large (Nokogiri) 266.878 (±10.9%) i/s - 1.316k in 5.008464s
32
+
33
+ Comparison:
34
+ Large (Trenni): 662.1 i/s
35
+ Large (Nokogiri): 266.9 i/s - 2.48x slower
36
+
37
+ It's significantly faster than ERB:
38
+
39
+ Trenni::Template
40
+ Warming up --------------------------------------
41
+ Trenni (object) 75.667k i/100ms
42
+ ERB (binding) 6.940k i/100ms
43
+ Calculating -------------------------------------
44
+ Trenni (object) 1.095M (± 7.9%) i/s - 5.448M in 5.007244s
45
+ ERB (binding) 69.381k (± 7.1%) i/s - 347.000k in 5.027333s
46
+
47
+ Comparison:
48
+ Trenni (object): 1094979.9 i/s
49
+ ERB (binding): 69381.1 i/s - 15.78x slower
50
+
21
51
  ## Installation
22
52
 
23
53
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -81,7 +81,7 @@ task :visualize_parsers do
81
81
  pdf_path = parser_path + ".pdf"
82
82
  sh("dot", "-Tpdf", "-o", pdf_path, dot_path)
83
83
 
84
- sh("open", pdf_path)
84
+ sh("open", pdf_path) rescue nil
85
85
  end
86
86
  end
87
87
  end
@@ -15,7 +15,7 @@ static const int Trenni_markup_parser_en_parse_entity = 42;
15
15
  static const int Trenni_markup_parser_en_main = 48;
16
16
 
17
17
 
18
- #line 192 "markup.rl"
18
+ #line 190 "markup.rl"
19
19
 
20
20
 
21
21
  VALUE Trenni_Native_parse_markup(VALUE self, VALUE buffer, VALUE delegate, VALUE entities) {
@@ -127,150 +127,131 @@ case 48:
127
127
  case 60: goto tr89;
128
128
  }
129
129
  goto tr87;
130
- tr90:
131
- #line 29 "markup.rl"
132
- {
133
- characters.end = p;
134
-
135
- Trenni_append_token(&pcdata, encoding, characters);
136
- }
137
- #line 25 "markup.rl"
138
- {
139
- characters.begin = p;
140
- }
141
- goto st49;
142
130
  tr93:
143
- #line 25 "markup.rl"
131
+ #line 32 "markup.rl"
144
132
  {
145
133
  characters.begin = p;
146
134
  }
147
135
  goto st49;
148
136
  tr87:
149
- #line 180 "markup.rl"
137
+ #line 25 "markup.rl"
150
138
  {
151
-
152
139
  }
153
140
  #line 18 "markup.rl"
154
141
  {
155
142
  pcdata = Qnil;
156
143
  }
157
- #line 25 "markup.rl"
144
+ #line 32 "markup.rl"
158
145
  {
159
146
  characters.begin = p;
160
147
  }
161
148
  goto st49;
162
149
  tr96:
163
- #line 151 "markup.rl"
150
+ #line 158 "markup.rl"
164
151
  {
165
152
  rb_funcall(delegate, id_open_tag_end, 1, self_closing == 1 ? Qtrue : Qfalse);
166
153
  }
167
- #line 180 "markup.rl"
154
+ #line 25 "markup.rl"
168
155
  {
169
-
170
156
  }
171
157
  #line 18 "markup.rl"
172
158
  {
173
159
  pcdata = Qnil;
174
160
  }
175
- #line 25 "markup.rl"
161
+ #line 32 "markup.rl"
176
162
  {
177
163
  characters.begin = p;
178
164
  }
179
165
  goto st49;
180
166
  tr99:
181
- #line 85 "markup.rl"
167
+ #line 92 "markup.rl"
182
168
  {
183
169
  comment.end = p;
184
170
 
185
171
  rb_funcall(delegate, id_comment, 1, Trenni_token(comment, encoding));
186
172
  }
187
- #line 180 "markup.rl"
173
+ #line 25 "markup.rl"
188
174
  {
189
-
190
175
  }
191
176
  #line 18 "markup.rl"
192
177
  {
193
178
  pcdata = Qnil;
194
179
  }
195
- #line 25 "markup.rl"
180
+ #line 32 "markup.rl"
196
181
  {
197
182
  characters.begin = p;
198
183
  }
199
184
  goto st49;
200
185
  tr102:
201
- #line 71 "markup.rl"
186
+ #line 78 "markup.rl"
202
187
  {
203
188
  doctype.end = p;
204
189
 
205
190
  rb_funcall(delegate, id_doctype, 1, Trenni_token(doctype, encoding));
206
191
  }
207
- #line 180 "markup.rl"
192
+ #line 25 "markup.rl"
208
193
  {
209
-
210
194
  }
211
195
  #line 18 "markup.rl"
212
196
  {
213
197
  pcdata = Qnil;
214
198
  }
215
- #line 25 "markup.rl"
199
+ #line 32 "markup.rl"
216
200
  {
217
201
  characters.begin = p;
218
202
  }
219
203
  goto st49;
220
204
  tr105:
221
- #line 170 "markup.rl"
205
+ #line 177 "markup.rl"
222
206
  {
223
207
  cdata.end = p;
224
208
 
225
209
  rb_funcall(delegate, id_cdata, 1, Trenni_token(cdata, encoding));
226
210
  }
227
- #line 180 "markup.rl"
211
+ #line 25 "markup.rl"
228
212
  {
229
-
230
213
  }
231
214
  #line 18 "markup.rl"
232
215
  {
233
216
  pcdata = Qnil;
234
217
  }
235
- #line 25 "markup.rl"
218
+ #line 32 "markup.rl"
236
219
  {
237
220
  characters.begin = p;
238
221
  }
239
222
  goto st49;
240
223
  tr108:
241
- #line 158 "markup.rl"
224
+ #line 165 "markup.rl"
242
225
  {
243
226
  rb_funcall(delegate, id_close_tag, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
244
227
  }
245
- #line 180 "markup.rl"
228
+ #line 25 "markup.rl"
246
229
  {
247
-
248
230
  }
249
231
  #line 18 "markup.rl"
250
232
  {
251
233
  pcdata = Qnil;
252
234
  }
253
- #line 25 "markup.rl"
235
+ #line 32 "markup.rl"
254
236
  {
255
237
  characters.begin = p;
256
238
  }
257
239
  goto st49;
258
240
  tr111:
259
- #line 105 "markup.rl"
241
+ #line 112 "markup.rl"
260
242
  {
261
243
  instruction.end = p;
262
244
 
263
245
  rb_funcall(delegate, id_instruction, 1, Trenni_token(instruction, encoding));
264
246
  }
265
- #line 180 "markup.rl"
247
+ #line 25 "markup.rl"
266
248
  {
267
-
268
249
  }
269
250
  #line 18 "markup.rl"
270
251
  {
271
252
  pcdata = Qnil;
272
253
  }
273
- #line 25 "markup.rl"
254
+ #line 32 "markup.rl"
274
255
  {
275
256
  characters.begin = p;
276
257
  }
@@ -279,14 +260,14 @@ st49:
279
260
  if ( ++p == pe )
280
261
  goto _test_eof49;
281
262
  case 49:
282
- #line 283 "markup.c"
263
+ #line 264 "markup.c"
283
264
  switch( (*p) ) {
284
265
  case 38: goto tr91;
285
266
  case 60: goto tr92;
286
267
  }
287
- goto tr90;
268
+ goto st49;
288
269
  tr91:
289
- #line 29 "markup.rl"
270
+ #line 36 "markup.rl"
290
271
  {
291
272
  characters.end = p;
292
273
 
@@ -300,9 +281,8 @@ tr94:
300
281
  {{stack[top++] = 50; goto st42;}}
301
282
  goto st50;
302
283
  tr88:
303
- #line 180 "markup.rl"
284
+ #line 25 "markup.rl"
304
285
  {
305
-
306
286
  }
307
287
  #line 18 "markup.rl"
308
288
  {
@@ -312,13 +292,12 @@ tr88:
312
292
  {{stack[top++] = 50; goto st42;}}
313
293
  goto st50;
314
294
  tr97:
315
- #line 151 "markup.rl"
295
+ #line 158 "markup.rl"
316
296
  {
317
297
  rb_funcall(delegate, id_open_tag_end, 1, self_closing == 1 ? Qtrue : Qfalse);
318
298
  }
319
- #line 180 "markup.rl"
299
+ #line 25 "markup.rl"
320
300
  {
321
-
322
301
  }
323
302
  #line 18 "markup.rl"
324
303
  {
@@ -328,15 +307,14 @@ tr97:
328
307
  {{stack[top++] = 50; goto st42;}}
329
308
  goto st50;
330
309
  tr100:
331
- #line 85 "markup.rl"
310
+ #line 92 "markup.rl"
332
311
  {
333
312
  comment.end = p;
334
313
 
335
314
  rb_funcall(delegate, id_comment, 1, Trenni_token(comment, encoding));
336
315
  }
337
- #line 180 "markup.rl"
316
+ #line 25 "markup.rl"
338
317
  {
339
-
340
318
  }
341
319
  #line 18 "markup.rl"
342
320
  {
@@ -346,15 +324,14 @@ tr100:
346
324
  {{stack[top++] = 50; goto st42;}}
347
325
  goto st50;
348
326
  tr103:
349
- #line 71 "markup.rl"
327
+ #line 78 "markup.rl"
350
328
  {
351
329
  doctype.end = p;
352
330
 
353
331
  rb_funcall(delegate, id_doctype, 1, Trenni_token(doctype, encoding));
354
332
  }
355
- #line 180 "markup.rl"
333
+ #line 25 "markup.rl"
356
334
  {
357
-
358
335
  }
359
336
  #line 18 "markup.rl"
360
337
  {
@@ -364,15 +341,14 @@ tr103:
364
341
  {{stack[top++] = 50; goto st42;}}
365
342
  goto st50;
366
343
  tr106:
367
- #line 170 "markup.rl"
344
+ #line 177 "markup.rl"
368
345
  {
369
346
  cdata.end = p;
370
347
 
371
348
  rb_funcall(delegate, id_cdata, 1, Trenni_token(cdata, encoding));
372
349
  }
373
- #line 180 "markup.rl"
350
+ #line 25 "markup.rl"
374
351
  {
375
-
376
352
  }
377
353
  #line 18 "markup.rl"
378
354
  {
@@ -382,13 +358,12 @@ tr106:
382
358
  {{stack[top++] = 50; goto st42;}}
383
359
  goto st50;
384
360
  tr109:
385
- #line 158 "markup.rl"
361
+ #line 165 "markup.rl"
386
362
  {
387
363
  rb_funcall(delegate, id_close_tag, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
388
364
  }
389
- #line 180 "markup.rl"
365
+ #line 25 "markup.rl"
390
366
  {
391
-
392
367
  }
393
368
  #line 18 "markup.rl"
394
369
  {
@@ -398,15 +373,14 @@ tr109:
398
373
  {{stack[top++] = 50; goto st42;}}
399
374
  goto st50;
400
375
  tr112:
401
- #line 105 "markup.rl"
376
+ #line 112 "markup.rl"
402
377
  {
403
378
  instruction.end = p;
404
379
 
405
380
  rb_funcall(delegate, id_instruction, 1, Trenni_token(instruction, encoding));
406
381
  }
407
- #line 180 "markup.rl"
382
+ #line 25 "markup.rl"
408
383
  {
409
-
410
384
  }
411
385
  #line 18 "markup.rl"
412
386
  {
@@ -419,38 +393,38 @@ st50:
419
393
  if ( ++p == pe )
420
394
  goto _test_eof50;
421
395
  case 50:
422
- #line 423 "markup.c"
396
+ #line 397 "markup.c"
423
397
  switch( (*p) ) {
424
398
  case 38: goto tr94;
425
399
  case 60: goto tr95;
426
400
  }
427
401
  goto tr93;
428
402
  tr89:
429
- #line 122 "markup.rl"
403
+ #line 129 "markup.rl"
430
404
  {
431
405
  }
432
- #line 155 "markup.rl"
406
+ #line 162 "markup.rl"
433
407
  {
434
408
  }
435
- #line 95 "markup.rl"
409
+ #line 102 "markup.rl"
436
410
  {
437
411
  instruction.begin = p;
438
412
  }
439
- #line 81 "markup.rl"
413
+ #line 88 "markup.rl"
440
414
  {
441
415
  comment.begin = p;
442
416
  }
443
- #line 67 "markup.rl"
417
+ #line 74 "markup.rl"
444
418
  {
445
419
  doctype.begin = p;
446
420
  }
447
- #line 166 "markup.rl"
421
+ #line 173 "markup.rl"
448
422
  {
449
423
  cdata.begin = p;
450
424
  }
451
425
  goto st1;
452
426
  tr92:
453
- #line 29 "markup.rl"
427
+ #line 36 "markup.rl"
454
428
  {
455
429
  characters.end = p;
456
430
 
@@ -459,30 +433,29 @@ tr92:
459
433
  #line 22 "markup.rl"
460
434
  {
461
435
  }
462
- #line 184 "markup.rl"
436
+ #line 28 "markup.rl"
463
437
  {
464
- // Entities are handled separately:
465
438
  rb_funcall(delegate, id_text, 1, pcdata);
466
439
  }
467
- #line 122 "markup.rl"
440
+ #line 129 "markup.rl"
468
441
  {
469
442
  }
470
- #line 155 "markup.rl"
443
+ #line 162 "markup.rl"
471
444
  {
472
445
  }
473
- #line 95 "markup.rl"
446
+ #line 102 "markup.rl"
474
447
  {
475
448
  instruction.begin = p;
476
449
  }
477
- #line 81 "markup.rl"
450
+ #line 88 "markup.rl"
478
451
  {
479
452
  comment.begin = p;
480
453
  }
481
- #line 67 "markup.rl"
454
+ #line 74 "markup.rl"
482
455
  {
483
456
  doctype.begin = p;
484
457
  }
485
- #line 166 "markup.rl"
458
+ #line 173 "markup.rl"
486
459
  {
487
460
  cdata.begin = p;
488
461
  }
@@ -491,206 +464,205 @@ tr95:
491
464
  #line 22 "markup.rl"
492
465
  {
493
466
  }
494
- #line 184 "markup.rl"
467
+ #line 28 "markup.rl"
495
468
  {
496
- // Entities are handled separately:
497
469
  rb_funcall(delegate, id_text, 1, pcdata);
498
470
  }
499
- #line 122 "markup.rl"
471
+ #line 129 "markup.rl"
500
472
  {
501
473
  }
502
- #line 155 "markup.rl"
474
+ #line 162 "markup.rl"
503
475
  {
504
476
  }
505
- #line 95 "markup.rl"
477
+ #line 102 "markup.rl"
506
478
  {
507
479
  instruction.begin = p;
508
480
  }
509
- #line 81 "markup.rl"
481
+ #line 88 "markup.rl"
510
482
  {
511
483
  comment.begin = p;
512
484
  }
513
- #line 67 "markup.rl"
485
+ #line 74 "markup.rl"
514
486
  {
515
487
  doctype.begin = p;
516
488
  }
517
- #line 166 "markup.rl"
489
+ #line 173 "markup.rl"
518
490
  {
519
491
  cdata.begin = p;
520
492
  }
521
493
  goto st1;
522
494
  tr98:
523
- #line 151 "markup.rl"
495
+ #line 158 "markup.rl"
524
496
  {
525
497
  rb_funcall(delegate, id_open_tag_end, 1, self_closing == 1 ? Qtrue : Qfalse);
526
498
  }
527
- #line 122 "markup.rl"
499
+ #line 129 "markup.rl"
528
500
  {
529
501
  }
530
- #line 155 "markup.rl"
502
+ #line 162 "markup.rl"
531
503
  {
532
504
  }
533
- #line 95 "markup.rl"
505
+ #line 102 "markup.rl"
534
506
  {
535
507
  instruction.begin = p;
536
508
  }
537
- #line 81 "markup.rl"
509
+ #line 88 "markup.rl"
538
510
  {
539
511
  comment.begin = p;
540
512
  }
541
- #line 67 "markup.rl"
513
+ #line 74 "markup.rl"
542
514
  {
543
515
  doctype.begin = p;
544
516
  }
545
- #line 166 "markup.rl"
517
+ #line 173 "markup.rl"
546
518
  {
547
519
  cdata.begin = p;
548
520
  }
549
521
  goto st1;
550
522
  tr101:
551
- #line 85 "markup.rl"
523
+ #line 92 "markup.rl"
552
524
  {
553
525
  comment.end = p;
554
526
 
555
527
  rb_funcall(delegate, id_comment, 1, Trenni_token(comment, encoding));
556
528
  }
557
- #line 122 "markup.rl"
529
+ #line 129 "markup.rl"
558
530
  {
559
531
  }
560
- #line 155 "markup.rl"
532
+ #line 162 "markup.rl"
561
533
  {
562
534
  }
563
- #line 95 "markup.rl"
535
+ #line 102 "markup.rl"
564
536
  {
565
537
  instruction.begin = p;
566
538
  }
567
- #line 81 "markup.rl"
539
+ #line 88 "markup.rl"
568
540
  {
569
541
  comment.begin = p;
570
542
  }
571
- #line 67 "markup.rl"
543
+ #line 74 "markup.rl"
572
544
  {
573
545
  doctype.begin = p;
574
546
  }
575
- #line 166 "markup.rl"
547
+ #line 173 "markup.rl"
576
548
  {
577
549
  cdata.begin = p;
578
550
  }
579
551
  goto st1;
580
552
  tr104:
581
- #line 71 "markup.rl"
553
+ #line 78 "markup.rl"
582
554
  {
583
555
  doctype.end = p;
584
556
 
585
557
  rb_funcall(delegate, id_doctype, 1, Trenni_token(doctype, encoding));
586
558
  }
587
- #line 122 "markup.rl"
559
+ #line 129 "markup.rl"
588
560
  {
589
561
  }
590
- #line 155 "markup.rl"
562
+ #line 162 "markup.rl"
591
563
  {
592
564
  }
593
- #line 95 "markup.rl"
565
+ #line 102 "markup.rl"
594
566
  {
595
567
  instruction.begin = p;
596
568
  }
597
- #line 81 "markup.rl"
569
+ #line 88 "markup.rl"
598
570
  {
599
571
  comment.begin = p;
600
572
  }
601
- #line 67 "markup.rl"
573
+ #line 74 "markup.rl"
602
574
  {
603
575
  doctype.begin = p;
604
576
  }
605
- #line 166 "markup.rl"
577
+ #line 173 "markup.rl"
606
578
  {
607
579
  cdata.begin = p;
608
580
  }
609
581
  goto st1;
610
582
  tr107:
611
- #line 170 "markup.rl"
583
+ #line 177 "markup.rl"
612
584
  {
613
585
  cdata.end = p;
614
586
 
615
587
  rb_funcall(delegate, id_cdata, 1, Trenni_token(cdata, encoding));
616
588
  }
617
- #line 122 "markup.rl"
589
+ #line 129 "markup.rl"
618
590
  {
619
591
  }
620
- #line 155 "markup.rl"
592
+ #line 162 "markup.rl"
621
593
  {
622
594
  }
623
- #line 95 "markup.rl"
595
+ #line 102 "markup.rl"
624
596
  {
625
597
  instruction.begin = p;
626
598
  }
627
- #line 81 "markup.rl"
599
+ #line 88 "markup.rl"
628
600
  {
629
601
  comment.begin = p;
630
602
  }
631
- #line 67 "markup.rl"
603
+ #line 74 "markup.rl"
632
604
  {
633
605
  doctype.begin = p;
634
606
  }
635
- #line 166 "markup.rl"
607
+ #line 173 "markup.rl"
636
608
  {
637
609
  cdata.begin = p;
638
610
  }
639
611
  goto st1;
640
612
  tr110:
641
- #line 158 "markup.rl"
613
+ #line 165 "markup.rl"
642
614
  {
643
615
  rb_funcall(delegate, id_close_tag, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
644
616
  }
645
- #line 122 "markup.rl"
617
+ #line 129 "markup.rl"
646
618
  {
647
619
  }
648
- #line 155 "markup.rl"
620
+ #line 162 "markup.rl"
649
621
  {
650
622
  }
651
- #line 95 "markup.rl"
623
+ #line 102 "markup.rl"
652
624
  {
653
625
  instruction.begin = p;
654
626
  }
655
- #line 81 "markup.rl"
627
+ #line 88 "markup.rl"
656
628
  {
657
629
  comment.begin = p;
658
630
  }
659
- #line 67 "markup.rl"
631
+ #line 74 "markup.rl"
660
632
  {
661
633
  doctype.begin = p;
662
634
  }
663
- #line 166 "markup.rl"
635
+ #line 173 "markup.rl"
664
636
  {
665
637
  cdata.begin = p;
666
638
  }
667
639
  goto st1;
668
640
  tr113:
669
- #line 105 "markup.rl"
641
+ #line 112 "markup.rl"
670
642
  {
671
643
  instruction.end = p;
672
644
 
673
645
  rb_funcall(delegate, id_instruction, 1, Trenni_token(instruction, encoding));
674
646
  }
675
- #line 122 "markup.rl"
647
+ #line 129 "markup.rl"
676
648
  {
677
649
  }
678
- #line 155 "markup.rl"
650
+ #line 162 "markup.rl"
679
651
  {
680
652
  }
681
- #line 95 "markup.rl"
653
+ #line 102 "markup.rl"
682
654
  {
683
655
  instruction.begin = p;
684
656
  }
685
- #line 81 "markup.rl"
657
+ #line 88 "markup.rl"
686
658
  {
687
659
  comment.begin = p;
688
660
  }
689
- #line 67 "markup.rl"
661
+ #line 74 "markup.rl"
690
662
  {
691
663
  doctype.begin = p;
692
664
  }
693
- #line 166 "markup.rl"
665
+ #line 173 "markup.rl"
694
666
  {
695
667
  cdata.begin = p;
696
668
  }
@@ -699,7 +671,7 @@ st1:
699
671
  if ( ++p == pe )
700
672
  goto _test_eof1;
701
673
  case 1:
702
- #line 703 "markup.c"
674
+ #line 675 "markup.c"
703
675
  switch( (*p) ) {
704
676
  case 33: goto st15;
705
677
  case 47: goto st36;
@@ -728,7 +700,7 @@ st2:
728
700
  if ( ++p == pe )
729
701
  goto _test_eof2;
730
702
  case 2:
731
- #line 732 "markup.c"
703
+ #line 704 "markup.c"
732
704
  switch( (*p) ) {
733
705
  case 32: goto tr6;
734
706
  case 47: goto tr7;
@@ -754,24 +726,24 @@ case 2:
754
726
  goto tr1;
755
727
  goto st2;
756
728
  tr1:
757
- #line 162 "markup.rl"
729
+ #line 169 "markup.rl"
758
730
  {
759
731
  Trenni_raise_error("could not parse tag", buffer, p-s);
760
732
  }
761
733
  goto st0;
762
734
  tr69:
763
- #line 111 "markup.rl"
735
+ #line 118 "markup.rl"
764
736
  {
765
737
  Trenni_raise_error("could not parse instruction", buffer, p-s);
766
738
  }
767
739
  goto st0;
768
740
  tr75:
769
- #line 35 "markup.rl"
741
+ #line 42 "markup.rl"
770
742
  {
771
743
  Trenni_raise_error("could not parse entity", buffer, p-s);
772
744
  }
773
745
  goto st0;
774
- #line 775 "markup.c"
746
+ #line 747 "markup.c"
775
747
  st0:
776
748
  cs = 0;
777
749
  goto _out;
@@ -780,7 +752,7 @@ tr6:
780
752
  {
781
753
  identifier.end = p;
782
754
  }
783
- #line 115 "markup.rl"
755
+ #line 122 "markup.rl"
784
756
  {
785
757
  // Reset self-closing state - we don't know yet.
786
758
  self_closing = 0;
@@ -793,7 +765,7 @@ tr14:
793
765
  {
794
766
  identifier.end = p;
795
767
  }
796
- #line 141 "markup.rl"
768
+ #line 148 "markup.rl"
797
769
  {
798
770
  if (has_value == 1) {
799
771
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -805,11 +777,11 @@ tr14:
805
777
  }
806
778
  goto st3;
807
779
  tr26:
808
- #line 133 "markup.rl"
780
+ #line 140 "markup.rl"
809
781
  {
810
782
  has_value = 1;
811
783
  }
812
- #line 141 "markup.rl"
784
+ #line 148 "markup.rl"
813
785
  {
814
786
  if (has_value == 1) {
815
787
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -821,11 +793,11 @@ tr26:
821
793
  }
822
794
  goto st3;
823
795
  tr32:
824
- #line 137 "markup.rl"
796
+ #line 144 "markup.rl"
825
797
  {
826
798
  has_value = 2;
827
799
  }
828
- #line 141 "markup.rl"
800
+ #line 148 "markup.rl"
829
801
  {
830
802
  if (has_value == 1) {
831
803
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -840,7 +812,7 @@ st3:
840
812
  if ( ++p == pe )
841
813
  goto _test_eof3;
842
814
  case 3:
843
- #line 844 "markup.c"
815
+ #line 816 "markup.c"
844
816
  switch( (*p) ) {
845
817
  case 32: goto st3;
846
818
  case 47: goto tr11;
@@ -866,7 +838,7 @@ case 3:
866
838
  goto tr1;
867
839
  goto tr9;
868
840
  tr9:
869
- #line 129 "markup.rl"
841
+ #line 136 "markup.rl"
870
842
  {
871
843
  has_value = 0;
872
844
  }
@@ -879,7 +851,7 @@ st4:
879
851
  if ( ++p == pe )
880
852
  goto _test_eof4;
881
853
  case 4:
882
- #line 883 "markup.c"
854
+ #line 855 "markup.c"
883
855
  switch( (*p) ) {
884
856
  case 32: goto tr14;
885
857
  case 47: goto tr15;
@@ -910,20 +882,20 @@ tr7:
910
882
  {
911
883
  identifier.end = p;
912
884
  }
913
- #line 115 "markup.rl"
885
+ #line 122 "markup.rl"
914
886
  {
915
887
  // Reset self-closing state - we don't know yet.
916
888
  self_closing = 0;
917
889
 
918
890
  rb_funcall(delegate, id_open_tag_begin, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
919
891
  }
920
- #line 125 "markup.rl"
892
+ #line 132 "markup.rl"
921
893
  {
922
894
  self_closing = 1;
923
895
  }
924
896
  goto st5;
925
897
  tr11:
926
- #line 125 "markup.rl"
898
+ #line 132 "markup.rl"
927
899
  {
928
900
  self_closing = 1;
929
901
  }
@@ -933,7 +905,7 @@ tr15:
933
905
  {
934
906
  identifier.end = p;
935
907
  }
936
- #line 141 "markup.rl"
908
+ #line 148 "markup.rl"
937
909
  {
938
910
  if (has_value == 1) {
939
911
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -943,17 +915,17 @@ tr15:
943
915
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), Qtrue);
944
916
  }
945
917
  }
946
- #line 125 "markup.rl"
918
+ #line 132 "markup.rl"
947
919
  {
948
920
  self_closing = 1;
949
921
  }
950
922
  goto st5;
951
923
  tr27:
952
- #line 133 "markup.rl"
924
+ #line 140 "markup.rl"
953
925
  {
954
926
  has_value = 1;
955
927
  }
956
- #line 141 "markup.rl"
928
+ #line 148 "markup.rl"
957
929
  {
958
930
  if (has_value == 1) {
959
931
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -963,17 +935,17 @@ tr27:
963
935
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), Qtrue);
964
936
  }
965
937
  }
966
- #line 125 "markup.rl"
938
+ #line 132 "markup.rl"
967
939
  {
968
940
  self_closing = 1;
969
941
  }
970
942
  goto st5;
971
943
  tr33:
972
- #line 137 "markup.rl"
944
+ #line 144 "markup.rl"
973
945
  {
974
946
  has_value = 2;
975
947
  }
976
- #line 141 "markup.rl"
948
+ #line 148 "markup.rl"
977
949
  {
978
950
  if (has_value == 1) {
979
951
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -983,7 +955,7 @@ tr33:
983
955
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), Qtrue);
984
956
  }
985
957
  }
986
- #line 125 "markup.rl"
958
+ #line 132 "markup.rl"
987
959
  {
988
960
  self_closing = 1;
989
961
  }
@@ -992,7 +964,7 @@ st5:
992
964
  if ( ++p == pe )
993
965
  goto _test_eof5;
994
966
  case 5:
995
- #line 996 "markup.c"
967
+ #line 968 "markup.c"
996
968
  if ( (*p) == 62 )
997
969
  goto st51;
998
970
  goto tr1;
@@ -1001,7 +973,7 @@ tr8:
1001
973
  {
1002
974
  identifier.end = p;
1003
975
  }
1004
- #line 115 "markup.rl"
976
+ #line 122 "markup.rl"
1005
977
  {
1006
978
  // Reset self-closing state - we don't know yet.
1007
979
  self_closing = 0;
@@ -1014,7 +986,7 @@ tr17:
1014
986
  {
1015
987
  identifier.end = p;
1016
988
  }
1017
- #line 141 "markup.rl"
989
+ #line 148 "markup.rl"
1018
990
  {
1019
991
  if (has_value == 1) {
1020
992
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -1026,11 +998,11 @@ tr17:
1026
998
  }
1027
999
  goto st51;
1028
1000
  tr28:
1029
- #line 133 "markup.rl"
1001
+ #line 140 "markup.rl"
1030
1002
  {
1031
1003
  has_value = 1;
1032
1004
  }
1033
- #line 141 "markup.rl"
1005
+ #line 148 "markup.rl"
1034
1006
  {
1035
1007
  if (has_value == 1) {
1036
1008
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -1042,11 +1014,11 @@ tr28:
1042
1014
  }
1043
1015
  goto st51;
1044
1016
  tr34:
1045
- #line 137 "markup.rl"
1017
+ #line 144 "markup.rl"
1046
1018
  {
1047
1019
  has_value = 2;
1048
1020
  }
1049
- #line 141 "markup.rl"
1021
+ #line 148 "markup.rl"
1050
1022
  {
1051
1023
  if (has_value == 1) {
1052
1024
  rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
@@ -1061,7 +1033,7 @@ st51:
1061
1033
  if ( ++p == pe )
1062
1034
  goto _test_eof51;
1063
1035
  case 51:
1064
- #line 1065 "markup.c"
1036
+ #line 1037 "markup.c"
1065
1037
  switch( (*p) ) {
1066
1038
  case 38: goto tr97;
1067
1039
  case 60: goto tr98;
@@ -1077,7 +1049,7 @@ st6:
1077
1049
  if ( ++p == pe )
1078
1050
  goto _test_eof6;
1079
1051
  case 6:
1080
- #line 1081 "markup.c"
1052
+ #line 1053 "markup.c"
1081
1053
  switch( (*p) ) {
1082
1054
  case 34: goto st7;
1083
1055
  case 39: goto st12;
@@ -1098,25 +1070,13 @@ tr20:
1098
1070
  {
1099
1071
  pcdata = Qnil;
1100
1072
  }
1101
- #line 25 "markup.rl"
1102
- {
1103
- characters.begin = p;
1104
- }
1105
- goto st8;
1106
- tr23:
1107
- #line 29 "markup.rl"
1108
- {
1109
- characters.end = p;
1110
-
1111
- Trenni_append_token(&pcdata, encoding, characters);
1112
- }
1113
- #line 25 "markup.rl"
1073
+ #line 32 "markup.rl"
1114
1074
  {
1115
1075
  characters.begin = p;
1116
1076
  }
1117
1077
  goto st8;
1118
1078
  tr29:
1119
- #line 25 "markup.rl"
1079
+ #line 32 "markup.rl"
1120
1080
  {
1121
1081
  characters.begin = p;
1122
1082
  }
@@ -1125,15 +1085,15 @@ st8:
1125
1085
  if ( ++p == pe )
1126
1086
  goto _test_eof8;
1127
1087
  case 8:
1128
- #line 1129 "markup.c"
1088
+ #line 1089 "markup.c"
1129
1089
  switch( (*p) ) {
1130
1090
  case 34: goto tr24;
1131
1091
  case 38: goto tr25;
1132
1092
  case 60: goto tr1;
1133
1093
  }
1134
- goto tr23;
1094
+ goto st8;
1135
1095
  tr24:
1136
- #line 29 "markup.rl"
1096
+ #line 36 "markup.rl"
1137
1097
  {
1138
1098
  characters.end = p;
1139
1099
 
@@ -1152,7 +1112,7 @@ st9:
1152
1112
  if ( ++p == pe )
1153
1113
  goto _test_eof9;
1154
1114
  case 9:
1155
- #line 1156 "markup.c"
1115
+ #line 1116 "markup.c"
1156
1116
  switch( (*p) ) {
1157
1117
  case 32: goto tr26;
1158
1118
  case 47: goto tr27;
@@ -1170,7 +1130,7 @@ tr22:
1170
1130
  {{stack[top++] = 10; goto st42;}}
1171
1131
  goto st10;
1172
1132
  tr25:
1173
- #line 29 "markup.rl"
1133
+ #line 36 "markup.rl"
1174
1134
  {
1175
1135
  characters.end = p;
1176
1136
 
@@ -1187,7 +1147,7 @@ st10:
1187
1147
  if ( ++p == pe )
1188
1148
  goto _test_eof10;
1189
1149
  case 10:
1190
- #line 1191 "markup.c"
1150
+ #line 1151 "markup.c"
1191
1151
  switch( (*p) ) {
1192
1152
  case 34: goto tr30;
1193
1153
  case 38: goto tr31;
@@ -1221,25 +1181,13 @@ tr35:
1221
1181
  {
1222
1182
  pcdata = Qnil;
1223
1183
  }
1224
- #line 25 "markup.rl"
1225
- {
1226
- characters.begin = p;
1227
- }
1228
- goto st13;
1229
- tr37:
1230
- #line 29 "markup.rl"
1231
- {
1232
- characters.end = p;
1233
-
1234
- Trenni_append_token(&pcdata, encoding, characters);
1235
- }
1236
- #line 25 "markup.rl"
1184
+ #line 32 "markup.rl"
1237
1185
  {
1238
1186
  characters.begin = p;
1239
1187
  }
1240
1188
  goto st13;
1241
1189
  tr39:
1242
- #line 25 "markup.rl"
1190
+ #line 32 "markup.rl"
1243
1191
  {
1244
1192
  characters.begin = p;
1245
1193
  }
@@ -1248,13 +1196,13 @@ st13:
1248
1196
  if ( ++p == pe )
1249
1197
  goto _test_eof13;
1250
1198
  case 13:
1251
- #line 1252 "markup.c"
1199
+ #line 1200 "markup.c"
1252
1200
  switch( (*p) ) {
1253
1201
  case 38: goto tr38;
1254
1202
  case 39: goto tr24;
1255
1203
  case 60: goto tr1;
1256
1204
  }
1257
- goto tr37;
1205
+ goto st13;
1258
1206
  tr36:
1259
1207
  #line 18 "markup.rl"
1260
1208
  {
@@ -1264,7 +1212,7 @@ tr36:
1264
1212
  {{stack[top++] = 14; goto st42;}}
1265
1213
  goto st14;
1266
1214
  tr38:
1267
- #line 29 "markup.rl"
1215
+ #line 36 "markup.rl"
1268
1216
  {
1269
1217
  characters.end = p;
1270
1218
 
@@ -1281,7 +1229,7 @@ st14:
1281
1229
  if ( ++p == pe )
1282
1230
  goto _test_eof14;
1283
1231
  case 14:
1284
- #line 1285 "markup.c"
1232
+ #line 1233 "markup.c"
1285
1233
  switch( (*p) ) {
1286
1234
  case 38: goto tr40;
1287
1235
  case 39: goto tr30;
@@ -1499,7 +1447,7 @@ st37:
1499
1447
  if ( ++p == pe )
1500
1448
  goto _test_eof37;
1501
1449
  case 37:
1502
- #line 1503 "markup.c"
1450
+ #line 1451 "markup.c"
1503
1451
  switch( (*p) ) {
1504
1452
  case 47: goto tr1;
1505
1453
  case 62: goto tr67;
@@ -1527,7 +1475,7 @@ st55:
1527
1475
  if ( ++p == pe )
1528
1476
  goto _test_eof55;
1529
1477
  case 55:
1530
- #line 1531 "markup.c"
1478
+ #line 1479 "markup.c"
1531
1479
  switch( (*p) ) {
1532
1480
  case 38: goto tr109;
1533
1481
  case 60: goto tr110;
@@ -1563,7 +1511,7 @@ st39:
1563
1511
  if ( ++p == pe )
1564
1512
  goto _test_eof39;
1565
1513
  case 39:
1566
- #line 1567 "markup.c"
1514
+ #line 1515 "markup.c"
1567
1515
  switch( (*p) ) {
1568
1516
  case 32: goto tr71;
1569
1517
  case 47: goto tr69;
@@ -1592,7 +1540,7 @@ tr71:
1592
1540
  {
1593
1541
  identifier.end = p;
1594
1542
  }
1595
- #line 99 "markup.rl"
1543
+ #line 106 "markup.rl"
1596
1544
  {
1597
1545
  }
1598
1546
  goto st40;
@@ -1600,12 +1548,12 @@ st40:
1600
1548
  if ( ++p == pe )
1601
1549
  goto _test_eof40;
1602
1550
  case 40:
1603
- #line 1604 "markup.c"
1551
+ #line 1552 "markup.c"
1604
1552
  if ( (*p) == 63 )
1605
1553
  goto tr73;
1606
1554
  goto st40;
1607
1555
  tr73:
1608
- #line 102 "markup.rl"
1556
+ #line 109 "markup.rl"
1609
1557
  {
1610
1558
  }
1611
1559
  goto st41;
@@ -1613,7 +1561,7 @@ st41:
1613
1561
  if ( ++p == pe )
1614
1562
  goto _test_eof41;
1615
1563
  case 41:
1616
- #line 1617 "markup.c"
1564
+ #line 1565 "markup.c"
1617
1565
  switch( (*p) ) {
1618
1566
  case 62: goto st56;
1619
1567
  case 63: goto tr73;
@@ -1653,7 +1601,7 @@ case 43:
1653
1601
  goto tr78;
1654
1602
  goto tr75;
1655
1603
  tr78:
1656
- #line 39 "markup.rl"
1604
+ #line 46 "markup.rl"
1657
1605
  {
1658
1606
  entity.begin = p;
1659
1607
  }
@@ -1662,14 +1610,14 @@ st44:
1662
1610
  if ( ++p == pe )
1663
1611
  goto _test_eof44;
1664
1612
  case 44:
1665
- #line 1666 "markup.c"
1613
+ #line 1614 "markup.c"
1666
1614
  if ( (*p) == 59 )
1667
1615
  goto tr81;
1668
1616
  if ( 48 <= (*p) && (*p) <= 57 )
1669
1617
  goto st44;
1670
1618
  goto tr75;
1671
1619
  tr81:
1672
- #line 59 "markup.rl"
1620
+ #line 66 "markup.rl"
1673
1621
  {
1674
1622
  entity.end = p;
1675
1623
 
@@ -1681,7 +1629,7 @@ tr81:
1681
1629
  {{cs = stack[--top];goto _again;}}
1682
1630
  goto st57;
1683
1631
  tr84:
1684
- #line 51 "markup.rl"
1632
+ #line 58 "markup.rl"
1685
1633
  {
1686
1634
  entity.end = p;
1687
1635
 
@@ -1693,12 +1641,12 @@ tr84:
1693
1641
  {{cs = stack[--top];goto _again;}}
1694
1642
  goto st57;
1695
1643
  tr86:
1696
- #line 43 "markup.rl"
1644
+ #line 50 "markup.rl"
1697
1645
  {
1698
1646
  entity.end = p;
1699
1647
 
1700
1648
  Trenni_append_string(&pcdata, encoding,
1701
- rb_funcall(entities, rb_intern("[]"), 1, Trenni_token(entity, encoding))
1649
+ rb_funcall(entities, id_key_get, 1, Trenni_token(entity, encoding))
1702
1650
  );
1703
1651
  }
1704
1652
  #line 8 "/Users/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/entities.rl"
@@ -1708,7 +1656,7 @@ st57:
1708
1656
  if ( ++p == pe )
1709
1657
  goto _test_eof57;
1710
1658
  case 57:
1711
- #line 1712 "markup.c"
1659
+ #line 1660 "markup.c"
1712
1660
  goto st0;
1713
1661
  st45:
1714
1662
  if ( ++p == pe )
@@ -1724,7 +1672,7 @@ case 45:
1724
1672
  goto tr82;
1725
1673
  goto tr75;
1726
1674
  tr82:
1727
- #line 39 "markup.rl"
1675
+ #line 46 "markup.rl"
1728
1676
  {
1729
1677
  entity.begin = p;
1730
1678
  }
@@ -1733,7 +1681,7 @@ st46:
1733
1681
  if ( ++p == pe )
1734
1682
  goto _test_eof46;
1735
1683
  case 46:
1736
- #line 1737 "markup.c"
1684
+ #line 1685 "markup.c"
1737
1685
  if ( (*p) == 59 )
1738
1686
  goto tr84;
1739
1687
  if ( (*p) < 65 ) {
@@ -1746,7 +1694,7 @@ case 46:
1746
1694
  goto st46;
1747
1695
  goto tr75;
1748
1696
  tr77:
1749
- #line 39 "markup.rl"
1697
+ #line 46 "markup.rl"
1750
1698
  {
1751
1699
  entity.begin = p;
1752
1700
  }
@@ -1755,7 +1703,7 @@ st47:
1755
1703
  if ( ++p == pe )
1756
1704
  goto _test_eof47;
1757
1705
  case 47:
1758
- #line 1759 "markup.c"
1706
+ #line 1707 "markup.c"
1759
1707
  if ( (*p) == 59 )
1760
1708
  goto tr86;
1761
1709
  if ( (*p) < 65 ) {
@@ -1836,13 +1784,13 @@ case 47:
1836
1784
  case 45:
1837
1785
  case 46:
1838
1786
  case 47:
1839
- #line 35 "markup.rl"
1787
+ #line 42 "markup.rl"
1840
1788
  {
1841
1789
  Trenni_raise_error("could not parse entity", buffer, p-s);
1842
1790
  }
1843
1791
  break;
1844
1792
  case 53:
1845
- #line 71 "markup.rl"
1793
+ #line 78 "markup.rl"
1846
1794
  {
1847
1795
  doctype.end = p;
1848
1796
 
@@ -1850,13 +1798,13 @@ case 47:
1850
1798
  }
1851
1799
  break;
1852
1800
  case 26:
1853
- #line 77 "markup.rl"
1801
+ #line 84 "markup.rl"
1854
1802
  {
1855
1803
  Trenni_raise_error("could not parse doctype", buffer, p-s);
1856
1804
  }
1857
1805
  break;
1858
1806
  case 52:
1859
- #line 85 "markup.rl"
1807
+ #line 92 "markup.rl"
1860
1808
  {
1861
1809
  comment.end = p;
1862
1810
 
@@ -1866,13 +1814,13 @@ case 47:
1866
1814
  case 17:
1867
1815
  case 18:
1868
1816
  case 19:
1869
- #line 91 "markup.rl"
1817
+ #line 98 "markup.rl"
1870
1818
  {
1871
1819
  Trenni_raise_error("could not parse comment", buffer, p-s);
1872
1820
  }
1873
1821
  break;
1874
1822
  case 56:
1875
- #line 105 "markup.rl"
1823
+ #line 112 "markup.rl"
1876
1824
  {
1877
1825
  instruction.end = p;
1878
1826
 
@@ -1883,19 +1831,19 @@ case 47:
1883
1831
  case 39:
1884
1832
  case 40:
1885
1833
  case 41:
1886
- #line 111 "markup.rl"
1834
+ #line 118 "markup.rl"
1887
1835
  {
1888
1836
  Trenni_raise_error("could not parse instruction", buffer, p-s);
1889
1837
  }
1890
1838
  break;
1891
1839
  case 51:
1892
- #line 151 "markup.rl"
1840
+ #line 158 "markup.rl"
1893
1841
  {
1894
1842
  rb_funcall(delegate, id_open_tag_end, 1, self_closing == 1 ? Qtrue : Qfalse);
1895
1843
  }
1896
1844
  break;
1897
1845
  case 55:
1898
- #line 158 "markup.rl"
1846
+ #line 165 "markup.rl"
1899
1847
  {
1900
1848
  rb_funcall(delegate, id_close_tag, 2, Trenni_token(identifier, encoding), ULONG2NUM(identifier.begin-s));
1901
1849
  }
@@ -1916,13 +1864,13 @@ case 47:
1916
1864
  case 14:
1917
1865
  case 36:
1918
1866
  case 37:
1919
- #line 162 "markup.rl"
1867
+ #line 169 "markup.rl"
1920
1868
  {
1921
1869
  Trenni_raise_error("could not parse tag", buffer, p-s);
1922
1870
  }
1923
1871
  break;
1924
1872
  case 54:
1925
- #line 170 "markup.rl"
1873
+ #line 177 "markup.rl"
1926
1874
  {
1927
1875
  cdata.end = p;
1928
1876
 
@@ -1932,7 +1880,7 @@ case 47:
1932
1880
  case 33:
1933
1881
  case 34:
1934
1882
  case 35:
1935
- #line 176 "markup.rl"
1883
+ #line 183 "markup.rl"
1936
1884
  {
1937
1885
  Trenni_raise_error("could not parse cdata", buffer, p-s);
1938
1886
  }
@@ -1941,14 +1889,13 @@ case 47:
1941
1889
  #line 22 "markup.rl"
1942
1890
  {
1943
1891
  }
1944
- #line 184 "markup.rl"
1892
+ #line 28 "markup.rl"
1945
1893
  {
1946
- // Entities are handled separately:
1947
1894
  rb_funcall(delegate, id_text, 1, pcdata);
1948
1895
  }
1949
1896
  break;
1950
1897
  case 49:
1951
- #line 29 "markup.rl"
1898
+ #line 36 "markup.rl"
1952
1899
  {
1953
1900
  characters.end = p;
1954
1901
 
@@ -1957,20 +1904,19 @@ case 47:
1957
1904
  #line 22 "markup.rl"
1958
1905
  {
1959
1906
  }
1960
- #line 184 "markup.rl"
1907
+ #line 28 "markup.rl"
1961
1908
  {
1962
- // Entities are handled separately:
1963
1909
  rb_funcall(delegate, id_text, 1, pcdata);
1964
1910
  }
1965
1911
  break;
1966
- #line 1967 "markup.c"
1912
+ #line 1913 "markup.c"
1967
1913
  }
1968
1914
  }
1969
1915
 
1970
1916
  _out: {}
1971
1917
  }
1972
1918
 
1973
- #line 216 "markup.rl"
1919
+ #line 214 "markup.rl"
1974
1920
 
1975
1921
 
1976
1922
  if (p != eof) {