summaryrefslogtreecommitdiff
path: root/ext/syck/bytecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/syck/bytecode.c')
-rw-r--r--ext/syck/bytecode.c252
1 files changed, 157 insertions, 95 deletions
diff --git a/ext/syck/bytecode.c b/ext/syck/bytecode.c
index 322d17dc0e..9a82f1bb8f 100644
--- a/ext/syck/bytecode.c
+++ b/ext/syck/bytecode.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Mon Jan 12 11:40:10 2004 */
+/* Generated by re2c 0.9.3 on Fri Jun 18 18:55:09 2004 */
#line 1 "bytecode.re"
/*
* bytecode.re
@@ -149,7 +149,7 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
return t;
}
-#line 173
+#line 173 "bytecode.re"
lvl = CURRENT_LEVEL();
@@ -162,6 +162,8 @@ Header:
YYTOKEN = YYCURSOR;
+
+#line 7 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -187,16 +189,18 @@ yy3: yyaccept = 0;
default: goto yy4;
}
yy4:
-#line 200
- { YYPOS(0);
+#line 200 "bytecode.re"
+{ YYPOS(0);
goto Document;
}
+#line 37 "<stdout>"
yy5: yych = *++YYCURSOR;
goto yy4;
-yy6: yych = *++YYCURSOR;
+yy6: ++YYCURSOR;
+ goto yy7;
yy7:
-#line 187
- { if ( lvl->status == syck_lvl_header )
+#line 187 "bytecode.re"
+{ if ( lvl->status == syck_lvl_header )
{
CHK_NL(YYCURSOR);
goto Directive;
@@ -208,13 +212,14 @@ yy7:
return 0;
}
}
-yy8: yych = *++YYCURSOR;
- switch(yych){
+#line 56 "<stdout>"
+yy8: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy6;
default: goto yy2;
}
}
-#line 204
+#line 204 "bytecode.re"
Document:
@@ -227,6 +232,8 @@ Document:
YYTOKEN = YYCURSOR;
+
+#line 65 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -281,34 +288,41 @@ yy16: yych = *++YYCURSOR;
case '\r': goto yy34;
default: goto yy11;
}
-yy17: yych = *++YYCURSOR;
+yy17: ++YYCURSOR;
+ goto yy18;
yy18:
-#line 289
- { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+#line 289 "bytecode.re"
+{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
goto Scalar;
}
-yy19: yych = *++YYCURSOR;
+#line 127 "<stdout>"
+yy19: ++YYCURSOR;
+ goto yy20;
yy20:
-#line 293
- { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+#line 293 "bytecode.re"
+{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
sycklval->name = get_inline( parser );
syck_hdlr_remove_anchor( parser, sycklval->name );
CHK_NL(YYCURSOR);
return YAML_ANCHOR;
}
-yy21: yych = *++YYCURSOR;
+#line 138 "<stdout>"
+yy21: ++YYCURSOR;
+ goto yy22;
yy22:
-#line 300
- { ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+#line 300 "bytecode.re"
+{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
sycklval->name = get_inline( parser );
POP_LEVEL();
if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
return YAML_ALIAS;
}
-yy23: yych = *++YYCURSOR;
+#line 149 "<stdout>"
+yy23: ++YYCURSOR;
+ goto yy24;
yy24:
-#line 307
- { char *qstr;
+#line 307 "bytecode.re"
+{ char *qstr;
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
qstr = get_inline( parser );
CHK_NL(YYCURSOR);
@@ -367,14 +381,18 @@ yy24:
sycklval->name = qstr;
return YAML_TAGURI;
}
-yy25: yych = *++YYCURSOR;
+#line 213 "<stdout>"
+yy25: ++YYCURSOR;
+ goto yy26;
yy26:
-#line 367
- { goto Comment; }
-yy27: yych = *++YYCURSOR;
+#line 367 "bytecode.re"
+{ goto Comment; }
+#line 219 "<stdout>"
+yy27: ++YYCURSOR;
+ goto yy28;
yy28:
-#line 369
- { CHK_NL(YYCURSOR);
+#line 369 "bytecode.re"
+{ CHK_NL(YYCURSOR);
if ( lvl->status == syck_lvl_seq )
{
return YAML_INDENT;
@@ -386,22 +404,26 @@ yy28:
}
goto Document;
}
+#line 236 "<stdout>"
yy29: yych = *++YYCURSOR;
switch(yych){
case '\n': goto yy27;
default: goto yy11;
}
-yy30: yych = *++YYCURSOR;
+yy30: ++YYCURSOR;
+ goto yy31;
yy31:
-#line 382
- { ENSURE_YAML_IEND(lvl, -1);
+#line 382 "bytecode.re"
+{ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy32: yych = *++YYCURSOR;
+#line 250 "<stdout>"
+yy32: ++YYCURSOR;
+ goto yy33;
yy33:
-#line 253
- { if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
+#line 253 "bytecode.re"
+{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
{
lvl->ncount++;
YYPOS(0);
@@ -436,15 +458,17 @@ yy33:
CHK_NL(YYCURSOR);
return YAML_IEND;
}
+#line 290 "<stdout>"
yy34: yych = *++YYCURSOR;
switch(yych){
case '\n': goto yy32;
default: goto yy11;
}
-yy35: yych = *++YYCURSOR;
+yy35: ++YYCURSOR;
+ goto yy36;
yy36:
-#line 238
- { int complex = 0;
+#line 238 "bytecode.re"
+{ int complex = 0;
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
{
complex = 1;
@@ -458,15 +482,17 @@ yy36:
}
return YAML_IOPEN;
}
+#line 314 "<stdout>"
yy37: yych = *++YYCURSOR;
switch(yych){
case '\n': goto yy35;
default: goto yy11;
}
-yy38: yych = *++YYCURSOR;
+yy38: ++YYCURSOR;
+ goto yy39;
yy39:
-#line 223
- { int complex = 0;
+#line 223 "bytecode.re"
+{ int complex = 0;
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
{
complex = 1;
@@ -480,30 +506,33 @@ yy39:
}
return YAML_IOPEN;
}
+#line 338 "<stdout>"
yy40: yych = *++YYCURSOR;
switch(yych){
case '\n': goto yy38;
default: goto yy11;
}
-yy41: yych = *++YYCURSOR;
+yy41: ++YYCURSOR;
+ goto yy42;
yy42:
-#line 218
- { ENSURE_YAML_IEND(lvl, -1);
+#line 218 "bytecode.re"
+{ ENSURE_YAML_IEND(lvl, -1);
YYPOS(0);
return 0;
}
+#line 352 "<stdout>"
yy43: yych = *++YYCURSOR;
switch(yych){
case '\n': goto yy41;
default: goto yy11;
}
-yy44: yych = *++YYCURSOR;
- switch(yych){
+yy44: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy41;
default: goto yy11;
}
}
-#line 387
+#line 387 "bytecode.re"
}
@@ -512,6 +541,8 @@ Directive:
{
YYTOKEN = YYCURSOR;
+
+#line 366 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -610,15 +641,17 @@ yy48: yyaccept = 0;
default: goto yy49;
}
yy49:
-#line 400
- { YYCURSOR = YYTOKEN;
+#line 400 "bytecode.re"
+{ YYCURSOR = YYTOKEN;
return YAML_DOCSEP;
}
+#line 469 "<stdout>"
yy50: yych = *++YYCURSOR;
goto yy49;
yy51: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
+ goto yy52;
yy52: switch(yych){
case '.':
case '/':
@@ -778,6 +811,7 @@ yy53: yych = *++YYCURSOR;
yy54: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
+ goto yy55;
yy55: switch(yych){
case '\n': goto yy56;
case '\r': goto yy58;
@@ -858,18 +892,20 @@ yy55: switch(yych){
case 'z': goto yy54;
default: goto yy47;
}
-yy56: yych = *++YYCURSOR;
+yy56: ++YYCURSOR;
+ goto yy57;
yy57:
-#line 397
- { CHK_NL(YYCURSOR);
+#line 397 "bytecode.re"
+{ CHK_NL(YYCURSOR);
goto Directive; }
-yy58: yych = *++YYCURSOR;
- switch(yych){
+#line 724 "<stdout>"
+yy58: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy56;
default: goto yy47;
}
}
-#line 403
+#line 403 "bytecode.re"
}
@@ -878,6 +914,8 @@ Comment:
{
YYTOKEN = YYCURSOR;
+
+#line 733 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -892,25 +930,29 @@ yy59:
case '\r': goto yy64;
default: goto yy66;
}
-yy61:yy62: yych = *++YYCURSOR;
+yy61:yy62: ++YYCURSOR;
+ goto yy63;
yy63:
-#line 413
- { CHK_NL(YYCURSOR);
+#line 413 "bytecode.re"
+{ CHK_NL(YYCURSOR);
goto Document; }
-yy64: yych = *++YYCURSOR;
- switch(yych){
+#line 754 "<stdout>"
+yy64: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy67;
default: goto yy65;
}
yy65:
-#line 416
- { goto Comment; }
+#line 416 "bytecode.re"
+{ goto Comment; }
+#line 763 "<stdout>"
yy66: yych = *++YYCURSOR;
goto yy65;
-yy67: yych = *++YYCURSOR;
+yy67: ++YYCURSOR;
+ yych = *YYCURSOR;
goto yy63;
}
-#line 418
+#line 418 "bytecode.re"
}
@@ -927,6 +969,8 @@ Scalar:
Scalar2:
tok = YYCURSOR;
+
+#line 771 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -941,34 +985,38 @@ yy68:
case '\r': goto yy72;
default: goto yy76;
}
-yy70: yych = *++YYCURSOR;
- switch(yych){
+yy70: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case 'C': goto yy78;
case 'N': goto yy80;
case 'Z': goto yy83;
default: goto yy71;
}
yy71:
-#line 462
- { YYCURSOR = tok;
+#line 462 "bytecode.re"
+{ YYCURSOR = tok;
goto ScalarEnd;
}
-yy72: yych = *++YYCURSOR;
- switch(yych){
+#line 798 "<stdout>"
+yy72: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy77;
default: goto yy73;
}
yy73:
-#line 470
- { CAT(str, cap, idx, tok[0]);
+#line 470 "bytecode.re"
+{ CAT(str, cap, idx, tok[0]);
goto Scalar2;
}
-yy74: yych = *++YYCURSOR;
+#line 809 "<stdout>"
+yy74: ++YYCURSOR;
+ goto yy75;
yy75:
-#line 466
- { YYCURSOR = tok;
+#line 466 "bytecode.re"
+{ YYCURSOR = tok;
goto ScalarEnd;
}
+#line 817 "<stdout>"
yy76: yych = *++YYCURSOR;
goto yy73;
yy77: yych = *++YYCURSOR;
@@ -978,14 +1026,17 @@ yy77: yych = *++YYCURSOR;
case 'Z': goto yy83;
default: goto yy71;
}
-yy78: yych = *++YYCURSOR;
+yy78: ++YYCURSOR;
+ goto yy79;
yy79:
-#line 436
- { CHK_NL(tok+1);
+#line 436 "bytecode.re"
+{ CHK_NL(tok+1);
goto Scalar2; }
+#line 833 "<stdout>"
yy80: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
+ goto yy81;
yy81: switch(yych){
case '0':
case '1':
@@ -1000,8 +1051,8 @@ yy81: switch(yych){
default: goto yy82;
}
yy82:
-#line 439
- { CHK_NL(tok+1);
+#line 439 "bytecode.re"
+{ CHK_NL(tok+1);
if ( tok + 2 < YYCURSOR )
{
char *count = tok + 2;
@@ -1018,15 +1069,18 @@ yy82:
}
goto Scalar2;
}
-yy83: yych = *++YYCURSOR;
+#line 871 "<stdout>"
+yy83: ++YYCURSOR;
+ goto yy84;
yy84:
-#line 457
- { CHK_NL(tok+1);
+#line 457 "bytecode.re"
+{ CHK_NL(tok+1);
CAT(str, cap, idx, '\0');
goto Scalar2;
}
+#line 880 "<stdout>"
}
-#line 474
+#line 474 "bytecode.re"
ScalarEnd:
@@ -1060,6 +1114,8 @@ Inline:
{
tok = YYCURSOR;
+
+#line 884 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@@ -1074,33 +1130,39 @@ yy85:
case '\r': goto yy89;
default: goto yy93;
}
-yy87: yych = *++YYCURSOR;
+yy87: ++YYCURSOR;
+ goto yy88;
yy88:
-#line 509
- { CHK_NL(YYCURSOR);
+#line 509 "bytecode.re"
+{ CHK_NL(YYCURSOR);
return str; }
-yy89: yych = *++YYCURSOR;
- switch(yych){
+#line 905 "<stdout>"
+yy89: ++YYCURSOR;
+ switch((yych = *YYCURSOR)) {
case '\n': goto yy94;
default: goto yy90;
}
yy90:
-#line 516
- { CAT(str, cap, idx, tok[0]);
+#line 516 "bytecode.re"
+{ CAT(str, cap, idx, tok[0]);
goto Inline;
}
-yy91: yych = *++YYCURSOR;
+#line 916 "<stdout>"
+yy91: ++YYCURSOR;
+ goto yy92;
yy92:
-#line 512
- { YYCURSOR = tok;
+#line 512 "bytecode.re"
+{ YYCURSOR = tok;
return str;
}
+#line 924 "<stdout>"
yy93: yych = *++YYCURSOR;
goto yy90;
-yy94: yych = *++YYCURSOR;
+yy94: ++YYCURSOR;
+ yych = *YYCURSOR;
goto yy88;
}
-#line 520
+#line 520 "bytecode.re"
}