-
Notifications
You must be signed in to change notification settings - Fork 0
/
token.c
2838 lines (2719 loc) · 56.9 KB
/
token.c
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
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Generated by re2c 0.10.1 on Mon May 8 21:26:43 2006 */
#line 1 "token.re"
/*
* token.re
*
* $Author: why $
* $Date: 2005-09-21 07:42:51 +0800 (三, 21 9 2005) $
*
* Copyright (C) 2003 why the lucky stiff
*/
#include "syck.h"
#include "gram.h"
/*
* Allocate quoted strings in chunks
*/
#define QUOTELEN 1024
/*
* They do my bidding...
*/
#define YYCTYPE char
#define YYCURSOR parser->cursor
#define YYMARKER parser->marker
#define YYLIMIT parser->limit
#define YYTOKEN parser->token
#define YYTOKTMP parser->toktmp
#define YYLINEPTR parser->lineptr
#define YYLINECTPTR parser->linectptr
#define YYLINE parser->linect
#define YYFILL(n) syck_parser_read(parser)
/*
* Repositions the cursor at `n' offset from the token start.
* Only works in `Header' and `Document' sections.
*/
#define YYPOS(n) YYCURSOR = YYTOKEN + n
/*
* Track line numbers
*/
#define NEWLINE(ptr) YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }
/*
* I like seeing the level operations as macros...
*/
#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status )
#define POP_LEVEL() syck_parser_pop_level( parser )
#define CURRENT_LEVEL() syck_parser_current_level( parser )
/*
* Force a token next time around sycklex()
*/
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
/*
* Nice little macro to ensure we're YAML_IOPENed to the current level.
* * Only use this macro in the "Document" section *
*/
#define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \
if ( last_lvl->spaces < to_len ) \
{ \
if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
{ \
goto Document; \
} \
else \
{ \
ADD_LEVEL( to_len, syck_lvl_doc ); \
if ( reset == 1 ) YYPOS(0); \
return YAML_IOPEN; \
} \
}
/*
* Nice little macro to ensure closure of levels.
* * Only use this macro in the "Document" section *
*/
#define ENSURE_YAML_IEND(last_lvl, to_len) \
if ( last_lvl->spaces > to_len ) \
{ \
syck_parser_pop_level( parser ); \
YYPOS(0); \
return YAML_IEND; \
}
/*
* Concatenates quoted string items and manages allocation
* to the quoted string
*/
#define QUOTECAT(s, c, i, l) \
{ \
if ( i + 1 >= c ) \
{ \
c += QUOTELEN; \
S_REALLOC_N( s, char, c ); \
} \
s[i++] = l; \
s[i] = '\0'; \
}
#define QUOTECATS(s, c, i, cs, cl) \
{ \
while ( i + cl >= c ) \
{ \
c += QUOTELEN; \
S_REALLOC_N( s, char, c ); \
} \
S_MEMCPY( s + i, cs, char, cl ); \
i += cl; \
s[i] = '\0'; \
}
/*
* Tags a plain scalar with a transfer method
* * Use only in "Plain" section *
*/
#define RETURN_IMPLICIT() \
{ \
SyckNode *n = syck_alloc_str(); \
YYCURSOR = YYTOKEN; \
n->data.str->ptr = qstr; \
n->data.str->len = qidx; \
n->data.str->style = scalar_plain; \
sycklval->nodeData = n; \
if ( parser->implicit_typing == 1 ) \
{ \
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \
} \
return YAML_PLAIN; \
}
/* concat the inline characters to the plain scalar */
#define PLAIN_NOT_INL() \
if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \
{ \
YYCURSOR--; \
} \
QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
goto Plain2;
/* trim spaces off the end in case of indent */
#define PLAIN_IS_INL() \
char *walker = qstr + qidx - 1; \
while ( walker > qstr && ( *walker == '\n' || *walker == ' ' || *walker == '\t' ) ) \
{ \
qidx--; \
walker[0] = '\0'; \
walker--; \
}
/*
* Keep or chomp block?
* * Use only in "ScalarBlock" section *
*/
#define RETURN_YAML_BLOCK() \
{ \
SyckNode *n = syck_alloc_str(); \
if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
{ \
n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \
} \
else \
{ \
n->type_id = syck_strndup( "str", 3 ); \
} \
n->data.str->ptr = qstr; \
n->data.str->len = qidx; \
if ( blockType == BLOCK_LIT ) { \
n->data.str->style = scalar_literal; \
} else { \
n->data.str->style = scalar_fold; \
} \
if ( qidx > 0 ) \
{ \
if ( nlDoWhat != NL_KEEP ) \
{ \
char *fc = n->data.str->ptr + n->data.str->len - 1; \
while ( is_newline( fc ) ) fc--; \
if ( nlDoWhat != NL_CHOMP && fc < n->data.str->ptr + n->data.str->len - 1 ) \
fc += 1; \
n->data.str->len = fc - n->data.str->ptr + 1; \
} \
} \
sycklval->nodeData = n; \
return YAML_BLOCK; \
}
/*
* Handles newlines, calculates indent
*/
#define GOBBLE_UP_YAML_INDENT( ict, start ) \
char *indent = start; \
NEWLINE(indent); \
while ( indent < YYCURSOR ) \
{ \
if ( is_newline( ++indent ) ) \
{ \
NEWLINE(indent); \
} \
} \
ict = 0; \
if ( *YYCURSOR == '\0' ) \
{ \
ict = -1; \
start = YYCURSOR - 1; \
} \
else if ( *YYLINEPTR == ' ' ) \
{ \
ict = YYCURSOR - YYLINEPTR; \
}
/*
* If an indent exists at the current level, back up.
*/
#define GET_TRUE_YAML_INDENT(indt_len) \
{ \
SyckLevel *lvl_deep = CURRENT_LEVEL(); \
indt_len = lvl_deep->spaces; \
if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map ) ) \
{ \
SyckLevel *lvl_over; \
parser->lvl_idx--; \
lvl_over = CURRENT_LEVEL(); \
indt_len = lvl_over->spaces; \
parser->lvl_idx++; \
} \
}
/*
* Argjh! I hate globals! Here for syckerror() only!
*/
SyckParser *syck_parser_ptr = NULL;
/*
* Accessory funcs later in this file.
*/
void eat_comments( SyckParser * );
char escape_seq( char );
int is_newline( char *ptr );
int newline_len( char *ptr );
int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
int syckwrap();
/*
* My own re-entrant sycklex() using re2c.
* You really get used to the limited regexp.
* It's really nice to not rely on backtracking and such.
*/
int
sycklex( YYSTYPE *sycklval, SyckParser *parser )
{
switch ( parser->input_type )
{
case syck_yaml_utf8:
return sycklex_yaml_utf8( sycklval, parser );
case syck_yaml_utf16:
syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
break;
case syck_yaml_utf32:
syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
break;
case syck_bytecode_utf8:
return sycklex_bytecode_utf8( sycklval, parser );
}
return YAML_DOCSEP;
}
/*
* Parser for standard YAML [UTF-8]
*/
int
sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
int doc_level = 0;
syck_parser_ptr = parser;
if ( YYCURSOR == NULL )
{
syck_parser_read( parser );
}
if ( parser->force_token != 0 )
{
int t = parser->force_token;
parser->force_token = 0;
return t;
}
#line 315 "token.re"
if ( YYLINEPTR != YYCURSOR )
{
goto Document;
}
Header:
YYTOKEN = YYCURSOR;
#line 307 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
switch(yych){
case 0x00: goto yy7;
case 0x09:
case ' ': goto yy12;
case 0x0A: goto yy9;
case 0x0D: goto yy11;
case '#': goto yy5;
case '-': goto yy2;
case '.': goto yy4;
default: goto yy14;
}
yy2:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case '-': goto yy28;
default: goto yy3;
}
yy3:
#line 374 "token.re"
{ YYPOS(0);
goto Document;
}
#line 337 "<stdout>"
yy4:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case '.': goto yy21;
default: goto yy3;
}
yy5:
++YYCURSOR;
#line 356 "token.re"
{ eat_comments( parser );
goto Header;
}
#line 351 "<stdout>"
yy7:
++YYCURSOR;
#line 360 "token.re"
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
#line 360 "<stdout>"
yy9:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
goto yy18;
yy10:
#line 366 "token.re"
{ GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
goto Header;
}
#line 370 "<stdout>"
yy11:
yych = *++YYCURSOR;
switch(yych){
case 0x0A: goto yy17;
default: goto yy3;
}
yy12:
++YYCURSOR;
yych = *YYCURSOR;
goto yy16;
yy13:
#line 370 "token.re"
{ doc_level = YYCURSOR - YYLINEPTR;
goto Header;
}
#line 386 "<stdout>"
yy14:
yych = *++YYCURSOR;
goto yy3;
yy15:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy16:
switch(yych){
case 0x09:
case ' ': goto yy15;
default: goto yy13;
}
yy17:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy18:
switch(yych){
case 0x0A:
case ' ': goto yy17;
case 0x0D: goto yy19;
default: goto yy10;
}
yy19:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case 0x0A: goto yy17;
default: goto yy20;
}
yy20:
YYCURSOR = YYMARKER;
switch(yyaccept){
case 1: goto yy10;
case 0: goto yy3;
}
yy21:
yych = *++YYCURSOR;
switch(yych){
case '.': goto yy22;
default: goto yy20;
}
yy22:
yych = *++YYCURSOR;
switch(yych){
case 0x0A: goto yy23;
case 0x0D: goto yy27;
case ' ': goto yy25;
default: goto yy20;
}
yy23:
++YYCURSOR;
yy24:
#line 342 "token.re"
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
goto Header;
}
else
{
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
return 0;
}
#line 457 "<stdout>"
yy25:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case ' ': goto yy25;
default: goto yy24;
}
yy27:
yych = *++YYCURSOR;
switch(yych){
case 0x0A: goto yy23;
default: goto yy20;
}
yy28:
yych = *++YYCURSOR;
switch(yych){
case '-': goto yy29;
default: goto yy20;
}
yy29:
yych = *++YYCURSOR;
switch(yych){
case 0x0A: goto yy30;
case 0x0D: goto yy34;
case ' ': goto yy32;
default: goto yy20;
}
yy30:
++YYCURSOR;
yy31:
#line 328 "token.re"
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
YYPOS(3);
goto Directive;
}
else
{
ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
}
#line 503 "<stdout>"
yy32:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case ' ': goto yy32;
default: goto yy31;
}
yy34:
++YYCURSOR;
switch((yych = *YYCURSOR)) {
case 0x0A: goto yy30;
default: goto yy20;
}
}
#line 378 "token.re"
Document:
{
SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
lvl->status = syck_lvl_doc;
}
YYTOKEN = YYCURSOR;
#line 533 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
case 0x00: goto yy62;
case 0x09:
case ' ': goto yy60;
case 0x0A: goto yy37;
case 0x0D: goto yy39;
case '!': goto yy51;
case '"': goto yy55;
case '#': goto yy58;
case '&': goto yy49;
case '\'': goto yy53;
case '*': goto yy50;
case ',':
case ':': goto yy47;
case '-':
case '?': goto yy48;
case '>':
case '|': goto yy57;
case '[': goto yy41;
case ']':
case '}': goto yy45;
case '{': goto yy43;
default: goto yy64;
}
yy37:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
goto yy92;
yy38:
#line 392 "token.re"
{ /* Isolate spaces */
int indt_len;
GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
lvl = CURRENT_LEVEL();
doc_level = 0;
/* XXX: Comment lookahead */
if ( *YYCURSOR == '#' )
{
goto Document;
}
/* Ignore indentation inside inlines */
if ( lvl->status == syck_lvl_iseq || lvl->status == syck_lvl_imap )
{
goto Document;
}
/* Check for open indent */
ENSURE_YAML_IEND(lvl, indt_len);
ENSURE_YAML_IOPEN(lvl, indt_len, 0);
if ( indt_len == -1 )
{
return 0;
}
return YAML_INDENT;
}
#line 596 "<stdout>"
yy39:
++YYCURSOR;
switch((yych = *YYCURSOR)) {
case 0x0A: goto yy91;
default: goto yy40;
}
yy40:
#line 500 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
goto Plain;
}
#line 608 "<stdout>"
yy41:
++YYCURSOR;
#line 420 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
return YYTOKEN[0];
}
#line 617 "<stdout>"
yy43:
++YYCURSOR;
#line 426 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
return YYTOKEN[0];
}
#line 626 "<stdout>"
yy45:
++YYCURSOR;
#line 432 "token.re"
{ POP_LEVEL();
return YYTOKEN[0];
}
#line 633 "<stdout>"
yy47:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case 0x0A: goto yy86;
case 0x0D: goto yy90;
case ' ': goto yy88;
default: goto yy40;
}
yy48:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case 0x0A: goto yy81;
case 0x0D: goto yy85;
case ' ': goto yy83;
default: goto yy40;
}
yy49:
yych = *++YYCURSOR;
switch(yych){
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '_':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z': goto yy78;
default: goto yy40;
}
yy50:
yych = *++YYCURSOR;
switch(yych){
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '_':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z': goto yy75;
default: goto yy40;
}
yy51:
++YYCURSOR;
#line 474 "token.re"
{ goto TransferMethod; }
#line 794 "<stdout>"
yy53:
++YYCURSOR;
#line 476 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
goto SingleQuote; }
#line 800 "<stdout>"
yy55:
++YYCURSOR;
#line 479 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
goto DoubleQuote; }
#line 806 "<stdout>"
yy57:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case 0x0A: goto yy70;
case 0x0D: goto yy74;
case ' ': goto yy72;
case '+':
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9': goto yy67;
default: goto yy40;
}
yy58:
++YYCURSOR;
#line 489 "token.re"
{ eat_comments( parser );
goto Document;
}
#line 834 "<stdout>"
yy60:
++YYCURSOR;
yych = *YYCURSOR;
goto yy66;
yy61:
#line 493 "token.re"
{ goto Document; }
#line 842 "<stdout>"
yy62:
++YYCURSOR;
#line 495 "token.re"
{ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
#line 850 "<stdout>"
yy64:
yych = *++YYCURSOR;
goto yy40;
yy65:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy66:
switch(yych){
case 0x09:
case ' ': goto yy65;
default: goto yy61;
}
yy67:
++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
case 0x0A: goto yy70;
case 0x0D: goto yy74;
case ' ': goto yy72;
case '+':
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9': goto yy67;
default: goto yy69;
}
yy69:
YYCURSOR = YYMARKER;
switch(yyaccept){
case 0: goto yy38;
case 1: goto yy40;
}
yy70:
++YYCURSOR;
yy71:
#line 482 "token.re"
{ if ( is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
goto ScalarBlock;
}
#line 902 "<stdout>"
yy72:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case ' ': goto yy72;
default: goto yy71;
}
yy74:
yych = *++YYCURSOR;
switch(yych){
case 0x0A: goto yy70;
default: goto yy69;
}
yy75:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case '-':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '_':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z': goto yy75;
default: goto yy77;
}
yy77:
#line 469 "token.re"
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return YAML_ALIAS;
}
#line 994 "<stdout>"
yy78:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
case '-':
case '0':