summaryrefslogtreecommitdiff
path: root/ext/syck/token.c
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-17 16:55:54 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-17 16:55:54 +0000
commitae28f1b6b3b22afb529f599385d1f2af258624e9 (patch)
tree718fc605c85aa7d3c2b05fbfbc46c41320b74db9 /ext/syck/token.c
parent77e941269fcddc8f5af6e553592fc3ef0132727c (diff)
* ext/syck/gram.c: added grammar for certain empty sequence entries.
* ext/syck/handler.c, ext/syck/syck.c, ext/syck/syck.h: track bad anchors. * ext/syck/token.c: added pause token, tag possible circular references. * lib/yaml/rubytypes.rb: parsing YMD time as Date instance. * ext/syck/rubyext.c: ditto. DomainType, PrivateType, BadAlias classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/token.c')
-rw-r--r--ext/syck/token.c1078
1 files changed, 566 insertions, 512 deletions
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 817689908c2..2051ca2a5c2 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Mon Jun 9 18:21:18 2003 */
+/* Generated by re2c 0.5 on Sun Jun 15 16:14:26 2003 */
#line 1 "token.re"
/*
* token.re
@@ -247,89 +247,136 @@ yy0:
if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy6;
- case '\n': goto yy8;
- case '\r': goto yy10;
- case '#': goto yy4;
+ case '\000': goto yy7;
+ case '\n': goto yy9;
+ case '\r': goto yy11;
+ case '#': goto yy5;
case '-': goto yy2;
- default: goto yy11;
+ case '.': goto yy4;
+ default: goto yy12;
}
yy2: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '-': goto yy16;
+ case '-': goto yy24;
default: goto yy3;
}
yy3:
-#line 287
+#line 301
{ YYPOS(0);
goto Document;
}
-yy4: yych = *++YYCURSOR;
-yy5:
-#line 272
+yy4: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch(yych){
+ case '.': goto yy17;
+ default: goto yy3;
+ }
+yy5: yych = *++YYCURSOR;
+yy6:
+#line 286
{ eat_comments( parser );
goto Header;
}
-yy6: yych = *++YYCURSOR;
-yy7:
-#line 276
+yy7: yych = *++YYCURSOR;
+yy8:
+#line 290
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy8: yyaccept = 1;
+yy9: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy13;
-yy9:
-#line 282
+ goto yy14;
+yy10:
+#line 296
{ int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
goto Header;
}
-yy10: yych = *++YYCURSOR;
+yy11: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy12;
+ case '\n': goto yy13;
default: goto yy3;
}
-yy11: yych = *++YYCURSOR;
+yy12: yych = *++YYCURSOR;
goto yy3;
-yy12: yyaccept = 1;
+yy13: yyaccept = 1;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy13: switch(yych){
- case '\n': case ' ': goto yy12;
- case '\r': goto yy14;
- default: goto yy9;
+yy14: switch(yych){
+ case '\n': case ' ': goto yy13;
+ case '\r': goto yy15;
+ default: goto yy10;
}
-yy14: ++YYCURSOR;
+yy15: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy12;
- default: goto yy15;
+ case '\n': goto yy13;
+ default: goto yy16;
}
-yy15: YYCURSOR = YYMARKER;
+yy16: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 1: goto yy9;
+ case 1: goto yy10;
case 0: goto yy3;
}
-yy16: yych = *++YYCURSOR;
- switch(yych){
- case '-': goto yy17;
- default: goto yy15;
- }
yy17: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy18;
- case '\r': goto yy22;
- case ' ': goto yy20;
- default: goto yy15;
+ case '.': goto yy18;
+ default: goto yy16;
}
yy18: yych = *++YYCURSOR;
-yy19:
+ switch(yych){
+ case '\n': goto yy19;
+ case '\r': goto yy23;
+ case ' ': goto yy21;
+ default: goto yy16;
+ }
+yy19: yych = *++YYCURSOR;
+yy20:
+#line 272
+ { SyckLevel *lvl = CURRENT_LEVEL();
+ if ( lvl->status == syck_lvl_header )
+ {
+ goto Header;
+ }
+ else
+ {
+ ENSURE_IEND(lvl, -1);
+ YYPOS(0);
+ return 0;
+ }
+ return 0;
+ }
+yy21: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+yy22: switch(yych){
+ case ' ': goto yy21;
+ default: goto yy20;
+ }
+yy23: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy19;
+ default: goto yy16;
+ }
+yy24: yych = *++YYCURSOR;
+ switch(yych){
+ case '-': goto yy25;
+ default: goto yy16;
+ }
+yy25: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy26;
+ case '\r': goto yy30;
+ case ' ': goto yy28;
+ default: goto yy16;
+ }
+yy26: yych = *++YYCURSOR;
+yy27:
#line 258
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
@@ -344,20 +391,20 @@ yy19:
return 0;
}
}
-yy20: ++YYCURSOR;
+yy28: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy21: switch(yych){
- case ' ': goto yy20;
- default: goto yy19;
+yy29: switch(yych){
+ case ' ': goto yy28;
+ default: goto yy27;
}
-yy22: yych = *++YYCURSOR;
+yy30: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy18;
- default: goto yy15;
+ case '\n': goto yy26;
+ default: goto yy16;
}
}
-#line 291
+#line 305
Document:
@@ -373,34 +420,34 @@ Document:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy23;
-yy24: ++YYCURSOR;
-yy23:
+ goto yy31;
+yy32: ++YYCURSOR;
+yy31:
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy48;
- case '\n': goto yy25;
- case '\r': goto yy27;
- case ' ': goto yy46;
- case '!': goto yy37;
- case '"': goto yy41;
- case '#': goto yy44;
- case '&': goto yy35;
- case '\'': goto yy39;
- case '*': goto yy36;
- case ',': case ':': goto yy33;
- case '-': case '?': goto yy34;
- case '>': case '|': goto yy43;
- case '[': case '{': goto yy29;
- case ']': case '}': goto yy31;
- default: goto yy50;
- }
-yy25: yyaccept = 0;
+ case '\000': goto yy56;
+ case '\n': goto yy33;
+ case '\r': goto yy35;
+ case ' ': goto yy54;
+ case '!': goto yy45;
+ case '"': goto yy49;
+ case '#': goto yy52;
+ case '&': goto yy43;
+ case '\'': goto yy47;
+ case '*': goto yy44;
+ case ',': case ':': goto yy41;
+ case '-': case '?': goto yy42;
+ case '>': case '|': goto yy51;
+ case '[': case '{': goto yy37;
+ case ']': case '}': goto yy39;
+ default: goto yy58;
+ }
+yy33: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy78;
-yy26:
-#line 305
+ goto yy86;
+yy34:
+#line 319
{ // Isolate spaces
int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
@@ -415,47 +462,47 @@ yy26:
}
return INDENT;
}
-yy27: yych = *++YYCURSOR;
+yy35: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy77;
- default: goto yy28;
+ case '\n': goto yy85;
+ default: goto yy36;
}
-yy28:
-#line 385
+yy36:
+#line 406
{ ENSURE_IOPEN(lvl, 0, 1);
goto Plain;
}
-yy29: yych = *++YYCURSOR;
-yy30:
-#line 320
+yy37: yych = *++YYCURSOR;
+yy38:
+#line 334
{ ENSURE_IOPEN(lvl, 0, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_inline);
return YYTOKEN[0];
}
-yy31: yych = *++YYCURSOR;
-yy32:
-#line 326
+yy39: yych = *++YYCURSOR;
+yy40:
+#line 340
{ POP_LEVEL();
return YYTOKEN[0];
}
-yy33: yyaccept = 1;
+yy41: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy72;
- case '\r': goto yy76;
- case ' ': goto yy74;
- default: goto yy28;
+ case '\n': goto yy80;
+ case '\r': goto yy84;
+ case ' ': goto yy82;
+ default: goto yy36;
}
-yy34: yyaccept = 1;
+yy42: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy67;
- case '\r': goto yy71;
- case ' ': goto yy69;
- default: goto yy28;
+ case '\n': goto yy75;
+ case '\r': goto yy79;
+ case ' ': goto yy77;
+ default: goto yy36;
}
-yy35: yych = *++YYCURSOR;
+yy43: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -516,10 +563,10 @@ yy35: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy64;
- default: goto yy28;
+ case 'z': goto yy72;
+ default: goto yy36;
}
-yy36: yych = *++YYCURSOR;
+yy44: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -580,30 +627,30 @@ yy36: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy61;
- default: goto yy28;
+ case 'z': goto yy69;
+ default: goto yy36;
}
-yy37: yych = *++YYCURSOR;
-yy38:
-#line 358
+yy45: yych = *++YYCURSOR;
+yy46:
+#line 379
{ ENSURE_IOPEN(lvl, 0, 1);
goto TransferMethod; }
-yy39: yych = *++YYCURSOR;
-yy40:
-#line 361
+yy47: yych = *++YYCURSOR;
+yy48:
+#line 382
{ ENSURE_IOPEN(lvl, 0, 1);
goto SingleQuote; }
-yy41: yych = *++YYCURSOR;
-yy42:
-#line 364
+yy49: yych = *++YYCURSOR;
+yy50:
+#line 385
{ ENSURE_IOPEN(lvl, 0, 1);
goto DoubleQuote; }
-yy43: yyaccept = 1;
+yy51: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy56;
- case '\r': goto yy60;
- case ' ': goto yy58;
+ case '\n': goto yy64;
+ case '\r': goto yy68;
+ case ' ': goto yy66;
case '+': case '-': case '0':
case '1':
case '2':
@@ -613,43 +660,43 @@ yy43: yyaccept = 1;
case '6':
case '7':
case '8':
- case '9': goto yy53;
- default: goto yy28;
+ case '9': goto yy61;
+ default: goto yy36;
}
-yy44: yych = *++YYCURSOR;
-yy45:
-#line 374
+yy52: yych = *++YYCURSOR;
+yy53:
+#line 395
{ eat_comments( parser );
goto Document;
}
-yy46: yych = *++YYCURSOR;
- goto yy52;
-yy47:
-#line 378
+yy54: yych = *++YYCURSOR;
+ goto yy60;
+yy55:
+#line 399
{ goto Document; }
-yy48: yych = *++YYCURSOR;
-yy49:
-#line 380
+yy56: yych = *++YYCURSOR;
+yy57:
+#line 401
{ ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy50: yych = *++YYCURSOR;
- goto yy28;
-yy51: ++YYCURSOR;
+yy58: yych = *++YYCURSOR;
+ goto yy36;
+yy59: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy52: switch(yych){
- case ' ': goto yy51;
- default: goto yy47;
+yy60: switch(yych){
+ case ' ': goto yy59;
+ default: goto yy55;
}
-yy53: ++YYCURSOR;
+yy61: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy54: switch(yych){
- case '\n': goto yy56;
- case '\r': goto yy60;
- case ' ': goto yy58;
+yy62: switch(yych){
+ case '\n': goto yy64;
+ case '\r': goto yy68;
+ case ' ': goto yy66;
case '+': case '-': case '0':
case '1':
case '2':
@@ -659,39 +706,39 @@ yy54: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy53;
- default: goto yy55;
+ case '9': goto yy61;
+ default: goto yy63;
}
-yy55: YYCURSOR = YYMARKER;
+yy63: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy26;
- case 1: goto yy28;
+ case 0: goto yy34;
+ case 1: goto yy36;
}
-yy56: yych = *++YYCURSOR;
-yy57:
-#line 367
+yy64: yych = *++YYCURSOR;
+yy65:
+#line 388
{ if ( is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
goto ScalarBlock;
}
-yy58: ++YYCURSOR;
+yy66: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy59: switch(yych){
- case ' ': goto yy58;
- default: goto yy57;
+yy67: switch(yych){
+ case ' ': goto yy66;
+ default: goto yy65;
}
-yy60: yych = *++YYCURSOR;
+yy68: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy56;
- default: goto yy55;
+ case '\n': goto yy64;
+ default: goto yy63;
}
-yy61: ++YYCURSOR;
+yy69: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy62: switch(yych){
+yy70: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -751,19 +798,19 @@ yy62: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy61;
- default: goto yy63;
+ case 'z': goto yy69;
+ default: goto yy71;
}
-yy63:
-#line 353
+yy71:
+#line 374
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return ALIAS;
}
-yy64: ++YYCURSOR;
+yy72: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy65: switch(yych){
+yy73: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -823,18 +870,25 @@ yy65: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy64;
- default: goto yy66;
+ case 'z': goto yy72;
+ default: goto yy74;
}
-yy66:
-#line 348
+yy74:
+#line 362
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
+
+ //
+ // Remove previous anchors of the same name. Since the parser will likely
+ // construct deeper nodes first, we want those nodes to be placed in the
+ // queue for matching at a higher level of indentation.
+ //
+ syck_hdlr_remove_anchor(parser, yylval->name);
return ANCHOR;
}
-yy67: yych = *++YYCURSOR;
-yy68:
-#line 334
+yy75: yych = *++YYCURSOR;
+yy76:
+#line 348
{ ENSURE_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
FORCE_NEXT_TOKEN(IOPEN);
if ( is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
@@ -848,54 +902,54 @@ yy68:
}
return YYTOKEN[0];
}
-yy69: ++YYCURSOR;
+yy77: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy70: switch(yych){
- case ' ': goto yy69;
- default: goto yy68;
+yy78: switch(yych){
+ case ' ': goto yy77;
+ default: goto yy76;
}
-yy71: yych = *++YYCURSOR;
+yy79: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy67;
- default: goto yy55;
+ case '\n': goto yy75;
+ default: goto yy63;
}
-yy72: yych = *++YYCURSOR;
-yy73:
-#line 330
+yy80: yych = *++YYCURSOR;
+yy81:
+#line 344
{ YYPOS(1);
return YYTOKEN[0];
}
-yy74: ++YYCURSOR;
+yy82: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy75: switch(yych){
- case ' ': goto yy74;
- default: goto yy73;
+yy83: switch(yych){
+ case ' ': goto yy82;
+ default: goto yy81;
}
-yy76: yych = *++YYCURSOR;
+yy84: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy72;
- default: goto yy55;
+ case '\n': goto yy80;
+ default: goto yy63;
}
-yy77: yyaccept = 0;
+yy85: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy78: switch(yych){
- case '\n': case ' ': goto yy77;
- case '\r': goto yy79;
- default: goto yy26;
+yy86: switch(yych){
+ case '\n': case ' ': goto yy85;
+ case '\r': goto yy87;
+ default: goto yy34;
}
-yy79: ++YYCURSOR;
+yy87: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy77;
- default: goto yy55;
+ case '\n': goto yy85;
+ default: goto yy63;
}
}
-#line 389
+#line 410
}
@@ -906,22 +960,22 @@ Directive:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy80;
-yy81: ++YYCURSOR;
-yy80:
+ goto yy88;
+yy89: ++YYCURSOR;
+yy88:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy82;
- case ' ': goto yy85;
- case '%': goto yy83;
- default: goto yy87;
+ case '\000': goto yy90;
+ case ' ': goto yy93;
+ case '%': goto yy91;
+ default: goto yy95;
}
-yy82: YYCURSOR = YYMARKER;
+yy90: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy84;
+ case 0: goto yy92;
}
-yy83: yyaccept = 0;
+yy91: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
case '.':
@@ -998,32 +1052,32 @@ yy83: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy90;
- default: goto yy84;
+ case 'z': goto yy98;
+ default: goto yy92;
}
-yy84:
-#line 402
+yy92:
+#line 423
{ YYCURSOR = YYTOKTMP;
return DOCSEP;
}
-yy85: yych = *++YYCURSOR;
- goto yy89;
-yy86:
-#line 400
+yy93: yych = *++YYCURSOR;
+ goto yy97;
+yy94:
+#line 421
{ goto Directive; }
-yy87: yych = *++YYCURSOR;
- goto yy84;
-yy88: ++YYCURSOR;
+yy95: yych = *++YYCURSOR;
+ goto yy92;
+yy96: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy89: switch(yych){
- case ' ': goto yy88;
- default: goto yy86;
+yy97: switch(yych){
+ case ' ': goto yy96;
+ default: goto yy94;
}
-yy90: ++YYCURSOR;
+yy98: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy91: switch(yych){
+yy99: switch(yych){
case '.':
case '/':
case '0':
@@ -1096,11 +1150,11 @@ yy91: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy90;
- case ':': goto yy92;
- default: goto yy82;
+ case 'z': goto yy98;
+ case ':': goto yy100;
+ default: goto yy90;
}
-yy92: yych = *++YYCURSOR;
+yy100: yych = *++YYCURSOR;
switch(yych){
case '.':
case '/':
@@ -1176,13 +1230,13 @@ yy92: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy93;
- default: goto yy82;
+ case 'z': goto yy101;
+ default: goto yy90;
}
-yy93: ++YYCURSOR;
+yy101: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy94: switch(yych){
+yy102: switch(yych){
case '.':
case '/':
case '0':
@@ -1257,14 +1311,14 @@ yy94: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy93;
- default: goto yy95;
+ case 'z': goto yy101;
+ default: goto yy103;
}
-yy95:
-#line 398
+yy103:
+#line 419
{ goto Directive; }
}
-#line 405
+#line 426
}
@@ -1289,26 +1343,26 @@ Plain3:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy96;
-yy97: ++YYCURSOR;
-yy96:
+ goto yy104;
+yy105: ++YYCURSOR;
+yy104:
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy108;
- case '\n': goto yy98;
- case '\r': goto yy100;
- case ' ': goto yy106;
- case ',': goto yy105;
- case ':': goto yy102;
- case ']': case '}': goto yy103;
- default: goto yy110;
- }
-yy98: yyaccept = 0;
+ case '\000': goto yy116;
+ case '\n': goto yy106;
+ case '\r': goto yy108;
+ case ' ': goto yy114;
+ case ',': goto yy113;
+ case ':': goto yy110;
+ case ']': case '}': goto yy111;
+ default: goto yy118;
+ }
+yy106: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy124;
-yy99:
-#line 428
+ goto yy132;
+yy107:
+#line 449
{ int indt_len, nl_count = 0;
SyckLevel *lvl;
char *tok = YYTOKTMP;
@@ -1340,27 +1394,27 @@ yy99:
goto Plain2;
}
-yy100: yych = *++YYCURSOR;
+yy108: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy123;
- default: goto yy101;
+ case '\n': goto yy131;
+ default: goto yy109;
}
-yy101:
-#line 482
+yy109:
+#line 503
{ QUOTECATS(qstr, qcapa, qidx, YYTOKTMP, YYCURSOR - YYTOKTMP);
goto Plain2;
}
-yy102: yyaccept = 1;
+yy110: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy118;
- case '\r': goto yy122;
- case ' ': goto yy120;
- default: goto yy101;
+ case '\n': goto yy126;
+ case '\r': goto yy130;
+ case ' ': goto yy128;
+ default: goto yy109;
}
-yy103: yych = *++YYCURSOR;
-yy104:
-#line 462
+yy111: yych = *++YYCURSOR;
+yy112:
+#line 483
{ if ( plvl->status != syck_lvl_inline )
{
if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) )
@@ -1372,87 +1426,87 @@ yy104:
}
RETURN_IMPLICIT();
}
-yy105: yyaccept = 1;
+yy113: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy113;
- case '\r': goto yy116;
- case ' ': goto yy114;
- default: goto yy101;
+ case '\n': goto yy121;
+ case '\r': goto yy124;
+ case ' ': goto yy122;
+ default: goto yy109;
}
-yy106: yych = *++YYCURSOR;
+yy114: yych = *++YYCURSOR;
switch(yych){
- case '#': goto yy111;
- default: goto yy107;
+ case '#': goto yy119;
+ default: goto yy115;
}
-yy107:
-#line 480
+yy115:
+#line 501
{ goto Plain3; }
-yy108: yych = *++YYCURSOR;
-yy109:
-#line 478
+yy116: yych = *++YYCURSOR;
+yy117:
+#line 499
{ RETURN_IMPLICIT(); }
-yy110: yych = *++YYCURSOR;
- goto yy101;
-yy111: yych = *++YYCURSOR;
-yy112:
-#line 474
+yy118: yych = *++YYCURSOR;
+ goto yy109;
+yy119: yych = *++YYCURSOR;
+yy120:
+#line 495
{ eat_comments( parser );
RETURN_IMPLICIT();
}
-yy113: yych = *++YYCURSOR;
- goto yy104;
-yy114: ++YYCURSOR;
+yy121: yych = *++YYCURSOR;
+ goto yy112;
+yy122: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy115: switch(yych){
- case ' ': goto yy114;
- default: goto yy104;
+yy123: switch(yych){
+ case ' ': goto yy122;
+ default: goto yy112;
}
-yy116: yych = *++YYCURSOR;
+yy124: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy113;
- default: goto yy117;
+ case '\n': goto yy121;
+ default: goto yy125;
}
-yy117: YYCURSOR = YYMARKER;
+yy125: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy99;
- case 1: goto yy101;
+ case 0: goto yy107;
+ case 1: goto yy109;
}
-yy118: yych = *++YYCURSOR;
-yy119:
-#line 460
+yy126: yych = *++YYCURSOR;
+yy127:
+#line 481
{ RETURN_IMPLICIT(); }
-yy120: ++YYCURSOR;
+yy128: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy121: switch(yych){
- case ' ': goto yy120;
- default: goto yy119;
+yy129: switch(yych){
+ case ' ': goto yy128;
+ default: goto yy127;
}
-yy122: yych = *++YYCURSOR;
+yy130: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy118;
- default: goto yy117;
+ case '\n': goto yy126;
+ default: goto yy125;
}
-yy123: yyaccept = 0;
+yy131: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy124: switch(yych){
- case '\n': case ' ': goto yy123;
- case '\r': goto yy125;
- default: goto yy99;
+yy132: switch(yych){
+ case '\n': case ' ': goto yy131;
+ case '\r': goto yy133;
+ default: goto yy107;
}
-yy125: ++YYCURSOR;
+yy133: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy123;
- default: goto yy117;
+ case '\n': goto yy131;
+ default: goto yy125;
}
}
-#line 486
+#line 507
}
@@ -1468,23 +1522,23 @@ SingleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy126;
-yy127: ++YYCURSOR;
-yy126:
+ goto yy134;
+yy135: ++YYCURSOR;
+yy134:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy134;
- case '\n': goto yy128;
- case '\r': goto yy130;
- case '\'': goto yy132;
- default: goto yy135;
+ case '\000': goto yy142;
+ case '\n': goto yy136;
+ case '\r': goto yy138;
+ case '\'': goto yy140;
+ default: goto yy143;
}
-yy128: yyaccept = 0;
+yy136: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy139;
-yy129:
-#line 500
+ goto yy147;
+yy137:
+#line 521
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1520,23 +1574,23 @@ yy129:
goto SingleQuote2;
}
-yy130: yych = *++YYCURSOR;
+yy138: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy138;
- default: goto yy131;
+ case '\n': goto yy146;
+ default: goto yy139;
}
-yy131:
-#line 554
+yy139:
+#line 575
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto SingleQuote2;
}
-yy132: yych = *++YYCURSOR;
+yy140: yych = *++YYCURSOR;
switch(yych){
- case '\'': goto yy136;
- default: goto yy133;
+ case '\'': goto yy144;
+ default: goto yy141;
}
-yy133:
-#line 540
+yy141:
+#line 561
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1550,38 +1604,38 @@ yy133:
yylval->nodeData = n;
return PLAIN;
}
-yy134: yych = *++YYCURSOR;
- goto yy133;
-yy135: yych = *++YYCURSOR;
- goto yy131;
-yy136: yych = *++YYCURSOR;
-yy137:
-#line 536
+yy142: yych = *++YYCURSOR;
+ goto yy141;
+yy143: yych = *++YYCURSOR;
+ goto yy139;
+yy144: yych = *++YYCURSOR;
+yy145:
+#line 557
{ QUOTECAT(qstr, qcapa, qidx, '\'');
goto SingleQuote2;
}
-yy138: yyaccept = 0;
+yy146: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy139: switch(yych){
- case '\n': case ' ': goto yy138;
- case '\r': goto yy140;
- default: goto yy129;
+yy147: switch(yych){
+ case '\n': case ' ': goto yy146;
+ case '\r': goto yy148;
+ default: goto yy137;
}
-yy140: ++YYCURSOR;
+yy148: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy138;
- default: goto yy141;
+ case '\n': goto yy146;
+ default: goto yy149;
}
-yy141: YYCURSOR = YYMARKER;
+yy149: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy129;
+ case 0: goto yy137;
}
}
-#line 558
+#line 579
}
@@ -1601,24 +1655,24 @@ DoubleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy142;
-yy143: ++YYCURSOR;
-yy142:
+ goto yy150;
+yy151: ++YYCURSOR;
+yy150:
if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy149;
- case '\n': goto yy144;
- case '\r': goto yy146;
- case '"': goto yy151;
- case '\\': goto yy148;
- default: goto yy152;
- }
-yy144: yyaccept = 0;
+ case '\000': goto yy157;
+ case '\n': goto yy152;
+ case '\r': goto yy154;
+ case '"': goto yy159;
+ case '\\': goto yy156;
+ default: goto yy160;
+ }
+yy152: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy166;
-yy145:
-#line 576
+ goto yy174;
+yy153:
+#line 597
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1658,31 +1712,31 @@ yy145:
keep_nl = 1;
goto DoubleQuote2;
}
-yy146: yych = *++YYCURSOR;
+yy154: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy165;
- default: goto yy147;
+ case '\n': goto yy173;
+ default: goto yy155;
}
-yy147:
-#line 660
+yy155:
+#line 681
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto DoubleQuote2;
}
-yy148: yyaccept = 1;
+yy156: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy156;
- case '\r': goto yy158;
- case ' ': goto yy153;
+ case '\n': goto yy164;
+ case '\r': goto yy166;
+ case ' ': goto yy161;
case '"': case '\\': case 'a':
case 'b': case 'e':
- case 'f': case 'n': case 'r': case 't': case 'v': goto yy160;
- case 'x': goto yy159;
- default: goto yy147;
+ case 'f': case 'n': case 'r': case 't': case 'v': goto yy168;
+ case 'x': goto yy167;
+ default: goto yy155;
}
-yy149: yych = *++YYCURSOR;
-yy150:
-#line 646
+yy157: yych = *++YYCURSOR;
+yy158:
+#line 667
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1696,37 +1750,37 @@ yy150:
yylval->nodeData = n;
return PLAIN;
}
-yy151: yych = *++YYCURSOR;
- goto yy150;
-yy152: yych = *++YYCURSOR;
- goto yy147;
-yy153: ++YYCURSOR;
+yy159: yych = *++YYCURSOR;
+ goto yy158;
+yy160: yych = *++YYCURSOR;
+ goto yy155;
+yy161: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy154: switch(yych){
- case '\n': goto yy156;
- case '\r': goto yy158;
- case ' ': goto yy153;
- default: goto yy155;
+yy162: switch(yych){
+ case '\n': goto yy164;
+ case '\r': goto yy166;
+ case ' ': goto yy161;
+ default: goto yy163;
}
-yy155: YYCURSOR = YYMARKER;
+yy163: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy145;
- case 1: goto yy147;
+ case 0: goto yy153;
+ case 1: goto yy155;
}
-yy156: yych = *++YYCURSOR;
-yy157:
-#line 641
+yy164: yych = *++YYCURSOR;
+yy165:
+#line 662
{ keep_nl = 0;
YYCURSOR--;
goto DoubleQuote2;
}
-yy158: yych = *++YYCURSOR;
+yy166: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy156;
- default: goto yy155;
+ case '\n': goto yy164;
+ default: goto yy163;
}
-yy159: yych = *++YYCURSOR;
+yy167: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1747,12 +1801,12 @@ yy159: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy162;
- default: goto yy155;
+ case 'f': goto yy170;
+ default: goto yy163;
}
-yy160: yych = *++YYCURSOR;
-yy161:
-#line 616
+yy168: yych = *++YYCURSOR;
+yy169:
+#line 637
{ char ch = *( YYCURSOR - 1 );
switch ( ch )
{
@@ -1768,7 +1822,7 @@ yy161:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy162: yych = *++YYCURSOR;
+yy170: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1789,12 +1843,12 @@ yy162: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy163;
- default: goto yy155;
+ case 'f': goto yy171;
+ default: goto yy163;
}
-yy163: yych = *++YYCURSOR;
-yy164:
-#line 632
+yy171: yych = *++YYCURSOR;
+yy172:
+#line 653
{ long ch;
char *chr_text = syck_strndup( YYTOKTMP, 4 );
chr_text[0] = '0';
@@ -1803,24 +1857,24 @@ yy164:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy165: yyaccept = 0;
+yy173: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy166: switch(yych){
- case '\n': case ' ': goto yy165;
- case '\r': goto yy167;
- default: goto yy145;
+yy174: switch(yych){
+ case '\n': case ' ': goto yy173;
+ case '\r': goto yy175;
+ default: goto yy153;
}
-yy167: ++YYCURSOR;
+yy175: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy165;
- default: goto yy155;
+ case '\n': goto yy173;
+ default: goto yy163;
}
}
-#line 664
+#line 685
}
@@ -1831,21 +1885,21 @@ TransferMethod:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy168;
-yy169: ++YYCURSOR;
-yy168:
+ goto yy176;
+yy177: ++YYCURSOR;
+yy176:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy170;
- case '\n': goto yy171;
- case '\r': goto yy174;
- case ' ': goto yy173;
- default: goto yy176;
+ case '\000': goto yy178;
+ case '\n': goto yy179;
+ case '\r': goto yy182;
+ case ' ': goto yy181;
+ default: goto yy184;
}
-yy170:yy171: yych = *++YYCURSOR;
-yy172:
-#line 673
+yy178:yy179: yych = *++YYCURSOR;
+yy180:
+#line 694
{ SyckLevel *lvl;
YYCURSOR = YYTOKTMP;
if ( YYCURSOR == YYTOKEN + 1 )
@@ -1891,29 +1945,29 @@ yy172:
return TRANSFER;
}
-yy173: yych = *++YYCURSOR;
- goto yy179;
-yy174: yych = *++YYCURSOR;
+yy181: yych = *++YYCURSOR;
+ goto yy187;
+yy182: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy177;
- default: goto yy175;
+ case '\n': goto yy185;
+ default: goto yy183;
}
-yy175:
-#line 719
+yy183:
+#line 740
{ goto TransferMethod; }
-yy176: yych = *++YYCURSOR;
- goto yy175;
-yy177: yych = *++YYCURSOR;
- goto yy172;
-yy178: ++YYCURSOR;
+yy184: yych = *++YYCURSOR;
+ goto yy183;
+yy185: yych = *++YYCURSOR;
+ goto yy180;
+yy186: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy179: switch(yych){
- case ' ': goto yy178;
- default: goto yy172;
+yy187: switch(yych){
+ case ' ': goto yy186;
+ default: goto yy180;
}
}
-#line 721
+#line 742
}
@@ -1963,23 +2017,23 @@ ScalarBlock2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy180;
-yy181: ++YYCURSOR;
-yy180:
+ goto yy188;
+yy189: ++YYCURSOR;
+yy188:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy188;
- case '\n': goto yy182;
- case '\r': goto yy184;
- case '#': goto yy186;
- default: goto yy190;
+ case '\000': goto yy196;
+ case '\n': goto yy190;
+ case '\r': goto yy192;
+ case '#': goto yy194;
+ default: goto yy198;
}
-yy182: yyaccept = 0;
+yy190: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy192;
-yy183:
-#line 769
+ goto yy200;
+yy191:
+#line 790
{ char *pacer;
char *tok = YYTOKTMP;
int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
@@ -2045,19 +2099,19 @@ yy183:
}
goto ScalarBlock2;
}
-yy184: yych = *++YYCURSOR;
+yy192: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy191;
- default: goto yy185;
+ case '\n': goto yy199;
+ default: goto yy193;
}
-yy185:
-#line 855
+yy193:
+#line 876
{ QUOTECAT(qstr, qcapa, qidx, *YYTOKTMP);
goto ScalarBlock2;
}
-yy186: yych = *++YYCURSOR;
-yy187:
-#line 836
+yy194: yych = *++YYCURSOR;
+yy195:
+#line 857
{ lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_block )
{
@@ -2070,37 +2124,37 @@ yy187:
}
goto ScalarBlock2;
}
-yy188: yych = *++YYCURSOR;
-yy189:
-#line 850
+yy196: yych = *++YYCURSOR;
+yy197:
+#line 871
{ YYCURSOR--;
POP_LEVEL();
RETURN_BLOCK();
}
-yy190: yych = *++YYCURSOR;
- goto yy185;
-yy191: yyaccept = 0;
+yy198: yych = *++YYCURSOR;
+ goto yy193;
+yy199: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy192: switch(yych){
- case '\n': case ' ': goto yy191;
- case '\r': goto yy193;
- default: goto yy183;
+yy200: switch(yych){
+ case '\n': case ' ': goto yy199;
+ case '\r': goto yy201;
+ default: goto yy191;
}
-yy193: ++YYCURSOR;
+yy201: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy191;
- default: goto yy194;
+ case '\n': goto yy199;
+ default: goto yy202;
}
-yy194: YYCURSOR = YYMARKER;
+yy202: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy183;
+ case 0: goto yy191;
}
}
-#line 860
+#line 881
}
@@ -2118,60 +2172,60 @@ Comment:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy195;
-yy196: ++YYCURSOR;
-yy195:
+ goto yy203;
+yy204: ++YYCURSOR;
+yy203:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy197;
- case '\n': goto yy199;
- case '\r': goto yy200;
- default: goto yy202;
- }
-yy197: yych = *++YYCURSOR;
-yy198:
-#line 876
+ case '\000': goto yy205;
+ case '\n': goto yy207;
+ case '\r': goto yy208;
+ default: goto yy210;
+ }
+yy205: yych = *++YYCURSOR;
+yy206:
+#line 897
{ SyckLevel *lvl = CURRENT_LEVEL();
YYCURSOR = tok;
return;
}
-yy199: yyaccept = 0;
+yy207: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- goto yy204;
-yy200: yych = *++YYCURSOR;
+ goto yy212;
+yy208: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy203;
- default: goto yy201;
+ case '\n': goto yy211;
+ default: goto yy209;
}
-yy201:
-#line 881
+yy209:
+#line 902
{ goto Comment;
}
-yy202: yych = *++YYCURSOR;
- goto yy201;
-yy203: yyaccept = 0;
+yy210: yych = *++YYCURSOR;
+ goto yy209;
+yy211: yyaccept = 0;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy204: switch(yych){
- case '\n': goto yy203;
- case '\r': goto yy205;
- default: goto yy198;
+yy212: switch(yych){
+ case '\n': goto yy211;
+ case '\r': goto yy213;
+ default: goto yy206;
}
-yy205: ++YYCURSOR;
+yy213: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
- case '\n': goto yy203;
- default: goto yy206;
+ case '\n': goto yy211;
+ default: goto yy214;
}
-yy206: YYCURSOR = YYMARKER;
+yy214: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy198;
+ case 0: goto yy206;
}
}
-#line 884
+#line 905
}