1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
|
host( "working/clang4_cs.rl", 1 ) @{/*
* @@LANG: csharp
* @@GENERATED: true
*/
using System;
// Disables lots of warnings that appear in the test suite
#pragma warning disable 0168, 0169, 0219, 0162, 0414
namespace Test {
class Test
{
int pos;
int line;
}@
array s8 _clang_eof_actions( 0, 26 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 10, 6, 14, 18, 22, 14, 26, 0 };
array s8 _clang_nfa_targs( 0, 0 ) = { 0, 0 };
array s8 _clang_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
array s8 _clang_nfa_push_actions( 0, 0 ) = { 0, 0 };
array s8 _clang_nfa_pop_trans( 0, 0 ) = { 0, 0 };
value int clang_start = 10;
value int clang_first_final = 10;
value int clang_error = 0;
value int clang_en_main = 10;
host( "working/clang4_cs.rl", 123 ) @{
int cs;
void init()
{
pos = 0;
line = 1;
}@
{
cs = cast(int)clang_start;
}
host( "working/clang4_cs.rl", 130 ) @{
}
void exec( char[] data, int len )
{
int p = 0;
int pe = len;
int eof = len;
string _s;
char [] buffer = new char [1024];
int blen = 0;
}@
{
if ( p == pe )
goto _test_eof;
if ( cs == 0 )
goto _out;
_resume:
switch ( cs ) {
case 10:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr13;
}
case c(34): {
goto ctr17;
}
case c(39): {
goto ctr18;
}
case c(47): {
goto ctr19;
}
case c(48): {
goto ctr20;
}
case c(95): {
goto ctr22;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(49) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr16;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr16;
}
} else {
goto ctr21;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr16;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr16;
}
} else {
goto ctr22;
}
} else {
goto ctr22;
}
{
goto ctr11;
}
case 11:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr24;
}
case c(34): {
goto ctr26;
}
case c(39): {
goto ctr27;
}
case c(47): {
goto ctr28;
}
case c(48): {
goto ctr29;
}
case c(95): {
goto ctr31;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(49) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr25;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr25;
}
} else {
goto ctr30;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr25;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr25;
}
} else {
goto ctr31;
}
} else {
goto ctr31;
}
{
goto ctr23;
}
case 1:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr1;
}
case c(34): {
goto ctr2;
}
case c(92): {
goto ctr3;
}
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr0;
}
{
goto ctr4;
}
case 12:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr33;
}
case c(34): {
goto ctr35;
}
case c(39): {
goto ctr36;
}
case c(47): {
goto ctr37;
}
case c(48): {
goto ctr38;
}
case c(95): {
goto ctr40;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(49) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr34;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr34;
}
} else {
goto ctr39;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr34;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr34;
}
} else {
goto ctr40;
}
} else {
goto ctr40;
}
{
goto ctr32;
}
case 2:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr6;
}
case c(39): {
goto ctr2;
}
case c(92): {
goto ctr7;
}
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr5;
}
{
goto ctr4;
}
case 3:
if ( ( deref( data, p )) == c(10) ) {
goto ctr6;
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr5;
}
{
goto ctr4;
}
case 0:
goto _out;
case 13:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr24;
}
case c(33): {
goto ctr8;
}
case c(34): {
goto ctr26;
}
case c(39): {
goto ctr27;
}
case c(47): {
goto ctr12;
}
case c(48): {
goto ctr29;
}
case c(95): {
goto ctr31;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(49) ) {
if ( c(35) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr25;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr25;
}
} else {
goto ctr30;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr25;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr25;
}
} else {
goto ctr31;
}
} else {
goto ctr31;
}
{
goto ctr23;
}
case 4:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr9;
}
case c(33): {
goto ctr10;
}
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr8;
}
{
goto ctr4;
}
case 5:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr9;
}
case c(33): {
goto ctr10;
}
case c(47): {
goto ctr11;
}
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr8;
}
{
goto ctr4;
}
case 6:
if ( ( deref( data, p )) == c(10) ) {
goto ctr13;
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr12;
}
{
goto ctr4;
}
case 14:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr42;
}
case c(34): {
goto ctr44;
}
case c(39): {
goto ctr45;
}
case c(46): {
goto ctr46;
}
case c(47): {
goto ctr47;
}
case c(95): {
goto ctr49;
}
case c(120): {
goto ctr50;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(48) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(45) ) {
goto ctr43;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr43;
}
} else {
goto ctr48;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr43;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr43;
}
} else {
goto ctr49;
}
} else {
goto ctr49;
}
{
goto ctr41;
}
case 7:
if ( c(48) <= ( deref( data, p )) && ( deref( data, p )) <= c(57) ) {
goto ctr14;
}
{
goto ctr4;
}
case 15:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr52;
}
case c(34): {
goto ctr54;
}
case c(39): {
goto ctr55;
}
case c(47): {
goto ctr56;
}
case c(95): {
goto ctr57;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(48) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr53;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr53;
}
} else {
goto ctr14;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr53;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr53;
}
} else {
goto ctr57;
}
} else {
goto ctr57;
}
{
goto ctr51;
}
case 16:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr59;
}
case c(34): {
goto ctr61;
}
case c(39): {
goto ctr62;
}
case c(47): {
goto ctr63;
}
case c(95): {
goto ctr64;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(48) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr60;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr60;
}
} else {
goto ctr64;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr60;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr60;
}
} else {
goto ctr64;
}
} else {
goto ctr64;
}
{
goto ctr58;
}
case 17:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr42;
}
case c(34): {
goto ctr44;
}
case c(39): {
goto ctr45;
}
case c(46): {
goto ctr46;
}
case c(47): {
goto ctr47;
}
case c(95): {
goto ctr49;
}
}
if ( ( deref( data, p )) < c(65) ) {
if ( ( deref( data, p )) < c(48) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(45) ) {
goto ctr43;
}
} else if ( ( deref( data, p )) > c(57) ) {
{
goto ctr43;
}
} else {
goto ctr48;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr43;
}
} else if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr43;
}
} else {
goto ctr49;
}
} else {
goto ctr49;
}
{
goto ctr41;
}
case 8:
if ( ( deref( data, p )) < c(65) ) {
if ( c(48) <= ( deref( data, p )) && ( deref( data, p )) <= c(57) ) {
goto ctr15;
}
} else if ( ( deref( data, p )) > c(70) ) {
if ( c(97) <= ( deref( data, p )) && ( deref( data, p )) <= c(102) ) {
goto ctr15;
}
} else {
goto ctr15;
}
{
goto ctr4;
}
case 18:
switch( ( deref( data, p )) ) {
case c(10): {
goto ctr66;
}
case c(34): {
goto ctr68;
}
case c(39): {
goto ctr69;
}
case c(47): {
goto ctr70;
}
case c(95): {
goto ctr72;
}
}
if ( ( deref( data, p )) < c(71) ) {
if ( ( deref( data, p )) < c(48) ) {
if ( c(33) <= ( deref( data, p )) && ( deref( data, p )) <= c(46) ) {
goto ctr67;
}
} else if ( ( deref( data, p )) > c(57) ) {
if ( ( deref( data, p )) > c(64) ) {
{
goto ctr71;
}
} else {
goto ctr67;
}
} else {
goto ctr71;
}
} else if ( ( deref( data, p )) > c(90) ) {
if ( ( deref( data, p )) < c(97) ) {
{
goto ctr67;
}
} else if ( ( deref( data, p )) > c(102) ) {
if ( ( deref( data, p )) > c(122) ) {
if ( ( deref( data, p )) <= c(126) ) {
goto ctr67;
}
} else {
goto ctr72;
}
} else {
goto ctr71;
}
} else {
goto ctr72;
}
{
goto ctr65;
}
case 9:
if ( ( deref( data, p )) == c(10) ) {
goto ctr1;
}
if ( ( deref( data, p )) <= c(255) ) {
goto ctr0;
}
{
goto ctr4;
}
}
ctr4: cs = 0; goto _again;
ctr0: cs = 1; goto f0;
ctr1: cs = 1; goto f1;
ctr17: cs = 1; goto f4;
ctr26: cs = 1; goto f8;
ctr35: cs = 1; goto f12;
ctr44: cs = 1; goto f16;
ctr54: cs = 1; goto f20;
ctr61: cs = 1; goto f24;
ctr68: cs = 1; goto f28;
ctr5: cs = 2; goto f0;
ctr6: cs = 2; goto f1;
ctr18: cs = 2; goto f4;
ctr27: cs = 2; goto f8;
ctr36: cs = 2; goto f12;
ctr45: cs = 2; goto f16;
ctr55: cs = 2; goto f20;
ctr62: cs = 2; goto f24;
ctr69: cs = 2; goto f28;
ctr7: cs = 3; goto _again;
ctr8: cs = 4; goto _again;
ctr9: cs = 4; goto f2;
ctr10: cs = 5; goto _again;
ctr12: cs = 6; goto _again;
ctr46: cs = 7; goto f0;
ctr50: cs = 8; goto _again;
ctr3: cs = 9; goto _again;
ctr11: cs = 10; goto _again;
ctr13: cs = 10; goto f2;
ctr23: cs = 10; goto f5;
ctr24: cs = 10; goto f6;
ctr32: cs = 10; goto f9;
ctr33: cs = 10; goto f10;
ctr41: cs = 10; goto f13;
ctr42: cs = 10; goto f14;
ctr51: cs = 10; goto f17;
ctr52: cs = 10; goto f18;
ctr58: cs = 10; goto f21;
ctr59: cs = 10; goto f22;
ctr65: cs = 10; goto f25;
ctr66: cs = 10; goto f26;
ctr16: cs = 11; goto f3;
ctr25: cs = 11; goto f7;
ctr34: cs = 11; goto f11;
ctr43: cs = 11; goto f15;
ctr53: cs = 11; goto f19;
ctr60: cs = 11; goto f23;
ctr67: cs = 11; goto f27;
ctr2: cs = 12; goto _again;
ctr19: cs = 13; goto f3;
ctr28: cs = 13; goto f7;
ctr37: cs = 13; goto f11;
ctr47: cs = 13; goto f15;
ctr56: cs = 13; goto f19;
ctr63: cs = 13; goto f23;
ctr70: cs = 13; goto f27;
ctr20: cs = 14; goto f3;
ctr29: cs = 14; goto f7;
ctr38: cs = 14; goto f11;
ctr14: cs = 15; goto f0;
ctr64: cs = 16; goto f0;
ctr22: cs = 16; goto f3;
ctr31: cs = 16; goto f7;
ctr40: cs = 16; goto f11;
ctr49: cs = 16; goto f15;
ctr57: cs = 16; goto f19;
ctr72: cs = 16; goto f27;
ctr48: cs = 17; goto f0;
ctr21: cs = 17; goto f3;
ctr30: cs = 17; goto f7;
ctr39: cs = 17; goto f11;
ctr71: cs = 18; goto f0;
ctr15: cs = 18; goto f3;
f0:
host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f4:
host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f2:
host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f21:
host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f9:
host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f17:
host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f13:
host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f25:
host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f5:
host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
goto _again;
f1:
host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f3:
host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f24:
host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f22:
host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f12:
host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f10:
host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f20:
host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f18:
host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f16:
host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f14:
host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f28:
host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f26:
host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f8:
host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$
goto _again;
f6:
host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
}$
goto _again;
f23:
host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f11:
host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f19:
host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f15:
host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f27:
host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
f7:
host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
}$ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
}$
goto _again;
_again:
if ( cs == 0 )
goto _out;
p+= 1;
if ( p != pe )
goto _resume;
_test_eof: {}
if ( p == eof )
{
switch ( _clang_eof_actions[cs] ) {
case 22{
host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
case 10{
host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
case 18{
host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
case 14{
host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
case 26{
host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
case 6{
host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
);Console.Write( "\n" );}$
}
}
}
_out: {}
}
host( "working/clang4_cs.rl", 141 ) @{
}
void finish( )
{
if ( cs >= clang_first_final )
Console.WriteLine( "ACCEPT" );
else
Console.WriteLine( "FAIL" );
}
static readonly string[] inp = {
"999 0xaAFF99 99.99 /!\n!/ 'lksdj' //\n\"\n\nliteral\n\n\n\"0x00aba foobardd.ddsf 0x0.9\n",
"wordwithnum00asdf\n000wordfollowsnum,makes new symbol\n\nfinishing early /! unfinished ...\n",
};
static readonly int inplen = 2;
public static void Main (string[] args)
{
Test machine = new Test();
for ( int i = 0; i < inplen; i++ ) {
machine.init();
machine.exec( inp[i].ToCharArray(), inp[i].Length );
machine.finish();
}
}
}
}
}@
|