summaryrefslogtreecommitdiff
path: root/test/cases/rlhc.d/case/tokstart1.cpp-C-T1--var-backend.exp
blob: d06500fd5911e86a35eb8659c197e57c316e2304 (plain)
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
#include <iostream>
#include <string.h>
using namespace std;

extern char buf[];

struct Scanner
{
	int cs, act;
	char *ts, *te;
	
	// Initialize the machine. Invokes any init statement blocks. Returns 0
	// if the machine begins in a non-accepting state and 1 if the machine
	// begins in an accepting state.
	void init( );
	
	// Execute the machine on a block of data. Returns -1 if after processing
	// the data, the machine is in the error state and can never accept, 0 if
	// the machine is in a non-accepting state and 1 if the machine is in an
	// accepting state.
	int execute( char *data, int len );
	
	// Indicate that there is no more data. Returns -1 if the machine finishes
	// in the error state and does not accept, 0 if the machine finishes
	// in any other non-accepting state and 1 if the machine finishes in an
	// accepting state.
	int finish( );
};



static const short  _Scanner_key_offsets [] = { 0, 0, 3, 3, 6, 6, 7, 11, 13, 19, 20, 22, 23, 44, 46, 49, 57, 63, 65, 75, 84, 88, 92, 96, 106, 110, 119, 126, 135, 135, 0 ,  };
static const char  _Scanner_trans_keys [] = { 10, 34, 92, 10, 39, 92, 46, 43, 45, 48, 57, 48, 57, 48, 57, 65, 70, 97, 102, 42, 42, 47, 10, 34, 39, 46, 47, 48, 76, 95, 33, 45, 49, 57, 58, 64, 65, 90, 91, 96, 97, 122, 123, 126, 33, 126, 46, 48, 57, 69, 70, 76, 101, 102, 108, 48, 57, 70, 76, 102, 108, 48, 57, 42, 47, 46, 69, 76, 85, 101, 108, 117, 120, 48, 57, 46, 69, 76, 85, 101, 108, 117, 48, 57, 76, 85, 108, 117, 76, 85, 108, 117, 76, 85, 108, 117, 76, 85, 108, 117, 48, 57, 65, 70, 97, 102, 76, 85, 108, 117, 46, 69, 76, 85, 101, 108, 117, 48, 57, 95, 48, 57, 65, 90, 97, 122, 34, 39, 95, 48, 57, 65, 90, 97, 122, 0 ,  };
static const char  _Scanner_single_lengths [] = { 0, 3, 0, 3, 0, 1, 2, 0, 0, 1, 2, 1, 7, 0, 1, 6, 4, 2, 8, 7, 4, 4, 4, 4, 4, 7, 1, 3, 0, 0, 0 ,  };
static const char  _Scanner_range_lengths [] = { 0, 0, 0, 0, 0, 0, 1, 1, 3, 0, 0, 0, 7, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 3, 0, 1, 3, 3, 0, 0, 0 ,  };
static const short  _Scanner_index_offsets [] = { 0, 0, 4, 5, 9, 10, 12, 16, 18, 22, 24, 27, 29, 44, 46, 49, 57, 63, 66, 76, 85, 90, 95, 100, 108, 113, 122, 127, 134, 135, 0 ,  };
static const char  _Scanner_trans_cond_spaces [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 ,  };
static const short  _Scanner_trans_offsets [] = { 0, 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, 0 ,  };
static const char  _Scanner_trans_lengths [] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ,  };
static const char  _Scanner_cond_keys [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,  };
static const char  _Scanner_cond_targs [] = { 12, 12, 2, 1, 1, 12, 12, 4, 3, 3, 12, 12, 7, 7, 16, 12, 16, 12, 23, 23, 23, 12, 10, 9, 10, 28, 9, 29, 11, 1, 3, 14, 17, 18, 27, 26, 12, 25, 12, 26, 12, 26, 12, 13, 12, 13, 5, 15, 12, 6, 12, 12, 6, 12, 12, 15, 12, 12, 12, 12, 12, 16, 12, 12, 12, 12, 15, 6, 21, 21, 6, 21, 21, 8, 19, 12, 15, 6, 20, 20, 6, 20, 20, 19, 12, 12, 12, 12, 12, 12, 22, 22, 22, 22, 12, 12, 12, 12, 12, 12, 24, 24, 24, 24, 23, 23, 23, 12, 12, 12, 12, 12, 12, 15, 6, 21, 21, 6, 21, 21, 25, 12, 26, 26, 26, 26, 12, 1, 3, 26, 26, 26, 26, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0 ,  };
static const char  _Scanner_cond_actions [] = { 3, 4, 0, 0, 0, 3, 5, 0, 0, 0, 7, 6, 0, 0, 0, 3, 0, 3, 0, 0, 0, 8, 0, 0, 0, 10, 0, 11, 0, 0, 0, 15, 0, 16, 17, 0, 14, 16, 14, 0, 14, 0, 14, 0, 18, 0, 0, 20, 19, 0, 22, 22, 0, 22, 22, 20, 21, 22, 22, 22, 22, 0, 21, 23, 24, 19, 20, 0, 0, 0, 0, 0, 0, 0, 26, 25, 20, 0, 0, 0, 0, 0, 0, 26, 27, 28, 28, 28, 28, 27, 0, 0, 0, 0, 25, 29, 29, 29, 29, 25, 0, 0, 0, 0, 0, 0, 0, 30, 31, 31, 31, 31, 30, 20, 0, 0, 0, 0, 0, 0, 16, 25, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 32, 0, 0, 3, 3, 3, 3, 6, 3, 3, 8, 18, 19, 21, 21, 19, 25, 27, 27, 25, 25, 30, 30, 25, 32, 32, 0 ,  };
static const char  _Scanner_to_state_actions [] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 9, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ,  };
static const char  _Scanner_from_state_actions [] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0 ,  };
static const char  _Scanner_eof_trans_indexed [] = { 0, 13, 13, 13, 13, 16, 13, 13, 18, 0, 0, 0, 0, 20, 21, 22, 22, 21, 26, 27, 27, 26, 26, 30, 30, 26, 32, 32, 0, 0, 0 ,  };
static const short  _Scanner_eof_trans_direct [] = { 0, 137, 138, 139, 140, 141, 142, 143, 144, 0, 0, 0, 0, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 0, 0, 0 ,  };
static const char  _Scanner_nfa_targs [] = { 0, 0 ,  };
static const char  _Scanner_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,  };
static const char  _Scanner_nfa_push_actions [] = { 0, 0 ,  };
static const char  _Scanner_nfa_pop_trans [] = { 0, 0 ,  };
static const int  Scanner_start  = 12;
static const int  Scanner_first_final  = 12;
static const int  Scanner_error  = 0;
static const int  Scanner_en_c_comm  = 9;
static const int  Scanner_en_cxx_comm  = 11;
static const int  Scanner_en_main  = 12;
void Scanner::init( )
{

	{
		cs = ( int ) Scanner_start;
		ts = 0;
		te = 0;
		act = 0;
	}
}

int Scanner::execute( char *data, int len )
{
	char *p = data;
	char *pe = data + len;
	char *eof = pe;
	
	
	{
		int _klen;
		const char  *_keys;
		const char  *_ckeys;
		int _cpc;
		unsigned int _trans;
		unsigned int _cond = 0;
		unsigned int _have = 0;
		unsigned int _cont = 1;
		while ( _cont == 1  )
		{
		
			if ( cs == 0  )
			_cont = 0;
			
			_have = 0;
			if ( p == pe  )
			{
				if ( p == eof  )
				{
					if ( _Scanner_eof_trans_direct[cs]> 0  )
					{
						_trans = ( unsigned int  ) _Scanner_eof_trans_direct[cs]- 1;
						_cond = ( unsigned int  ) _Scanner_trans_offsets[_trans];
						_have = 1;
					}
					
					if ( _have == 0  )
					{
					}
					
				}
				
				
				if ( _have == 0  )
				_cont = 0;
				
			}
			
			if ( _cont == 1  )
			{
				if ( _have == 0  )
				{
					switch ( _Scanner_from_state_actions[cs] ) {
						case 2 :
						{
							cout << "from: fc = ";
							if ( (((*( p  ))
							)) == '\'' )
							cout << (int)(((*( p  ))
							));
							else
							cout << (((*( p  ))
							));
							cout << " ts = " << ( ts == 0 ? -1 : ts-buf ) << endl;
							
						}
						
						break;
						case 13 :
						{
							{
								ts = p;
								
							}
							
						}
						{
							cout << "from: fc = ";
							if ( (((*( p  ))
							)) == '\'' )
							cout << (int)(((*( p  ))
							));
							else
							cout << (((*( p  ))
							));
							cout << " ts = " << ( ts == 0 ? -1 : ts-buf ) << endl;
							
						}
						
						break;
						
					}
					_keys = _Scanner_trans_keys + _Scanner_key_offsets[cs];
					_trans = ( unsigned int  ) _Scanner_index_offsets[cs];
					_have = 0;
					_klen = ( int ) _Scanner_single_lengths[cs];
					if ( _klen > 0  )
					{
						const char  *_lower;
						const char  *_mid;
						const char  *_upper;
						_lower = _keys;
						_upper = _keys + _klen - 1;
						while ( _upper >= _lower && _have == 0  )
						{
							_mid = _lower + ((_upper-_lower)>> 1);
							if ( ((*( p  ))
							)< (*( _mid  ))
							)
							_upper = _mid - 1;
							
							else if ( ((*( p  ))
							)> (*( _mid  ))
							)
							_lower = _mid + 1;
							
							else
							{
								_trans += ( unsigned int  ) (_mid - _keys);
								_have = 1;
							}
							
						}
						
						if ( _have == 0  )
						{
							_keys += _klen;
							_trans += ( unsigned int  ) _klen;
						}
						
					}
					
					
					if ( _have == 0  )
					{
						_klen = ( int ) _Scanner_range_lengths[cs];
						if ( _klen > 0  )
						{
							const char  *_lower;
							const char  *_mid;
							const char  *_upper;
							_lower = _keys;
							_upper = _keys + (_klen<<1)- 2;
							while ( _have == 0 && _lower <= _upper  )
							{
								_mid = _lower + (((_upper-_lower)>> 1)& ~1);
								if ( ((*( p  ))
								)< (*( _mid  ))
								)
								_upper = _mid - 2;
								
								else if ( ((*( p  ))
								)> (*( _mid + 1  ))
								)
								_lower = _mid + 2;
								
								else
								{
									_trans += ( unsigned int  ) ((_mid - _keys)>>1);
									_have = 1;
								}
								
							}
							
							if ( _have == 0  )
							_trans += ( unsigned int  ) _klen;
							
						}
						
					}
					
					
					_ckeys = _Scanner_cond_keys + _Scanner_trans_offsets[_trans];
					_klen = ( int ) _Scanner_trans_lengths[_trans];
					_cond = ( unsigned int  ) _Scanner_trans_offsets[_trans];
					_have = 0;
					_cpc = 0;
					{
						const char  *_lower;
						const char  *_mid;
						const char  *_upper;
						_lower = _ckeys;
						_upper = _ckeys + _klen - 1;
						while ( _have == 0 && _lower <= _upper  )
						{
							_mid = _lower + ((_upper-_lower)>> 1);
							if ( _cpc < ( int ) (*( _mid  ))
							)
							_upper = _mid - 1;
							
							else if ( _cpc > ( int ) (*( _mid  ))
							)
							_lower = _mid + 1;
							
							else
							{
								_cond += ( unsigned int  ) (_mid - _ckeys);
								_have = 1;
							}
							
						}
						
						if ( _have == 0  )
						{
							cs = 0;
							_cont = 0;
						}
						
					}
				}
				
				if ( _cont == 1  )
				{
					cs = ( int ) _Scanner_cond_targs[_cond];
					switch ( _Scanner_cond_actions[_cond] ) {
						case 10 :
						{
							{
								cs = 12;
								
							}
							
						}
						
						break;
						case 11 :
						{
							{
								cs = 12;
								
							}
							
						}
						
						break;
						case 15 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 5 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 4 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 22 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 29 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 28 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 31 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 7 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 14 :
						{
							{
								te = p+1;
								
							}
							
						}
						
						break;
						case 23 :
						{
							{
								te = p+1;
								{
									{
										cs = 9;
										
									}
									
								}
								
							}
							
						}
						
						break;
						case 24 :
						{
							{
								te = p+1;
								{
									{
										cs = 11;
										
									}
									
								}
								
							}
							
						}
						
						break;
						case 32 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 21 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 25 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 27 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 30 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 19 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 18 :
						{
							{
								te = p;
								p = p - 1;
								
							}
							
						}
						
						break;
						case 8 :
						{
							{
								p = ((te))-1;
								
							}
							
						}
						
						break;
						case 6 :
						{
							{
								p = ((te))-1;
								
							}
							
						}
						
						break;
						case 3 :
						{
							{
								switch ( act  ) {
									case 0 :
									{
										{
											cs = 0;
											
										}
										
									}
									
									break;
									default:
									p = ((te))-1;
									
									break;
									
								}
								
							}
							
							
						}
						
						break;
						case 17 :
						{
							{
								te = p+1;
								
							}
							
						}
						{
							{
								act = 3;
								
							}
							
						}
						
						break;
						case 20 :
						{
							{
								te = p+1;
								
							}
							
						}
						{
							{
								act = 4;
								
							}
							
						}
						
						break;
						case 16 :
						{
							{
								te = p+1;
								
							}
							
						}
						{
							{
								act = 5;
								
							}
							
						}
						
						break;
						case 26 :
						{
							{
								te = p+1;
								
							}
							
						}
						{
							{
								act = 6;
								
							}
							
						}
						
						break;
						
					}
					switch ( _Scanner_to_state_actions[cs] ) {
						case 1 :
						{
							cout << "to:   fc = ";
							if ( (((*( p  ))
							)) == '\'' )
							cout << (int)(((*( p  ))
							));
							else
							cout << (((*( p  ))
							));
							cout << " ts = " << ( ts == 0 ? -1 : ts-buf ) << endl;
							
						}
						
						break;
						case 9 :
						{
							{
								ts = 0;
								
							}
							
						}
						{
							cout << "to:   fc = ";
							if ( (((*( p  ))
							)) == '\'' )
							cout << (int)(((*( p  ))
							));
							else
							cout << (((*( p  ))
							));
							cout << " ts = " << ( ts == 0 ? -1 : ts-buf ) << endl;
							
						}
						
						break;
						case 12 :
						{
							{
								ts = 0;
								
							}
							
						}
						{
							{
								act = 0;
								
							}
							
						}
						{
							cout << "to:   fc = ";
							if ( (((*( p  ))
							)) == '\'' )
							cout << (int)(((*( p  ))
							));
							else
							cout << (((*( p  ))
							));
							cout << " ts = " << ( ts == 0 ? -1 : ts-buf ) << endl;
							
						}
						
						break;
						
					}
					if ( cs == 0  )
					_cont = 0;
					
					if ( _cont == 1  )
					p += 1;
					
				}
			}
			
		}
		
	}
	return 0;
}

int Scanner::finish( )
{
	if ( cs == Scanner_error )
	return -1;
	if ( cs >= Scanner_first_final )
	return 1;
	return 0;
}

void test( )
{
	int len = strlen( buf );
	Scanner scanner;
	
	scanner.init();
	scanner.execute( buf, len );
	if ( scanner.cs == Scanner_error ) {
		/* Machine failed before finding a token. */
		cout << "PARSE ERROR" << endl;
	}
	scanner.finish();
}

char buf[4096];

int main()
{
	strcpy( buf, 
	"a b 0.98 /*\n"
	"9 */'\\''//hi\n"
	"there\n"
	);
	test();
	return 0;
}