summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-10 14:15:27 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-10 14:15:27 +0000
commite921ea2d78f693c57fcb289faff3fc126dc8617a (patch)
tree6931c25c8907d5e481be1281be1a30297a3fff53
parent3079dcab4ad9e7624703d772f6fc54dc10e45bce (diff)
* ext/syck/token.c: preserve newlines prepended to a block.
* ext/syck/implicit.c (syck_match_implicit): added !merge and !default. * lib/yaml/constants.rb: remove '\z' escape. * lib/yaml/emitter.rb: ensure reset of @seq_map shortcut flag. * lib/yaml/encoding.rb: remove Unicode translation methods. * lib/yaml/rubytypes.rb: improved round-tripping of Strings. [ruby-core:1134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog15
-rw-r--r--ext/syck/implicit.c1287
-rw-r--r--ext/syck/token.c975
-rw-r--r--lib/yaml/constants.rb12
-rw-r--r--lib/yaml/emitter.rb6
-rw-r--r--lib/yaml/encoding.rb96
-rw-r--r--lib/yaml/rubytypes.rb11
7 files changed, 1227 insertions, 1175 deletions
diff --git a/ChangeLog b/ChangeLog
index 4049ff89f4c..58958451db5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Tue Jun 10 14:26:30 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
+
+ * ext/syck/token.c: preserve newlines prepended to a block.
+
+ * ext/syck/implicit.c (syck_match_implicit): added !merge and !default.
+
+ * lib/yaml/constants.rb: remove '\z' escape.
+
+ * lib/yaml/emitter.rb: ensure reset of @seq_map shortcut flag.
+
+ * lib/yaml/encoding.rb: remove Unicode translation methods.
+
+ * lib/yaml/rubytypes.rb: improved round-tripping of Strings.
+ [ruby-core:1134]
+
Tue Jun 10 01:07:54 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/irb.rb (IRB::Irb::eval_input): warn and exit if $SAFE >=3
diff --git a/ext/syck/implicit.c b/ext/syck/implicit.c
index 2eb61af7842..c7716ba43b6 100644
--- a/ext/syck/implicit.c
+++ b/ext/syck/implicit.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Mon May 19 12:39:18 2003 */
+/* Generated by re2c 0.5 on Mon Jun 9 18:21:19 2003 */
#line 1 "implicit.re"
/*
* implicit.re
@@ -72,6 +72,8 @@ yy0:
case '7':
case '8':
case '9': goto yy18;
+ case '<': goto yy21;
+ case '=': goto yy20;
case 'F': goto yy14;
case 'N': goto yy6;
case 'O': goto yy12;
@@ -83,91 +85,91 @@ yy0:
case 't': goto yy7;
case 'y': goto yy9;
case '~': goto yy3;
- default: goto yy20;
+ default: goto yy22;
}
yy2: YYCURSOR = YYMARKER;
switch(yyaccept){
case 0: goto yy4;
}
yy3: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy181;
+ if(yych <= '\000') goto yy188;
yy4:
-#line 112
+#line 116
{ return "str"; }
yy5: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'o': goto yy154;
- case 'u': goto yy184;
+ case 'o': goto yy161;
+ case 'u': goto yy191;
default: goto yy4;
}
yy6: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'O': case 'o': goto yy154;
- case 'U': goto yy177;
- case 'u': goto yy178;
+ case 'O': case 'o': goto yy161;
+ case 'U': goto yy184;
+ case 'u': goto yy185;
default: goto yy4;
}
yy7: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'r': goto yy175;
+ case 'r': goto yy182;
default: goto yy4;
}
yy8: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'R': goto yy171;
- case 'r': goto yy172;
+ case 'R': goto yy178;
+ case 'r': goto yy179;
default: goto yy4;
}
yy9: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'e': goto yy170;
+ case 'e': goto yy177;
default: goto yy4;
}
yy10: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'E': goto yy168;
- case 'e': goto yy169;
+ case 'E': goto yy175;
+ case 'e': goto yy176;
default: goto yy4;
}
yy11: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'f': goto yy167;
- case 'n': goto yy164;
+ case 'f': goto yy174;
+ case 'n': goto yy171;
default: goto yy4;
}
yy12: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'F': goto yy162;
- case 'N': case 'n': goto yy164;
- case 'f': goto yy163;
+ case 'F': goto yy169;
+ case 'N': case 'n': goto yy171;
+ case 'f': goto yy170;
default: goto yy4;
}
yy13: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'a': goto yy159;
+ case 'a': goto yy166;
default: goto yy4;
}
yy14: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'A': goto yy150;
- case 'a': goto yy151;
+ case 'A': goto yy157;
+ case 'a': goto yy158;
default: goto yy4;
}
yy15: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '.': goto yy149;
- case '0': goto yy140;
+ case '.': goto yy156;
+ case '0': goto yy147;
case '1':
case '2':
case '3':
@@ -176,14 +178,14 @@ yy15: yyaccept = 0;
case '6':
case '7':
case '8':
- case '9': goto yy38;
+ case '9': goto yy45;
default: goto yy4;
}
yy16: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '.': goto yy139;
- case '0': goto yy140;
+ case '.': goto yy146;
+ case '0': goto yy147;
case '1':
case '2':
case '3':
@@ -192,15 +194,15 @@ yy16: yyaccept = 0;
case '6':
case '7':
case '8':
- case '9': goto yy38;
+ case '9': goto yy45;
default: goto yy4;
}
yy17: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\000': goto yy42;
- case ',': goto yy124;
- case '.': goto yy40;
+ case '\000': goto yy49;
+ case ',': goto yy131;
+ case '.': goto yy47;
case '0':
case '1':
case '2':
@@ -208,18 +210,18 @@ yy17: yyaccept = 0;
case '4':
case '5':
case '6':
- case '7': goto yy122;
+ case '7': goto yy129;
case '8':
- case '9': goto yy123;
- case 'x': goto yy126;
+ case '9': goto yy130;
+ case 'x': goto yy133;
default: goto yy4;
}
yy18: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\000': goto yy42;
- case ',': goto yy38;
- case '.': goto yy40;
+ case '\000': goto yy49;
+ case ',': goto yy45;
+ case '.': goto yy47;
case '0':
case '1':
case '2':
@@ -229,85 +231,104 @@ yy18: yyaccept = 0;
case '6':
case '7':
case '8':
- case '9': goto yy37;
+ case '9': goto yy44;
default: goto yy4;
}
yy19: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'I': goto yy24;
- case 'N': goto yy22;
- case 'i': goto yy23;
- case 'n': goto yy21;
+ case 'I': goto yy31;
+ case 'N': goto yy29;
+ case 'i': goto yy30;
+ case 'n': goto yy28;
default: goto yy4;
}
yy20: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy26;
goto yy4;
-yy21: yych = *++YYCURSOR;
+yy21: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case 'a': goto yy36;
- default: goto yy2;
+ case '<': goto yy23;
+ default: goto yy4;
}
yy22: yych = *++YYCURSOR;
+ goto yy4;
+yy23: yych = *++YYCURSOR;
+ if(yych >= '\001') goto yy2;
+yy24: yych = *++YYCURSOR;
+yy25:
+#line 114
+ { return "merge"; }
+yy26: yych = *++YYCURSOR;
+yy27:
+#line 112
+ { return "default"; }
+yy28: yych = *++YYCURSOR;
switch(yych){
- case 'A': goto yy31;
- case 'a': goto yy32;
+ case 'a': goto yy43;
default: goto yy2;
}
-yy23: yych = *++YYCURSOR;
+yy29: yych = *++YYCURSOR;
switch(yych){
- case 'n': goto yy30;
+ case 'A': goto yy38;
+ case 'a': goto yy39;
default: goto yy2;
}
-yy24: yych = *++YYCURSOR;
+yy30: yych = *++YYCURSOR;
switch(yych){
- case 'N': goto yy25;
- case 'n': goto yy26;
+ case 'n': goto yy37;
default: goto yy2;
}
-yy25: yych = *++YYCURSOR;
+yy31: yych = *++YYCURSOR;
switch(yych){
- case 'F': goto yy27;
+ case 'N': goto yy32;
+ case 'n': goto yy33;
default: goto yy2;
}
-yy26: yych = *++YYCURSOR;
+yy32: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy27;
+ case 'F': goto yy34;
default: goto yy2;
}
-yy27: yych = *++YYCURSOR;
+yy33: yych = *++YYCURSOR;
+ switch(yych){
+ case 'f': goto yy34;
+ default: goto yy2;
+ }
+yy34: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy28: yych = *++YYCURSOR;
-yy29:
+yy35: yych = *++YYCURSOR;
+yy36:
#line 98
{ return "float#inf"; }
-yy30: yych = *++YYCURSOR;
+yy37: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy27;
+ case 'f': goto yy34;
default: goto yy2;
}
-yy31: yych = *++YYCURSOR;
+yy38: yych = *++YYCURSOR;
switch(yych){
- case 'N': goto yy33;
+ case 'N': goto yy40;
default: goto yy2;
}
-yy32: yych = *++YYCURSOR;
+yy39: yych = *++YYCURSOR;
switch(yych){
- case 'N': goto yy33;
+ case 'N': goto yy40;
default: goto yy2;
}
-yy33: yych = *++YYCURSOR;
+yy40: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy34: yych = *++YYCURSOR;
-yy35:
+yy41: yych = *++YYCURSOR;
+yy42:
#line 102
{ return "float#nan"; }
-yy36: yych = *++YYCURSOR;
+yy43: yych = *++YYCURSOR;
switch(yych){
- case 'n': goto yy33;
+ case 'n': goto yy40;
default: goto yy2;
}
-yy37: yych = *++YYCURSOR;
+yy44: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -318,14 +339,14 @@ yy37: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy56;
- default: goto yy39;
+ case '9': goto yy63;
+ default: goto yy46;
}
-yy38: ++YYCURSOR;
+yy45: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy39: switch(yych){
- case '\000': goto yy42;
+yy46: switch(yych){
+ case '\000': goto yy49;
case ',': case '0':
case '1':
case '2':
@@ -335,17 +356,17 @@ yy39: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy38;
- case '.': goto yy40;
+ case '9': goto yy45;
+ case '.': goto yy47;
default: goto yy2;
}
-yy40: ++YYCURSOR;
+yy47: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy41: switch(yych){
- case '\000': goto yy46;
- case ',': goto yy44;
- case '.': goto yy48;
+yy48: switch(yych){
+ case '\000': goto yy53;
+ case ',': goto yy51;
+ case '.': goto yy55;
case '0':
case '1':
case '2':
@@ -355,19 +376,19 @@ yy41: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy40;
- case 'E': case 'e': goto yy50;
+ case '9': goto yy47;
+ case 'E': case 'e': goto yy57;
default: goto yy2;
}
-yy42: yych = *++YYCURSOR;
-yy43:
+yy49: yych = *++YYCURSOR;
+yy50:
#line 92
{ return "int"; }
-yy44: ++YYCURSOR;
+yy51: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy45: switch(yych){
- case '\000': goto yy46;
+yy52: switch(yych){
+ case '\000': goto yy53;
case ',': case '0':
case '1':
case '2':
@@ -377,17 +398,17 @@ yy45: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy44;
+ case '9': goto yy51;
default: goto yy2;
}
-yy46: yych = *++YYCURSOR;
-yy47:
+yy53: yych = *++YYCURSOR;
+yy54:
#line 94
{ return "float#fix"; }
-yy48: ++YYCURSOR;
+yy55: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy49: switch(yych){
+yy56: switch(yych){
case '.': case '0':
case '1':
case '2':
@@ -397,23 +418,23 @@ yy49: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy48;
- case 'E': case 'e': goto yy50;
+ case '9': goto yy55;
+ case 'E': case 'e': goto yy57;
default: goto yy2;
}
-yy50: yych = *++YYCURSOR;
+yy57: yych = *++YYCURSOR;
switch(yych){
- case '+': case '-': goto yy51;
+ case '+': case '-': goto yy58;
default: goto yy2;
}
-yy51: yych = *++YYCURSOR;
+yy58: yych = *++YYCURSOR;
if(yych <= '\000') goto yy2;
- goto yy53;
-yy52: ++YYCURSOR;
+ goto yy60;
+yy59: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy53: switch(yych){
- case '\000': goto yy54;
+yy60: switch(yych){
+ case '\000': goto yy61;
case '0':
case '1':
case '2':
@@ -423,14 +444,14 @@ yy53: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy52;
+ case '9': goto yy59;
default: goto yy2;
}
-yy54: yych = *++YYCURSOR;
-yy55:
+yy61: yych = *++YYCURSOR;
+yy62:
#line 96
{ return "float#exp"; }
-yy56: yych = *++YYCURSOR;
+yy63: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -441,15 +462,15 @@ yy56: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy57;
- default: goto yy39;
+ case '9': goto yy64;
+ default: goto yy46;
}
-yy57: yych = *++YYCURSOR;
+yy64: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy58;
- default: goto yy39;
+ case '-': goto yy65;
+ default: goto yy46;
}
-yy58: yych = *++YYCURSOR;
+yy65: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -460,10 +481,10 @@ yy58: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy59;
+ case '9': goto yy66;
default: goto yy2;
}
-yy59: yych = *++YYCURSOR;
+yy66: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -474,15 +495,15 @@ yy59: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy60;
+ case '9': goto yy67;
default: goto yy2;
}
-yy60: yych = *++YYCURSOR;
+yy67: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy61;
+ case '-': goto yy68;
default: goto yy2;
}
-yy61: yych = *++YYCURSOR;
+yy68: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -493,10 +514,10 @@ yy61: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy62;
+ case '9': goto yy69;
default: goto yy2;
}
-yy62: yych = *++YYCURSOR;
+yy69: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -507,12 +528,12 @@ yy62: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy63;
+ case '9': goto yy70;
default: goto yy2;
}
-yy63: yych = *++YYCURSOR;
+yy70: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy64;
+ case '\000': goto yy71;
case '0':
case '1':
case '2':
@@ -523,15 +544,15 @@ yy63: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy2;
- case 'T': goto yy66;
- case 't': goto yy67;
- default: goto yy69;
+ case 'T': goto yy73;
+ case 't': goto yy74;
+ default: goto yy76;
}
-yy64: yych = *++YYCURSOR;
-yy65:
+yy71: yych = *++YYCURSOR;
+yy72:
#line 104
{ return "timestamp#ymd"; }
-yy66: yych = *++YYCURSOR;
+yy73: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -542,10 +563,10 @@ yy66: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy108;
+ case '9': goto yy115;
default: goto yy2;
}
-yy67: yych = *++YYCURSOR;
+yy74: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -556,14 +577,14 @@ yy67: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy90;
+ case '9': goto yy97;
default: goto yy2;
}
-yy68: ++YYCURSOR;
+yy75: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy69: switch(yych){
- case '\t': case ' ': goto yy68;
+yy76: switch(yych){
+ case '\t': case ' ': goto yy75;
case '0':
case '1':
case '2':
@@ -573,10 +594,10 @@ yy69: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy70;
+ case '9': goto yy77;
default: goto yy2;
}
-yy70: yych = *++YYCURSOR;
+yy77: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -587,15 +608,15 @@ yy70: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy71;
+ case '9': goto yy78;
default: goto yy2;
}
-yy71: yych = *++YYCURSOR;
+yy78: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy72;
+ case ':': goto yy79;
default: goto yy2;
}
-yy72: yych = *++YYCURSOR;
+yy79: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -606,10 +627,10 @@ yy72: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy73;
+ case '9': goto yy80;
default: goto yy2;
}
-yy73: yych = *++YYCURSOR;
+yy80: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -620,15 +641,15 @@ yy73: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy74;
+ case '9': goto yy81;
default: goto yy2;
}
-yy74: yych = *++YYCURSOR;
+yy81: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy75;
+ case ':': goto yy82;
default: goto yy2;
}
-yy75: yych = *++YYCURSOR;
+yy82: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -639,10 +660,10 @@ yy75: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy76;
+ case '9': goto yy83;
default: goto yy2;
}
-yy76: yych = *++YYCURSOR;
+yy83: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -653,20 +674,20 @@ yy76: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy77;
+ case '9': goto yy84;
default: goto yy2;
}
-yy77: yych = *++YYCURSOR;
+yy84: yych = *++YYCURSOR;
switch(yych){
- case '\t': case ' ': goto yy80;
- case '.': goto yy78;
+ case '\t': case ' ': goto yy87;
+ case '.': goto yy85;
default: goto yy2;
}
-yy78: ++YYCURSOR;
+yy85: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy79: switch(yych){
- case '\t': case ' ': goto yy80;
+yy86: switch(yych){
+ case '\t': case ' ': goto yy87;
case '0':
case '1':
case '2':
@@ -676,22 +697,22 @@ yy79: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy78;
+ case '9': goto yy85;
default: goto yy2;
}
-yy80: ++YYCURSOR;
+yy87: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy81: switch(yych){
- case '\t': case ' ': goto yy80;
- case '+': case '-': goto yy83;
- case 'Z': goto yy82;
+yy88: switch(yych){
+ case '\t': case ' ': goto yy87;
+ case '+': case '-': goto yy90;
+ case 'Z': goto yy89;
default: goto yy2;
}
-yy82: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy87;
+yy89: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy94;
goto yy2;
-yy83: yych = *++YYCURSOR;
+yy90: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -702,10 +723,10 @@ yy83: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy84;
+ case '9': goto yy91;
default: goto yy2;
}
-yy84: yych = *++YYCURSOR;
+yy91: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -716,16 +737,16 @@ yy84: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy85;
+ case '9': goto yy92;
default: goto yy2;
}
-yy85: yych = *++YYCURSOR;
+yy92: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy87;
- case ':': goto yy86;
+ case '\000': goto yy94;
+ case ':': goto yy93;
default: goto yy2;
}
-yy86: yych = *++YYCURSOR;
+yy93: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -736,14 +757,14 @@ yy86: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy89;
+ case '9': goto yy96;
default: goto yy2;
}
-yy87: yych = *++YYCURSOR;
-yy88:
+yy94: yych = *++YYCURSOR;
+yy95:
#line 108
{ return "timestamp#spaced"; }
-yy89: yych = *++YYCURSOR;
+yy96: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -754,10 +775,10 @@ yy89: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy82;
+ case '9': goto yy89;
default: goto yy2;
}
-yy90: yych = *++YYCURSOR;
+yy97: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -768,15 +789,15 @@ yy90: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy91;
+ case '9': goto yy98;
default: goto yy2;
}
-yy91: yych = *++YYCURSOR;
+yy98: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy92;
+ case ':': goto yy99;
default: goto yy2;
}
-yy92: yych = *++YYCURSOR;
+yy99: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -787,10 +808,10 @@ yy92: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy93;
+ case '9': goto yy100;
default: goto yy2;
}
-yy93: yych = *++YYCURSOR;
+yy100: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -801,15 +822,15 @@ yy93: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy94;
+ case '9': goto yy101;
default: goto yy2;
}
-yy94: yych = *++YYCURSOR;
+yy101: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy95;
+ case ':': goto yy102;
default: goto yy2;
}
-yy95: yych = *++YYCURSOR;
+yy102: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -820,10 +841,10 @@ yy95: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy96;
+ case '9': goto yy103;
default: goto yy2;
}
-yy96: yych = *++YYCURSOR;
+yy103: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -834,12 +855,12 @@ yy96: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy97;
+ case '9': goto yy104;
default: goto yy2;
}
-yy97: yych = *++YYCURSOR;
+yy104: yych = *++YYCURSOR;
switch(yych){
- case '.': goto yy98;
+ case '.': goto yy105;
case '0':
case '1':
case '2':
@@ -850,13 +871,13 @@ yy97: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy2;
- default: goto yy99;
+ default: goto yy106;
}
-yy98: ++YYCURSOR;
+yy105: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy99: switch(yych){
- case '+': case '-': goto yy101;
+yy106: switch(yych){
+ case '+': case '-': goto yy108;
case '0':
case '1':
case '2':
@@ -866,14 +887,14 @@ yy99: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy98;
- case 'Z': goto yy100;
+ case '9': goto yy105;
+ case 'Z': goto yy107;
default: goto yy2;
}
-yy100: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy105;
+yy107: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy112;
goto yy2;
-yy101: yych = *++YYCURSOR;
+yy108: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -884,10 +905,10 @@ yy101: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy102;
+ case '9': goto yy109;
default: goto yy2;
}
-yy102: yych = *++YYCURSOR;
+yy109: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -898,16 +919,16 @@ yy102: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy103;
+ case '9': goto yy110;
default: goto yy2;
}
-yy103: yych = *++YYCURSOR;
+yy110: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy105;
- case ':': goto yy104;
+ case '\000': goto yy112;
+ case ':': goto yy111;
default: goto yy2;
}
-yy104: yych = *++YYCURSOR;
+yy111: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -918,14 +939,14 @@ yy104: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy107;
+ case '9': goto yy114;
default: goto yy2;
}
-yy105: yych = *++YYCURSOR;
-yy106:
+yy112: yych = *++YYCURSOR;
+yy113:
#line 106
{ return "timestamp#iso8601"; }
-yy107: yych = *++YYCURSOR;
+yy114: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -936,10 +957,10 @@ yy107: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy100;
+ case '9': goto yy107;
default: goto yy2;
}
-yy108: yych = *++YYCURSOR;
+yy115: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -950,15 +971,15 @@ yy108: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy109;
+ case '9': goto yy116;
default: goto yy2;
}
-yy109: yych = *++YYCURSOR;
+yy116: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy110;
+ case ':': goto yy117;
default: goto yy2;
}
-yy110: yych = *++YYCURSOR;
+yy117: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -969,10 +990,10 @@ yy110: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy111;
+ case '9': goto yy118;
default: goto yy2;
}
-yy111: yych = *++YYCURSOR;
+yy118: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -983,15 +1004,15 @@ yy111: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy112;
+ case '9': goto yy119;
default: goto yy2;
}
-yy112: yych = *++YYCURSOR;
+yy119: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy113;
+ case ':': goto yy120;
default: goto yy2;
}
-yy113: yych = *++YYCURSOR;
+yy120: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1002,10 +1023,10 @@ yy113: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy114;
+ case '9': goto yy121;
default: goto yy2;
}
-yy114: yych = *++YYCURSOR;
+yy121: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1016,12 +1037,12 @@ yy114: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy115;
+ case '9': goto yy122;
default: goto yy2;
}
-yy115: yych = *++YYCURSOR;
+yy122: yych = *++YYCURSOR;
switch(yych){
- case '.': goto yy116;
+ case '.': goto yy123;
case '0':
case '1':
case '2':
@@ -1032,15 +1053,15 @@ yy115: yych = *++YYCURSOR;
case '7':
case '8':
case '9': goto yy2;
- case 'Z': goto yy118;
- default: goto yy117;
+ case 'Z': goto yy125;
+ default: goto yy124;
}
-yy116: ++YYCURSOR;
+yy123: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yych = *YYCURSOR;
-yy117: switch(yych){
- case '+': case '-': goto yy101;
- case '0': goto yy116;
+yy124: switch(yych){
+ case '+': case '-': goto yy108;
+ case '0': goto yy123;
case '1':
case '2':
case '3':
@@ -1049,20 +1070,20 @@ yy117: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy120;
- case 'Z': goto yy100;
+ case '9': goto yy127;
+ case 'Z': goto yy107;
default: goto yy2;
}
-yy118: yych = *++YYCURSOR;
+yy125: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy119: yych = *++YYCURSOR;
- goto yy106;
-yy120: ++YYCURSOR;
+yy126: yych = *++YYCURSOR;
+ goto yy113;
+yy127: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yych = *YYCURSOR;
-yy121: switch(yych){
- case '+': case '-': goto yy101;
- case '0': goto yy116;
+yy128: switch(yych){
+ case '+': case '-': goto yy108;
+ case '0': goto yy123;
case '1':
case '2':
case '3':
@@ -1071,11 +1092,11 @@ yy121: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy120;
- case 'Z': goto yy118;
+ case '9': goto yy127;
+ case 'Z': goto yy125;
default: goto yy2;
}
-yy122: yych = *++YYCURSOR;
+yy129: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1084,12 +1105,12 @@ yy122: yych = *++YYCURSOR;
case '4':
case '5':
case '6':
- case '7': goto yy137;
+ case '7': goto yy144;
case '8':
- case '9': goto yy135;
- default: goto yy125;
+ case '9': goto yy142;
+ default: goto yy132;
}
-yy123: yych = *++YYCURSOR;
+yy130: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1100,14 +1121,14 @@ yy123: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy135;
- default: goto yy134;
+ case '9': goto yy142;
+ default: goto yy141;
}
-yy124: ++YYCURSOR;
+yy131: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy125: switch(yych){
- case '\000': goto yy131;
+yy132: switch(yych){
+ case '\000': goto yy138;
case ',': case '0':
case '1':
case '2':
@@ -1115,20 +1136,20 @@ yy125: switch(yych){
case '4':
case '5':
case '6':
- case '7': goto yy124;
- case '.': goto yy40;
+ case '7': goto yy131;
+ case '.': goto yy47;
case '8':
- case '9': goto yy133;
+ case '9': goto yy140;
default: goto yy2;
}
-yy126: yych = *++YYCURSOR;
+yy133: yych = *++YYCURSOR;
if(yych <= '\000') goto yy2;
- goto yy128;
-yy127: ++YYCURSOR;
+ goto yy135;
+yy134: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy128: switch(yych){
- case '\000': goto yy129;
+yy135: switch(yych){
+ case '\000': goto yy136;
case ',': case '0':
case '1':
case '2':
@@ -1148,21 +1169,21 @@ yy128: switch(yych){
case 'c':
case 'd':
case 'e':
- case 'f': goto yy127;
+ case 'f': goto yy134;
default: goto yy2;
}
-yy129: yych = *++YYCURSOR;
-yy130:
+yy136: yych = *++YYCURSOR;
+yy137:
#line 88
{ return "int#hex"; }
-yy131: yych = *++YYCURSOR;
-yy132:
+yy138: yych = *++YYCURSOR;
+yy139:
#line 90
{ return "int#oct"; }
-yy133: ++YYCURSOR;
+yy140: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy134: switch(yych){
+yy141: switch(yych){
case ',': case '0':
case '1':
case '2':
@@ -1172,11 +1193,11 @@ yy134: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy133;
- case '.': goto yy40;
+ case '9': goto yy140;
+ case '.': goto yy47;
default: goto yy2;
}
-yy135: yych = *++YYCURSOR;
+yy142: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1187,15 +1208,15 @@ yy135: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy136;
- default: goto yy134;
+ case '9': goto yy143;
+ default: goto yy141;
}
-yy136: yych = *++YYCURSOR;
+yy143: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy58;
- default: goto yy134;
+ case '-': goto yy65;
+ default: goto yy141;
}
-yy137: yych = *++YYCURSOR;
+yy144: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1204,221 +1225,221 @@ yy137: yych = *++YYCURSOR;
case '4':
case '5':
case '6':
- case '7': goto yy138;
+ case '7': goto yy145;
case '8':
- case '9': goto yy136;
- default: goto yy125;
+ case '9': goto yy143;
+ default: goto yy132;
}
-yy138: yych = *++YYCURSOR;
+yy145: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy58;
- default: goto yy125;
+ case '-': goto yy65;
+ default: goto yy132;
}
-yy139: yych = *++YYCURSOR;
+yy146: yych = *++YYCURSOR;
switch(yych){
- case 'I': goto yy142;
- case 'i': goto yy141;
+ case 'I': goto yy149;
+ case 'i': goto yy148;
default: goto yy2;
}
-yy140: yych = *++YYCURSOR;
+yy147: yych = *++YYCURSOR;
switch(yych){
- case '\000': goto yy42;
- case 'x': goto yy126;
- default: goto yy125;
+ case '\000': goto yy49;
+ case 'x': goto yy133;
+ default: goto yy132;
}
-yy141: yych = *++YYCURSOR;
+yy148: yych = *++YYCURSOR;
switch(yych){
- case 'n': goto yy148;
+ case 'n': goto yy155;
default: goto yy2;
}
-yy142: yych = *++YYCURSOR;
+yy149: yych = *++YYCURSOR;
switch(yych){
- case 'N': goto yy143;
- case 'n': goto yy144;
+ case 'N': goto yy150;
+ case 'n': goto yy151;
default: goto yy2;
}
-yy143: yych = *++YYCURSOR;
+yy150: yych = *++YYCURSOR;
switch(yych){
- case 'F': goto yy145;
+ case 'F': goto yy152;
default: goto yy2;
}
-yy144: yych = *++YYCURSOR;
+yy151: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy145;
+ case 'f': goto yy152;
default: goto yy2;
}
-yy145: yych = *++YYCURSOR;
+yy152: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy146: yych = *++YYCURSOR;
-yy147:
+yy153: yych = *++YYCURSOR;
+yy154:
#line 100
{ return "float#neginf"; }
-yy148: yych = *++YYCURSOR;
+yy155: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy145;
+ case 'f': goto yy152;
default: goto yy2;
}
-yy149: yych = *++YYCURSOR;
+yy156: yych = *++YYCURSOR;
switch(yych){
- case 'I': goto yy24;
- case 'i': goto yy23;
+ case 'I': goto yy31;
+ case 'i': goto yy30;
default: goto yy2;
}
-yy150: yych = *++YYCURSOR;
+yy157: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy157;
+ case 'L': goto yy164;
default: goto yy2;
}
-yy151: yych = *++YYCURSOR;
+yy158: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy152;
+ case 'l': goto yy159;
default: goto yy2;
}
-yy152: yych = *++YYCURSOR;
+yy159: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy153;
+ case 's': goto yy160;
default: goto yy2;
}
-yy153: yych = *++YYCURSOR;
+yy160: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy154;
+ case 'e': goto yy161;
default: goto yy2;
}
-yy154: yych = *++YYCURSOR;
+yy161: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy155: yych = *++YYCURSOR;
-yy156:
+yy162: yych = *++YYCURSOR;
+yy163:
#line 86
{ return "bool#no"; }
-yy157: yych = *++YYCURSOR;
+yy164: yych = *++YYCURSOR;
switch(yych){
- case 'S': goto yy158;
+ case 'S': goto yy165;
default: goto yy2;
}
-yy158: yych = *++YYCURSOR;
+yy165: yych = *++YYCURSOR;
switch(yych){
- case 'E': goto yy154;
+ case 'E': goto yy161;
default: goto yy2;
}
-yy159: yych = *++YYCURSOR;
+yy166: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy160;
+ case 'l': goto yy167;
default: goto yy2;
}
-yy160: yych = *++YYCURSOR;
+yy167: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy161;
+ case 's': goto yy168;
default: goto yy2;
}
-yy161: yych = *++YYCURSOR;
+yy168: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy154;
+ case 'e': goto yy161;
default: goto yy2;
}
-yy162: yych = *++YYCURSOR;
+yy169: yych = *++YYCURSOR;
switch(yych){
- case 'F': goto yy154;
+ case 'F': goto yy161;
default: goto yy2;
}
-yy163: yych = *++YYCURSOR;
+yy170: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy154;
+ case 'f': goto yy161;
default: goto yy2;
}
-yy164: yych = *++YYCURSOR;
+yy171: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy165: yych = *++YYCURSOR;
-yy166:
+yy172: yych = *++YYCURSOR;
+yy173:
#line 84
{ return "bool#yes"; }
-yy167: yych = *++YYCURSOR;
+yy174: yych = *++YYCURSOR;
switch(yych){
- case 'f': goto yy154;
+ case 'f': goto yy161;
default: goto yy2;
}
-yy168: yych = *++YYCURSOR;
+yy175: yych = *++YYCURSOR;
switch(yych){
- case 'S': goto yy164;
+ case 'S': goto yy171;
default: goto yy2;
}
-yy169: yych = *++YYCURSOR;
+yy176: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy164;
+ case 's': goto yy171;
default: goto yy2;
}
-yy170: yych = *++YYCURSOR;
+yy177: yych = *++YYCURSOR;
switch(yych){
- case 's': goto yy164;
+ case 's': goto yy171;
default: goto yy2;
}
-yy171: yych = *++YYCURSOR;
+yy178: yych = *++YYCURSOR;
switch(yych){
- case 'U': goto yy174;
+ case 'U': goto yy181;
default: goto yy2;
}
-yy172: yych = *++YYCURSOR;
+yy179: yych = *++YYCURSOR;
switch(yych){
- case 'u': goto yy173;
+ case 'u': goto yy180;
default: goto yy2;
}
-yy173: yych = *++YYCURSOR;
+yy180: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy164;
+ case 'e': goto yy171;
default: goto yy2;
}
-yy174: yych = *++YYCURSOR;
+yy181: yych = *++YYCURSOR;
switch(yych){
- case 'E': goto yy164;
+ case 'E': goto yy171;
default: goto yy2;
}
-yy175: yych = *++YYCURSOR;
+yy182: yych = *++YYCURSOR;
switch(yych){
- case 'u': goto yy176;
+ case 'u': goto yy183;
default: goto yy2;
}
-yy176: yych = *++YYCURSOR;
+yy183: yych = *++YYCURSOR;
switch(yych){
- case 'e': goto yy164;
+ case 'e': goto yy171;
default: goto yy2;
}
-yy177: yych = *++YYCURSOR;
+yy184: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy183;
+ case 'L': goto yy190;
default: goto yy2;
}
-yy178: yych = *++YYCURSOR;
+yy185: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy179;
+ case 'l': goto yy186;
default: goto yy2;
}
-yy179: yych = *++YYCURSOR;
+yy186: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy180;
+ case 'l': goto yy187;
default: goto yy2;
}
-yy180: yych = *++YYCURSOR;
+yy187: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy181: yych = *++YYCURSOR;
-yy182:
+yy188: yych = *++YYCURSOR;
+yy189:
#line 82
{ return "null"; }
-yy183: yych = *++YYCURSOR;
+yy190: yych = *++YYCURSOR;
switch(yych){
- case 'L': goto yy180;
+ case 'L': goto yy187;
default: goto yy2;
}
-yy184: yych = *++YYCURSOR;
+yy191: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy185;
+ case 'l': goto yy192;
default: goto yy2;
}
-yy185: yych = *++YYCURSOR;
+yy192: yych = *++YYCURSOR;
switch(yych){
- case 'l': goto yy180;
+ case 'l': goto yy187;
default: goto yy2;
}
}
-#line 114
+#line 118
}
@@ -1434,14 +1455,14 @@ syck_type_id_to_uri( char *type_id )
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy186;
-yy187: ++YYCURSOR;
-yy186:
+ goto yy193;
+yy194: ++YYCURSOR;
+yy193:
if((YYLIMIT - YYCURSOR) < 20) YYFILL(20);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy188;
- case '!': goto yy192;
+ case '\000': goto yy195;
+ case '!': goto yy199;
case '0':
case '1':
case '2':
@@ -1497,22 +1518,22 @@ yy186:
case 's': case 'u':
case 'v':
case 'w': case 'y':
- case 'z': goto yy194;
- case 't': goto yy189;
- case 'x': goto yy191;
- default: goto yy195;
+ case 'z': goto yy201;
+ case 't': goto yy196;
+ case 'x': goto yy198;
+ default: goto yy202;
}
-yy188: YYCURSOR = YYMARKER;
+yy195: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy190;
+ case 0: goto yy197;
}
-yy189: yyaccept = 0;
+yy196: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case ',': goto yy200;
- case '-': goto yy196;
- case '.': goto yy201;
- case '/': goto yy202;
+ case ',': goto yy207;
+ case '-': goto yy203;
+ case '.': goto yy208;
+ case '/': goto yy209;
case '0':
case '1':
case '2':
@@ -1571,20 +1592,20 @@ yy189: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy198;
- case 'a': goto yy229;
- default: goto yy190;
+ case 'z': goto yy205;
+ case 'a': goto yy236;
+ default: goto yy197;
}
-yy190:
-#line 166
+yy197:
+#line 170
{ return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
-yy191: yyaccept = 0;
+yy198: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case ',': goto yy200;
- case '-': goto yy196;
- case '.': goto yy201;
- case '/': goto yy202;
+ case ',': goto yy207;
+ case '-': goto yy203;
+ case '.': goto yy208;
+ case '/': goto yy209;
case '0':
case '1':
case '2':
@@ -1642,21 +1663,21 @@ yy191: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy198;
- case 'p': goto yy220;
- default: goto yy190;
+ case 'z': goto yy205;
+ case 'p': goto yy227;
+ default: goto yy197;
}
-yy192: yych = *++YYCURSOR;
-yy193:
-#line 140
+yy199: yych = *++YYCURSOR;
+yy200:
+#line 144
{ return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); }
-yy194: yyaccept = 0;
+yy201: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case ',': goto yy200;
- case '-': goto yy196;
- case '.': goto yy201;
- case '/': goto yy202;
+ case ',': goto yy207;
+ case '-': goto yy203;
+ case '.': goto yy208;
+ case '/': goto yy209;
case '0':
case '1':
case '2':
@@ -1716,16 +1737,16 @@ yy194: yyaccept = 0;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy198;
- default: goto yy190;
+ case 'z': goto yy205;
+ default: goto yy197;
}
-yy195: yych = *++YYCURSOR;
- goto yy190;
-yy196: ++YYCURSOR;
+yy202: yych = *++YYCURSOR;
+ goto yy197;
+yy203: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy197: switch(yych){
- case '-': goto yy196;
+yy204: switch(yych){
+ case '-': goto yy203;
case '0':
case '1':
case '2':
@@ -1785,17 +1806,17 @@ yy197: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy198;
- default: goto yy188;
+ case 'z': goto yy205;
+ default: goto yy195;
}
-yy198: ++YYCURSOR;
+yy205: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy199: switch(yych){
- case ',': goto yy200;
- case '-': goto yy196;
- case '.': goto yy201;
- case '/': goto yy202;
+yy206: switch(yych){
+ case ',': goto yy207;
+ case '-': goto yy203;
+ case '.': goto yy208;
+ case '/': goto yy209;
case '0':
case '1':
case '2':
@@ -1855,10 +1876,10 @@ yy199: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy198;
- default: goto yy188;
+ case 'z': goto yy205;
+ default: goto yy195;
}
-yy200: yych = *++YYCURSOR;
+yy207: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1869,10 +1890,10 @@ yy200: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy208;
- default: goto yy188;
+ case '9': goto yy215;
+ default: goto yy195;
}
-yy201: ++YYCURSOR;
+yy208: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
@@ -1935,12 +1956,12 @@ yy201: ++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy204;
- default: goto yy188;
+ case 'z': goto yy211;
+ default: goto yy195;
}
-yy202: yych = *++YYCURSOR;
-yy203:
-#line 142
+yy209: yych = *++YYCURSOR;
+yy210:
+#line 146
{ char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
char *uri;
@@ -1953,14 +1974,14 @@ yy203:
S_FREE( domain );
return uri;
}
-yy204: ++YYCURSOR;
+yy211: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy205: switch(yych){
- case ',': goto yy200;
- case '-': goto yy206;
- case '.': goto yy201;
- case '/': goto yy202;
+yy212: switch(yych){
+ case ',': goto yy207;
+ case '-': goto yy213;
+ case '.': goto yy208;
+ case '/': goto yy209;
case '0':
case '1':
case '2':
@@ -2020,14 +2041,14 @@ yy205: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy204;
- default: goto yy188;
+ case 'z': goto yy211;
+ default: goto yy195;
}
-yy206: ++YYCURSOR;
+yy213: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy207: switch(yych){
- case '-': goto yy206;
+yy214: switch(yych){
+ case '-': goto yy213;
case '0':
case '1':
case '2':
@@ -2087,10 +2108,10 @@ yy207: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy204;
- default: goto yy188;
+ case 'z': goto yy211;
+ default: goto yy195;
}
-yy208: yych = *++YYCURSOR;
+yy215: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2101,10 +2122,10 @@ yy208: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy209;
- default: goto yy188;
+ case '9': goto yy216;
+ default: goto yy195;
}
-yy209: yych = *++YYCURSOR;
+yy216: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2115,10 +2136,10 @@ yy209: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy210;
- default: goto yy188;
+ case '9': goto yy217;
+ default: goto yy195;
}
-yy210: yych = *++YYCURSOR;
+yy217: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2129,16 +2150,16 @@ yy210: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy211;
- default: goto yy188;
+ case '9': goto yy218;
+ default: goto yy195;
}
-yy211: yych = *++YYCURSOR;
+yy218: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy212;
- case '/': goto yy213;
- default: goto yy188;
+ case '-': goto yy219;
+ case '/': goto yy220;
+ default: goto yy195;
}
-yy212: yych = *++YYCURSOR;
+yy219: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2149,12 +2170,12 @@ yy212: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy215;
- default: goto yy188;
+ case '9': goto yy222;
+ default: goto yy195;
}
-yy213: yych = *++YYCURSOR;
-yy214:
-#line 155
+yy220: yych = *++YYCURSOR;
+yy221:
+#line 159
{ char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
char *uri;
@@ -2165,7 +2186,7 @@ yy214:
S_FREE( domain );
return uri;
}
-yy215: yych = *++YYCURSOR;
+yy222: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2176,16 +2197,16 @@ yy215: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy216;
- default: goto yy188;
+ case '9': goto yy223;
+ default: goto yy195;
}
-yy216: yych = *++YYCURSOR;
+yy223: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy217;
- case '/': goto yy213;
- default: goto yy188;
+ case '-': goto yy224;
+ case '/': goto yy220;
+ default: goto yy195;
}
-yy217: yych = *++YYCURSOR;
+yy224: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2196,10 +2217,10 @@ yy217: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy218;
- default: goto yy188;
+ case '9': goto yy225;
+ default: goto yy195;
}
-yy218: yych = *++YYCURSOR;
+yy225: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2210,128 +2231,128 @@ yy218: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy219;
- default: goto yy188;
+ case '9': goto yy226;
+ default: goto yy195;
}
-yy219: yych = *++YYCURSOR;
+yy226: yych = *++YYCURSOR;
switch(yych){
- case '/': goto yy213;
- default: goto yy188;
+ case '/': goto yy220;
+ default: goto yy195;
}
-yy220: yych = *++YYCURSOR;
+yy227: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'r': goto yy221;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'r': goto yy228;
+ default: goto yy204;
}
-yy221: yych = *++YYCURSOR;
+yy228: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'i': goto yy222;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'i': goto yy229;
+ default: goto yy204;
}
-yy222: yych = *++YYCURSOR;
+yy229: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'v': goto yy223;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'v': goto yy230;
+ default: goto yy204;
}
-yy223: yych = *++YYCURSOR;
+yy230: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'a': goto yy224;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'a': goto yy231;
+ default: goto yy204;
}
-yy224: yych = *++YYCURSOR;
+yy231: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 't': goto yy225;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 't': goto yy232;
+ default: goto yy204;
}
-yy225: yych = *++YYCURSOR;
+yy232: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'e': goto yy226;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'e': goto yy233;
+ default: goto yy204;
}
-yy226: yych = *++YYCURSOR;
+yy233: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case ':': goto yy227;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case ':': goto yy234;
+ default: goto yy204;
}
-yy227: yych = *++YYCURSOR;
-yy228:
-#line 138
+yy234: yych = *++YYCURSOR;
+yy235:
+#line 142
{ return type_id; }
-yy229: yych = *++YYCURSOR;
+yy236: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'g': goto yy230;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'g': goto yy237;
+ default: goto yy204;
}
-yy230: yych = *++YYCURSOR;
+yy237: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'u': goto yy231;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'u': goto yy238;
+ default: goto yy204;
}
-yy231: yych = *++YYCURSOR;
+yy238: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'r': goto yy232;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'r': goto yy239;
+ default: goto yy204;
}
-yy232: yych = *++YYCURSOR;
+yy239: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case 'i': goto yy233;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case 'i': goto yy240;
+ default: goto yy204;
}
-yy233: yych = *++YYCURSOR;
+yy240: yych = *++YYCURSOR;
switch(yych){
- case ',': goto yy200;
- case '.': goto yy201;
- case '/': goto yy202;
- case ':': goto yy234;
- default: goto yy197;
+ case ',': goto yy207;
+ case '.': goto yy208;
+ case '/': goto yy209;
+ case ':': goto yy241;
+ default: goto yy204;
}
-yy234: yych = *++YYCURSOR;
+yy241: yych = *++YYCURSOR;
switch(yych){
case ',':
case '-':
- case '.': goto yy188;
- default: goto yy236;
+ case '.': goto yy195;
+ default: goto yy243;
}
-yy235: ++YYCURSOR;
+yy242: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy236: switch(yych){
- case ',': goto yy239;
- case '-': goto yy237;
- case '.': goto yy240;
+yy243: switch(yych){
+ case ',': goto yy246;
+ case '-': goto yy244;
+ case '.': goto yy247;
case '0':
case '1':
case '2':
@@ -2391,14 +2412,14 @@ yy236: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy235;
- default: goto yy188;
+ case 'z': goto yy242;
+ default: goto yy195;
}
-yy237: ++YYCURSOR;
+yy244: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy238: switch(yych){
- case '-': goto yy237;
+yy245: switch(yych){
+ case '-': goto yy244;
case '0':
case '1':
case '2':
@@ -2458,10 +2479,10 @@ yy238: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy235;
- default: goto yy188;
+ case 'z': goto yy242;
+ default: goto yy195;
}
-yy239: yych = *++YYCURSOR;
+yy246: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2472,10 +2493,10 @@ yy239: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy245;
- default: goto yy188;
+ case '9': goto yy252;
+ default: goto yy195;
}
-yy240: ++YYCURSOR;
+yy247: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
switch(yych){
@@ -2538,16 +2559,16 @@ yy240: ++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy241;
- default: goto yy188;
+ case 'z': goto yy248;
+ default: goto yy195;
}
-yy241: ++YYCURSOR;
+yy248: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy242: switch(yych){
- case ',': goto yy239;
- case '-': goto yy243;
- case '.': goto yy240;
+yy249: switch(yych){
+ case ',': goto yy246;
+ case '-': goto yy250;
+ case '.': goto yy247;
case '0':
case '1':
case '2':
@@ -2607,14 +2628,14 @@ yy242: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy241;
- default: goto yy188;
+ case 'z': goto yy248;
+ default: goto yy195;
}
-yy243: ++YYCURSOR;
+yy250: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy244: switch(yych){
- case '-': goto yy243;
+yy251: switch(yych){
+ case '-': goto yy250;
case '0':
case '1':
case '2':
@@ -2674,10 +2695,10 @@ yy244: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy241;
- default: goto yy188;
+ case 'z': goto yy248;
+ default: goto yy195;
}
-yy245: yych = *++YYCURSOR;
+yy252: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2688,10 +2709,10 @@ yy245: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy246;
- default: goto yy188;
+ case '9': goto yy253;
+ default: goto yy195;
}
-yy246: yych = *++YYCURSOR;
+yy253: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2702,10 +2723,10 @@ yy246: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy247;
- default: goto yy188;
+ case '9': goto yy254;
+ default: goto yy195;
}
-yy247: yych = *++YYCURSOR;
+yy254: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2716,16 +2737,16 @@ yy247: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy248;
- default: goto yy188;
+ case '9': goto yy255;
+ default: goto yy195;
}
-yy248: yych = *++YYCURSOR;
+yy255: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy249;
- case ':': goto yy250;
- default: goto yy188;
+ case '-': goto yy256;
+ case ':': goto yy257;
+ default: goto yy195;
}
-yy249: yych = *++YYCURSOR;
+yy256: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2736,14 +2757,14 @@ yy249: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy252;
- default: goto yy188;
+ case '9': goto yy259;
+ default: goto yy195;
}
-yy250: yych = *++YYCURSOR;
-yy251:
-#line 136
+yy257: yych = *++YYCURSOR;
+yy258:
+#line 140
{ return type_id; }
-yy252: yych = *++YYCURSOR;
+yy259: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2754,16 +2775,16 @@ yy252: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy253;
- default: goto yy188;
+ case '9': goto yy260;
+ default: goto yy195;
}
-yy253: yych = *++YYCURSOR;
+yy260: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy254;
- case ':': goto yy250;
- default: goto yy188;
+ case '-': goto yy261;
+ case ':': goto yy257;
+ default: goto yy195;
}
-yy254: yych = *++YYCURSOR;
+yy261: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2774,10 +2795,10 @@ yy254: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy255;
- default: goto yy188;
+ case '9': goto yy262;
+ default: goto yy195;
}
-yy255: yych = *++YYCURSOR;
+yy262: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -2788,16 +2809,16 @@ yy255: yych = *++YYCURSOR;
case '6':
case '7':
case '8':
- case '9': goto yy256;
- default: goto yy188;
+ case '9': goto yy263;
+ default: goto yy195;
}
-yy256: yych = *++YYCURSOR;
+yy263: yych = *++YYCURSOR;
switch(yych){
- case ':': goto yy250;
- default: goto yy188;
+ case ':': goto yy257;
+ default: goto yy195;
}
}
-#line 168
+#line 172
}
diff --git a/ext/syck/token.c b/ext/syck/token.c
index d33b546a733..817689908c2 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Thu Jun 5 11:08:22 2003 */
+/* Generated by re2c 0.5 on Mon Jun 9 18:21:18 2003 */
#line 1 "token.re"
/*
* token.re
@@ -144,7 +144,7 @@
if ( nlDoWhat != NL_KEEP ) \
{ \
char *fc = n->data.str->ptr + n->data.str->len - 1; \
- while ( *fc == '\n' ) fc--; \
+ while ( is_newline( fc ) ) fc--; \
if ( nlDoWhat != NL_CHOMP ) \
fc += 1; \
n->data.str->len = fc - n->data.str->ptr + 1; \
@@ -162,7 +162,7 @@
NEWLINE(indent); \
while ( indent < YYCURSOR ) \
{ \
- if ( *(++indent) == '\n' ) \
+ if ( is_newline( ++indent ) ) \
{ \
NEWLINE(indent); \
} \
@@ -226,7 +226,7 @@ yylex( YYSTYPE *yylval, SyckParser *parser )
return t;
}
-#line 244
+#line 245
if ( YYLINEPTR != YYCURSOR )
@@ -244,89 +244,93 @@ Header:
goto yy0;
yy1: ++YYCURSOR;
yy0:
- if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+ 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 '-': goto yy2;
- default: goto yy10;
+ default: goto yy11;
}
yy2: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '-': goto yy15;
+ case '-': goto yy16;
default: goto yy3;
}
yy3:
-#line 286
+#line 287
{ YYPOS(0);
goto Document;
}
yy4: yych = *++YYCURSOR;
yy5:
-#line 271
+#line 272
{ eat_comments( parser );
goto Header;
}
yy6: yych = *++YYCURSOR;
yy7:
-#line 275
+#line 276
{ SyckLevel *lvl = CURRENT_LEVEL();
ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy8: yych = *++YYCURSOR;
- goto yy12;
+yy8: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy13;
yy9:
-#line 281
+#line 282
{ int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
goto Header;
}
yy10: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy12;
+ default: goto yy3;
+ }
+yy11: yych = *++YYCURSOR;
goto yy3;
-yy11: ++YYCURSOR;
+yy12: yyaccept = 1;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy12: switch(yych){
- case '\n': goto yy11;
- case ' ': goto yy13;
+yy13: switch(yych){
+ case '\n': case ' ': goto yy12;
+ case '\r': goto yy14;
default: goto yy9;
}
-yy13: ++YYCURSOR;
+yy14: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy14: switch(yych){
- case '\n': case ' ': goto yy13;
- default: goto yy9;
- }
-yy15: yych = *++YYCURSOR;
switch(yych){
- case '-': goto yy17;
- default: goto yy16;
+ case '\n': goto yy12;
+ default: goto yy15;
}
-yy16: YYCURSOR = YYMARKER;
+yy15: YYCURSOR = YYMARKER;
switch(yyaccept){
+ case 1: goto yy9;
case 0: goto yy3;
}
-yy17: yych = *++YYCURSOR;
+yy16: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy21;
- case ' ': goto yy18;
- default: goto yy16;
- }
-yy18: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy19: switch(yych){
- case ' ': goto yy18;
- default: goto yy20;
+ case '-': goto yy17;
+ default: goto yy15;
}
-yy20:
-#line 257
+yy17: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy18;
+ case '\r': goto yy22;
+ case ' ': goto yy20;
+ default: goto yy15;
+ }
+yy18: yych = *++YYCURSOR;
+yy19:
+#line 258
{ SyckLevel *lvl = CURRENT_LEVEL();
if ( lvl->status == syck_lvl_header )
{
@@ -340,15 +344,20 @@ yy20:
return 0;
}
}
-yy21: ++YYCURSOR;
+yy20: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy22: switch(yych){
- case '\n': goto yy21;
- default: goto yy20;
+yy21: switch(yych){
+ case ' ': goto yy20;
+ default: goto yy19;
+ }
+yy22: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy18;
+ default: goto yy15;
}
}
-#line 290
+#line 291
Document:
@@ -367,29 +376,31 @@ Document:
goto yy23;
yy24: ++YYCURSOR;
yy23:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy47;
+ case '\000': goto yy48;
case '\n': goto yy25;
- case ' ': goto yy45;
- case '!': goto yy36;
- case '"': goto yy40;
- case '#': goto yy43;
- case '&': goto yy34;
- case '\'': goto yy38;
- case '*': goto yy35;
- case ',': case ':': goto yy31;
- case '-': case '?': goto yy33;
- case '>': case '|': goto yy42;
- case '[': case '{': goto yy27;
- case ']': case '}': goto yy29;
- default: goto yy49;
- }
-yy25: yych = *++YYCURSOR;
- goto yy77;
+ 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;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy78;
yy26:
-#line 304
+#line 305
{ // Isolate spaces
int indt_len;
GOBBLE_UP_INDENT( indt_len, YYTOKEN );
@@ -405,37 +416,46 @@ yy26:
return INDENT;
}
yy27: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy77;
+ default: goto yy28;
+ }
yy28:
-#line 319
+#line 385
+ { ENSURE_IOPEN(lvl, 0, 1);
+ goto Plain;
+ }
+yy29: yych = *++YYCURSOR;
+yy30:
+#line 320
{ ENSURE_IOPEN(lvl, 0, 1);
lvl = CURRENT_LEVEL();
ADD_LEVEL(lvl->spaces + 1, syck_lvl_inline);
return YYTOKEN[0];
}
-yy29: yych = *++YYCURSOR;
-yy30:
-#line 325
+yy31: yych = *++YYCURSOR;
+yy32:
+#line 326
{ POP_LEVEL();
return YYTOKEN[0];
}
-yy31: yych = *++YYCURSOR;
+yy33: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy74;
- case ' ': goto yy71;
- default: goto yy32;
+ case '\n': goto yy72;
+ case '\r': goto yy76;
+ case ' ': goto yy74;
+ default: goto yy28;
}
-yy32:
-#line 384
- { ENSURE_IOPEN(lvl, 0, 1);
- goto Plain;
- }
-yy33: yych = *++YYCURSOR;
+yy34: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy69;
- case ' ': goto yy66;
- default: goto yy32;
+ case '\n': goto yy67;
+ case '\r': goto yy71;
+ case ' ': goto yy69;
+ default: goto yy28;
}
-yy34: yych = *++YYCURSOR;
+yy35: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -496,10 +516,10 @@ yy34: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy63;
- default: goto yy32;
+ case 'z': goto yy64;
+ default: goto yy28;
}
-yy35: yych = *++YYCURSOR;
+yy36: yych = *++YYCURSOR;
switch(yych){
case '-': case '0':
case '1':
@@ -560,29 +580,30 @@ yy35: yych = *++YYCURSOR;
case 'w':
case 'x':
case 'y':
- case 'z': goto yy60;
- default: goto yy32;
+ case 'z': goto yy61;
+ default: goto yy28;
}
-yy36: yych = *++YYCURSOR;
-yy37:
-#line 357
+yy37: yych = *++YYCURSOR;
+yy38:
+#line 358
{ ENSURE_IOPEN(lvl, 0, 1);
goto TransferMethod; }
-yy38: yych = *++YYCURSOR;
-yy39:
-#line 360
+yy39: yych = *++YYCURSOR;
+yy40:
+#line 361
{ ENSURE_IOPEN(lvl, 0, 1);
goto SingleQuote; }
-yy40: yych = *++YYCURSOR;
-yy41:
-#line 363
+yy41: yych = *++YYCURSOR;
+yy42:
+#line 364
{ ENSURE_IOPEN(lvl, 0, 1);
goto DoubleQuote; }
-yy42: yyaccept = 0;
+yy43: yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy58;
- case ' ': goto yy55;
+ case '\n': goto yy56;
+ case '\r': goto yy60;
+ case ' ': goto yy58;
case '+': case '-': case '0':
case '1':
case '2':
@@ -592,42 +613,43 @@ yy42: yyaccept = 0;
case '6':
case '7':
case '8':
- case '9': goto yy52;
- default: goto yy32;
+ case '9': goto yy53;
+ default: goto yy28;
}
-yy43: yych = *++YYCURSOR;
-yy44:
-#line 373
+yy44: yych = *++YYCURSOR;
+yy45:
+#line 374
{ eat_comments( parser );
goto Document;
}
-yy45: yych = *++YYCURSOR;
- goto yy51;
-yy46:
-#line 377
+yy46: yych = *++YYCURSOR;
+ goto yy52;
+yy47:
+#line 378
{ goto Document; }
-yy47: yych = *++YYCURSOR;
-yy48:
-#line 379
+yy48: yych = *++YYCURSOR;
+yy49:
+#line 380
{ ENSURE_IEND(lvl, -1);
YYPOS(0);
return 0;
}
-yy49: yych = *++YYCURSOR;
- goto yy32;
-yy50: ++YYCURSOR;
+yy50: yych = *++YYCURSOR;
+ goto yy28;
+yy51: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy51: switch(yych){
- case ' ': goto yy50;
- default: goto yy46;
+yy52: switch(yych){
+ case ' ': goto yy51;
+ default: goto yy47;
}
-yy52: ++YYCURSOR;
+yy53: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy53: switch(yych){
- case '\n': goto yy58;
- case ' ': goto yy55;
+yy54: switch(yych){
+ case '\n': goto yy56;
+ case '\r': goto yy60;
+ case ' ': goto yy58;
case '+': case '-': case '0':
case '1':
case '2':
@@ -637,23 +659,18 @@ yy53: switch(yych){
case '6':
case '7':
case '8':
- case '9': goto yy52;
- default: goto yy54;
+ case '9': goto yy53;
+ default: goto yy55;
}
-yy54: YYCURSOR = YYMARKER;
+yy55: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy32;
- }
-yy55: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy56: switch(yych){
- case ' ': goto yy55;
- default: goto yy57;
+ case 0: goto yy26;
+ case 1: goto yy28;
}
+yy56: yych = *++YYCURSOR;
yy57:
-#line 366
- { if ( *( YYCURSOR - 1 ) == '\n' )
+#line 367
+ { if ( is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
@@ -663,13 +680,18 @@ yy58: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy59: switch(yych){
- case '\n': goto yy58;
+ case ' ': goto yy58;
default: goto yy57;
}
-yy60: ++YYCURSOR;
+yy60: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy56;
+ default: goto yy55;
+ }
+yy61: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy61: switch(yych){
+yy62: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -729,19 +751,19 @@ yy61: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy60;
- default: goto yy62;
+ case 'z': goto yy61;
+ default: goto yy63;
}
-yy62:
-#line 352
+yy63:
+#line 353
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return ALIAS;
}
-yy63: ++YYCURSOR;
+yy64: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy64: switch(yych){
+yy65: switch(yych){
case '-': case '0':
case '1':
case '2':
@@ -801,27 +823,21 @@ yy64: switch(yych){
case 'w':
case 'x':
case 'y':
- case 'z': goto yy63;
- default: goto yy65;
+ case 'z': goto yy64;
+ default: goto yy66;
}
-yy65:
-#line 347
+yy66:
+#line 348
{ ENSURE_IOPEN(lvl, 0, 1);
yylval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return ANCHOR;
}
-yy66: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy67: switch(yych){
- case ' ': goto yy66;
- default: goto yy68;
- }
+yy67: yych = *++YYCURSOR;
yy68:
-#line 333
+#line 334
{ ENSURE_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
FORCE_NEXT_TOKEN(IOPEN);
- if ( *YYCURSOR == '\n' || *( YYCURSOR - 1 ) == '\n' )
+ if ( is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_doc);
@@ -836,18 +852,17 @@ yy69: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy70: switch(yych){
- case '\n': goto yy69;
+ case ' ': goto yy69;
default: goto yy68;
}
-yy71: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy72: switch(yych){
- case ' ': goto yy71;
- default: goto yy73;
+yy71: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy67;
+ default: goto yy55;
}
+yy72: yych = *++YYCURSOR;
yy73:
-#line 329
+#line 330
{ YYPOS(1);
return YYTOKEN[0];
}
@@ -855,26 +870,32 @@ yy74: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy75: switch(yych){
- case '\n': goto yy74;
+ case ' ': goto yy74;
default: goto yy73;
}
-yy76: ++YYCURSOR;
+yy76: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy72;
+ default: goto yy55;
+ }
+yy77: yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy77: switch(yych){
- case '\n': goto yy76;
- case ' ': goto yy78;
+yy78: switch(yych){
+ case '\n': case ' ': goto yy77;
+ case '\r': goto yy79;
default: goto yy26;
}
-yy78: ++YYCURSOR;
+yy79: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy79: switch(yych){
- case '\n': case ' ': goto yy78;
- default: goto yy26;
+ switch(yych){
+ case '\n': goto yy77;
+ default: goto yy55;
}
}
-#line 388
+#line 389
}
@@ -981,14 +1002,14 @@ yy83: yyaccept = 0;
default: goto yy84;
}
yy84:
-#line 401
+#line 402
{ YYCURSOR = YYTOKTMP;
return DOCSEP;
}
yy85: yych = *++YYCURSOR;
goto yy89;
yy86:
-#line 399
+#line 400
{ goto Directive; }
yy87: yych = *++YYCURSOR;
goto yy84;
@@ -1240,10 +1261,10 @@ yy94: switch(yych){
default: goto yy95;
}
yy95:
-#line 397
+#line 398
{ goto Directive; }
}
-#line 404
+#line 405
}
@@ -1271,21 +1292,23 @@ Plain3:
goto yy96;
yy97: ++YYCURSOR;
yy96:
- if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy107;
+ case '\000': goto yy108;
case '\n': goto yy98;
- case ' ': goto yy105;
- case ',': goto yy104;
- case ':': goto yy100;
- case ']': case '}': goto yy102;
- default: goto yy109;
- }
-yy98: yych = *++YYCURSOR;
- goto yy122;
+ case '\r': goto yy100;
+ case ' ': goto yy106;
+ case ',': goto yy105;
+ case ':': goto yy102;
+ case ']': case '}': goto yy103;
+ default: goto yy110;
+ }
+yy98: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy124;
yy99:
-#line 427
+#line 428
{ int indt_len, nl_count = 0;
SyckLevel *lvl;
char *tok = YYTOKTMP;
@@ -1299,7 +1322,7 @@ yy99:
while ( YYTOKTMP < YYCURSOR )
{
- if ( *YYTOKTMP++ == '\n' )
+ if ( is_newline( YYTOKTMP++ ) )
nl_count++;
}
if ( nl_count <= 1 )
@@ -1319,21 +1342,28 @@ yy99:
}
yy100: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy119;
- case ' ': goto yy116;
+ case '\n': goto yy123;
default: goto yy101;
}
yy101:
-#line 481
+#line 482
{ QUOTECATS(qstr, qcapa, qidx, YYTOKTMP, YYCURSOR - YYTOKTMP);
goto Plain2;
}
-yy102: yych = *++YYCURSOR;
-yy103:
-#line 461
+yy102: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch(yych){
+ case '\n': goto yy118;
+ case '\r': goto yy122;
+ case ' ': goto yy120;
+ default: goto yy101;
+ }
+yy103: yych = *++YYCURSOR;
+yy104:
+#line 462
{ if ( plvl->status != syck_lvl_inline )
{
- if ( *(YYCURSOR - 1) == ' ' || *(YYCURSOR - 1) == '\n' )
+ if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) )
{
YYCURSOR--;
}
@@ -1342,80 +1372,87 @@ yy103:
}
RETURN_IMPLICIT();
}
-yy104: yych = *++YYCURSOR;
+yy105: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
switch(yych){
- case '\n': goto yy114;
- case ' ': goto yy112;
+ case '\n': goto yy113;
+ case '\r': goto yy116;
+ case ' ': goto yy114;
default: goto yy101;
}
-yy105: yych = *++YYCURSOR;
+yy106: yych = *++YYCURSOR;
switch(yych){
- case '#': goto yy110;
- default: goto yy106;
+ case '#': goto yy111;
+ default: goto yy107;
}
-yy106:
-#line 479
+yy107:
+#line 480
{ goto Plain3; }
-yy107: yych = *++YYCURSOR;
-yy108:
-#line 477
+yy108: yych = *++YYCURSOR;
+yy109:
+#line 478
{ RETURN_IMPLICIT(); }
-yy109: yych = *++YYCURSOR;
- goto yy101;
yy110: yych = *++YYCURSOR;
-yy111:
-#line 473
+ goto yy101;
+yy111: yych = *++YYCURSOR;
+yy112:
+#line 474
{ eat_comments( parser );
RETURN_IMPLICIT();
}
-yy112: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy113: switch(yych){
- case ' ': goto yy112;
- default: goto yy103;
- }
+yy113: yych = *++YYCURSOR;
+ goto yy104;
yy114: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy115: switch(yych){
- case '\n': goto yy114;
- default: goto yy103;
+ case ' ': goto yy114;
+ default: goto yy104;
}
-yy116: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy117: switch(yych){
- case ' ': goto yy116;
- default: goto yy118;
+yy116: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy113;
+ default: goto yy117;
}
-yy118:
-#line 459
+yy117: YYCURSOR = YYMARKER;
+ switch(yyaccept){
+ case 0: goto yy99;
+ case 1: goto yy101;
+ }
+yy118: yych = *++YYCURSOR;
+yy119:
+#line 460
{ RETURN_IMPLICIT(); }
-yy119: ++YYCURSOR;
+yy120: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy120: switch(yych){
- case '\n': goto yy119;
- default: goto yy118;
+yy121: switch(yych){
+ case ' ': goto yy120;
+ default: goto yy119;
}
-yy121: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy122: switch(yych){
- case '\n': goto yy121;
- case ' ': goto yy123;
- default: goto yy99;
+yy122: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy118;
+ default: goto yy117;
}
-yy123: ++YYCURSOR;
+yy123: 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;
}
+yy125: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\n': goto yy123;
+ default: goto yy117;
+ }
}
-#line 485
+#line 486
}
@@ -1431,21 +1468,23 @@ SingleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy125;
-yy126: ++YYCURSOR;
-yy125:
+ goto yy126;
+yy127: ++YYCURSOR;
+yy126:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy131;
- case '\n': goto yy127;
- case '\'': goto yy129;
- default: goto yy132;
- }
-yy127: yych = *++YYCURSOR;
- goto yy137;
-yy128:
-#line 499
+ case '\000': goto yy134;
+ case '\n': goto yy128;
+ case '\r': goto yy130;
+ case '\'': goto yy132;
+ default: goto yy135;
+ }
+yy128: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy139;
+yy129:
+#line 500
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1463,7 +1502,7 @@ yy128:
while ( YYTOKTMP < YYCURSOR )
{
- if ( *YYTOKTMP++ == '\n' )
+ if ( is_newline( YYTOKTMP++ ) )
nl_count++;
}
if ( nl_count <= 1 )
@@ -1481,13 +1520,23 @@ yy128:
goto SingleQuote2;
}
-yy129: yych = *++YYCURSOR;
+yy130: yych = *++YYCURSOR;
switch(yych){
- case '\'': goto yy134;
- default: goto yy130;
+ case '\n': goto yy138;
+ default: goto yy131;
}
-yy130:
-#line 539
+yy131:
+#line 554
+ { QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
+ goto SingleQuote2;
+ }
+yy132: yych = *++YYCURSOR;
+ switch(yych){
+ case '\'': goto yy136;
+ default: goto yy133;
+ }
+yy133:
+#line 540
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1501,37 +1550,38 @@ yy130:
yylval->nodeData = n;
return PLAIN;
}
-yy131: yych = *++YYCURSOR;
- goto yy130;
-yy132: yych = *++YYCURSOR;
-yy133:
-#line 553
- { QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
- goto SingleQuote2;
- }
yy134: yych = *++YYCURSOR;
-yy135:
-#line 535
+ goto yy133;
+yy135: yych = *++YYCURSOR;
+ goto yy131;
+yy136: yych = *++YYCURSOR;
+yy137:
+#line 536
{ QUOTECAT(qstr, qcapa, qidx, '\'');
goto SingleQuote2;
}
-yy136: ++YYCURSOR;
+yy138: yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy137: switch(yych){
- case '\n': goto yy136;
- case ' ': goto yy138;
- default: goto yy128;
+yy139: switch(yych){
+ case '\n': case ' ': goto yy138;
+ case '\r': goto yy140;
+ default: goto yy129;
}
-yy138: ++YYCURSOR;
+yy140: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy139: switch(yych){
- case '\n': case ' ': goto yy138;
- default: goto yy128;
+ switch(yych){
+ case '\n': goto yy138;
+ default: goto yy141;
+ }
+yy141: YYCURSOR = YYMARKER;
+ switch(yyaccept){
+ case 0: goto yy129;
}
}
-#line 557
+#line 558
}
@@ -1551,22 +1601,24 @@ DoubleQuote2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy140;
-yy141: ++YYCURSOR;
-yy140:
+ goto yy142;
+yy143: ++YYCURSOR;
+yy142:
if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy146;
- case '\n': goto yy142;
- case '"': goto yy148;
- case '\\': goto yy144;
- default: goto yy149;
- }
-yy142: yych = *++YYCURSOR;
- goto yy162;
-yy143:
-#line 575
+ case '\000': goto yy149;
+ case '\n': goto yy144;
+ case '\r': goto yy146;
+ case '"': goto yy151;
+ case '\\': goto yy148;
+ default: goto yy152;
+ }
+yy144: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy166;
+yy145:
+#line 576
{ int indt_len;
int nl_count = 0;
SyckLevel *lvl;
@@ -1586,7 +1638,7 @@ yy143:
{
while ( YYTOKTMP < YYCURSOR )
{
- if ( *YYTOKTMP++ == '\n' )
+ if ( is_newline( YYTOKTMP++ ) )
nl_count++;
}
if ( nl_count <= 1 )
@@ -1606,25 +1658,31 @@ yy143:
keep_nl = 1;
goto DoubleQuote2;
}
-yy144: yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
+yy146: yych = *++YYCURSOR;
switch(yych){
- case '\n': goto yy153;
- case ' ': goto yy150;
- case '"': case '\\': case 'a':
- case 'b': case 'e':
- case 'f': case 'n': case 'r': case 't': case 'v': goto yy156;
- case 'x': goto yy155;
- default: goto yy145;
+ case '\n': goto yy165;
+ default: goto yy147;
}
-yy145:
-#line 659
+yy147:
+#line 660
{ QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
goto DoubleQuote2;
}
-yy146: yych = *++YYCURSOR;
-yy147:
-#line 645
+yy148: yyaccept = 1;
+ yych = *(YYMARKER = ++YYCURSOR);
+ switch(yych){
+ case '\n': goto yy156;
+ case '\r': goto yy158;
+ case ' ': goto yy153;
+ 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;
+ }
+yy149: yych = *++YYCURSOR;
+yy150:
+#line 646
{ SyckLevel *lvl;
SyckNode *n = syck_alloc_str();
lvl = CURRENT_LEVEL();
@@ -1638,30 +1696,37 @@ yy147:
yylval->nodeData = n;
return PLAIN;
}
-yy148: yych = *++YYCURSOR;
+yy151: yych = *++YYCURSOR;
+ goto yy150;
+yy152: yych = *++YYCURSOR;
goto yy147;
-yy149: yych = *++YYCURSOR;
- goto yy145;
-yy150: ++YYCURSOR;
+yy153: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy151: switch(yych){
- case '\n': goto yy153;
- case ' ': goto yy150;
- default: goto yy152;
+yy154: switch(yych){
+ case '\n': goto yy156;
+ case '\r': goto yy158;
+ case ' ': goto yy153;
+ default: goto yy155;
}
-yy152: YYCURSOR = YYMARKER;
+yy155: YYCURSOR = YYMARKER;
switch(yyaccept){
case 0: goto yy145;
+ case 1: goto yy147;
}
-yy153: yych = *++YYCURSOR;
-yy154:
-#line 640
+yy156: yych = *++YYCURSOR;
+yy157:
+#line 641
{ keep_nl = 0;
YYCURSOR--;
goto DoubleQuote2;
}
-yy155: yych = *++YYCURSOR;
+yy158: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy156;
+ default: goto yy155;
+ }
+yy159: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1682,12 +1747,12 @@ yy155: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy158;
- default: goto yy152;
+ case 'f': goto yy162;
+ default: goto yy155;
}
-yy156: yych = *++YYCURSOR;
-yy157:
-#line 615
+yy160: yych = *++YYCURSOR;
+yy161:
+#line 616
{ char ch = *( YYCURSOR - 1 );
switch ( ch )
{
@@ -1703,7 +1768,7 @@ yy157:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy158: yych = *++YYCURSOR;
+yy162: yych = *++YYCURSOR;
switch(yych){
case '0':
case '1':
@@ -1724,12 +1789,12 @@ yy158: yych = *++YYCURSOR;
case 'c':
case 'd':
case 'e':
- case 'f': goto yy159;
- default: goto yy152;
+ case 'f': goto yy163;
+ default: goto yy155;
}
-yy159: yych = *++YYCURSOR;
-yy160:
-#line 631
+yy163: yych = *++YYCURSOR;
+yy164:
+#line 632
{ long ch;
char *chr_text = syck_strndup( YYTOKTMP, 4 );
chr_text[0] = '0';
@@ -1738,23 +1803,24 @@ yy160:
QUOTECAT(qstr, qcapa, qidx, ch);
goto DoubleQuote2;
}
-yy161: ++YYCURSOR;
+yy165: yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy162: switch(yych){
- case '\n': goto yy161;
- case ' ': goto yy163;
- default: goto yy143;
+yy166: switch(yych){
+ case '\n': case ' ': goto yy165;
+ case '\r': goto yy167;
+ default: goto yy145;
}
-yy163: ++YYCURSOR;
+yy167: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy164: switch(yych){
- case '\n': case ' ': goto yy163;
- default: goto yy143;
+ switch(yych){
+ case '\n': goto yy165;
+ default: goto yy155;
}
}
-#line 663
+#line 664
}
@@ -1765,21 +1831,21 @@ TransferMethod:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy165;
-yy166: ++YYCURSOR;
-yy165:
+ goto yy168;
+yy169: ++YYCURSOR;
+yy168:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy167;
- case '\n': goto yy170;
- case ' ': goto yy168;
- default: goto yy171;
- }
-yy167:yy168: yych = *++YYCURSOR;
- goto yy176;
-yy169:
-#line 672
+ case '\000': goto yy170;
+ case '\n': goto yy171;
+ case '\r': goto yy174;
+ case ' ': goto yy173;
+ default: goto yy176;
+ }
+yy170:yy171: yych = *++YYCURSOR;
+yy172:
+#line 673
{ SyckLevel *lvl;
YYCURSOR = YYTOKTMP;
if ( YYCURSOR == YYTOKEN + 1 )
@@ -1825,28 +1891,29 @@ yy169:
return TRANSFER;
}
-yy170: yych = *++YYCURSOR;
- goto yy174;
-yy171: yych = *++YYCURSOR;
-yy172:
-#line 718
- { goto TransferMethod; }
-yy173: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy174: switch(yych){
- case '\n': goto yy173;
- default: goto yy169;
+yy173: yych = *++YYCURSOR;
+ goto yy179;
+yy174: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy177;
+ default: goto yy175;
}
-yy175: ++YYCURSOR;
+yy175:
+#line 719
+ { goto TransferMethod; }
+yy176: yych = *++YYCURSOR;
+ goto yy175;
+yy177: yych = *++YYCURSOR;
+ goto yy172;
+yy178: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy176: switch(yych){
- case ' ': goto yy175;
- default: goto yy169;
+yy179: switch(yych){
+ case ' ': goto yy178;
+ default: goto yy172;
}
}
-#line 720
+#line 721
}
@@ -1896,24 +1963,26 @@ ScalarBlock2:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy177;
-yy178: ++YYCURSOR;
-yy177:
+ goto yy180;
+yy181: ++YYCURSOR;
+yy180:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy183;
- case '\n': goto yy179;
- case '#': goto yy181;
- default: goto yy185;
+ case '\000': goto yy188;
+ case '\n': goto yy182;
+ case '\r': goto yy184;
+ case '#': goto yy186;
+ default: goto yy190;
}
-yy179: yych = *++YYCURSOR;
- goto yy188;
-yy180:
-#line 768
+yy182: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy192;
+yy183:
+#line 769
{ char *pacer;
char *tok = YYTOKTMP;
- int indt_len = 0, nl_count = 0, fold_nl = 0;
+ int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
GOBBLE_UP_INDENT( indt_len, tok );
lvl = CURRENT_LEVEL();
@@ -1922,12 +1991,10 @@ yy180:
int new_spaces = forceIndent > 0 ? forceIndent : indt_len;
ADD_LEVEL( new_spaces, syck_lvl_block );
lastIndent = indt_len - new_spaces;
- YYCURSOR -= lastIndent;
- goto ScalarBlock2;
+ nl_begin = 1;
+ lvl = CURRENT_LEVEL();
}
-
- lvl = CURRENT_LEVEL();
- if ( lvl->status != syck_lvl_block )
+ else if ( lvl->status != syck_lvl_block )
{
YYCURSOR = YYTOKTMP;
RETURN_BLOCK();
@@ -1945,16 +2012,16 @@ yy180:
pacer = YYTOKTMP;
while ( pacer < YYCURSOR )
{
- if ( *pacer++ == '\n' )
+ if ( is_newline( pacer++ ) )
nl_count++;
}
- if ( fold_nl == 1 )
+ if ( fold_nl == 1 || nl_begin == 1 )
{
nl_count--;
}
- if ( nl_count < 1 )
+ if ( nl_count < 1 && nl_begin == 0 )
{
QUOTECAT(qstr, qcapa, qidx, ' ');
}
@@ -1978,9 +2045,19 @@ yy180:
}
goto ScalarBlock2;
}
-yy181: yych = *++YYCURSOR;
-yy182:
-#line 837
+yy184: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy191;
+ default: goto yy185;
+ }
+yy185:
+#line 855
+ { QUOTECAT(qstr, qcapa, qidx, *YYTOKTMP);
+ goto ScalarBlock2;
+ }
+yy186: yych = *++YYCURSOR;
+yy187:
+#line 836
{ lvl = CURRENT_LEVEL();
if ( lvl->status != syck_lvl_block )
{
@@ -1993,36 +2070,37 @@ yy182:
}
goto ScalarBlock2;
}
-yy183: yych = *++YYCURSOR;
-yy184:
-#line 851
+yy188: yych = *++YYCURSOR;
+yy189:
+#line 850
{ YYCURSOR--;
POP_LEVEL();
RETURN_BLOCK();
}
-yy185: yych = *++YYCURSOR;
-yy186:
-#line 856
- { QUOTECAT(qstr, qcapa, qidx, *YYTOKTMP);
- goto ScalarBlock2;
- }
-yy187: ++YYCURSOR;
+yy190: yych = *++YYCURSOR;
+ goto yy185;
+yy191: yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy188: switch(yych){
- case '\n': goto yy187;
- case ' ': goto yy189;
- default: goto yy180;
+yy192: switch(yych){
+ case '\n': case ' ': goto yy191;
+ case '\r': goto yy193;
+ default: goto yy183;
}
-yy189: ++YYCURSOR;
+yy193: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy190: switch(yych){
- case '\n': case ' ': goto yy189;
- default: goto yy180;
+ switch(yych){
+ case '\n': goto yy191;
+ default: goto yy194;
+ }
+yy194: YYCURSOR = YYMARKER;
+ switch(yyaccept){
+ case 0: goto yy183;
}
}
-#line 861
+#line 860
}
@@ -2040,45 +2118,78 @@ Comment:
{
YYCTYPE yych;
unsigned int yyaccept;
- goto yy191;
-yy192: ++YYCURSOR;
-yy191:
+ goto yy195;
+yy196: ++YYCURSOR;
+yy195:
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
switch(yych){
- case '\000': goto yy193;
- case '\n': goto yy195;
- default: goto yy196;
- }
-yy193: yych = *++YYCURSOR;
-yy194:
-#line 877
+ case '\000': goto yy197;
+ case '\n': goto yy199;
+ case '\r': goto yy200;
+ default: goto yy202;
+ }
+yy197: yych = *++YYCURSOR;
+yy198:
+#line 876
{ SyckLevel *lvl = CURRENT_LEVEL();
YYCURSOR = tok;
return;
}
-yy195: yych = *++YYCURSOR;
- goto yy199;
-yy196: yych = *++YYCURSOR;
-yy197:
-#line 882
+yy199: yyaccept = 0;
+ yych = *(YYMARKER = ++YYCURSOR);
+ goto yy204;
+yy200: yych = *++YYCURSOR;
+ switch(yych){
+ case '\n': goto yy203;
+ default: goto yy201;
+ }
+yy201:
+#line 881
{ goto Comment;
}
-yy198: ++YYCURSOR;
+yy202: yych = *++YYCURSOR;
+ goto yy201;
+yy203: yyaccept = 0;
+ YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy199: switch(yych){
- case '\n': goto yy198;
- default: goto yy194;
+yy204: switch(yych){
+ case '\n': goto yy203;
+ case '\r': goto yy205;
+ default: goto yy198;
+ }
+yy205: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch(yych){
+ case '\n': goto yy203;
+ default: goto yy206;
+ }
+yy206: YYCURSOR = YYMARKER;
+ switch(yyaccept){
+ case 0: goto yy198;
}
}
-#line 885
+#line 884
}
}
+int
+is_newline( char *ptr )
+{
+ if ( *ptr == '\n' )
+ return 1;
+
+ if ( *ptr == '\r' && *( ptr + 1 ) == '\n' )
+ return 1;
+
+ return 0;
+}
+
int
yywrap()
{
diff --git a/lib/yaml/constants.rb b/lib/yaml/constants.rb
index 21aee7e0a60..fb833d3077e 100644
--- a/lib/yaml/constants.rb
+++ b/lib/yaml/constants.rb
@@ -15,19 +15,19 @@ module YAML
WORD_CHAR = 'A-Za-z0-9'
PRINTABLE_CHAR = '-_A-Za-z0-9!?/()$\'". '
NOT_PLAIN_CHAR = '\x7f\x0-\x1f\x80-\x9f'
- ESCAPE_CHAR = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f]'
+ ESCAPE_CHAR = '[\\x00-\\x09\\x0b-\\x1f]'
INDICATOR_CHAR = '*&!|\\\\^@%{}[]='
SPACE_INDICATORS = '-#:,?'
RESTRICTED_INDICATORS = '#:,}]'
DNS_COMP_RE = "\\w(?:[-\\w]*\\w)?"
DNS_NAME_RE = "(?:(?:#{DNS_COMP_RE}\\.)+#{DNS_COMP_RE}|#{DNS_COMP_RE})"
- ESCAPES = %w{\z \x01 \x02 \x03 \x04 \x05 \x06 \a
+ ESCAPES = %w{\x00 \x01 \x02 \x03 \x04 \x05 \x06 \a
\x08 \t \n \v \f \r \x0e \x0f
\x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17
\x18 \x19 \x1a \e \x1c \x1d \x1e \x1f
}
UNESCAPES = {
- 'z' => "\x00", 'a' => "\x07", 'b' => "\x08", 't' => "\x09",
+ 'a' => "\x07", 'b' => "\x08", 't' => "\x09",
'n' => "\x0a", 'v' => "\x0b", 'f' => "\x0c",
'r' => "\x0d", 'e' => "\x1b", '\\' => '\\',
}
@@ -41,11 +41,5 @@ module YAML
:WidthType => 'absolute', :BestWidth => 80,
:UseBlock => false, :UseFold => false, :Encoding => :None
}
- TRANSFER_DOMAINS = {
- 'yaml.org,2002' => {},
- 'ruby.yaml.org,2002' => {}
- }
- PRIVATE_TYPES = {}
- IMPLICIT_TYPES = [ 'null', 'bool', 'time', 'int', 'float' ]
end
diff --git a/lib/yaml/emitter.rb b/lib/yaml/emitter.rb
index 4b8541c2c3f..66c7a6e8137 100644
--- a/lib/yaml/emitter.rb
+++ b/lib/yaml/emitter.rb
@@ -60,6 +60,7 @@ module YAML
# Emit plain, normal flowing text
#
def node_text( value, block = '>' )
+ @seq_map = false
valx = value.dup
if @options[:UseBlock]
block = '|'
@@ -89,6 +90,7 @@ module YAML
# Emit a simple, unqouted string
#
def simple( value )
+ @seq_map = false
self << value.to_s
end
@@ -168,6 +170,7 @@ module YAML
#
if val.length.zero?
self << "{}"
+ @seq_map = false
else
if @buffer.length == 1 and @options[:UseHeader] == false and type.length.zero?
@headless = 1
@@ -213,6 +216,7 @@ module YAML
# Quick sequence
#
def seq( type, &e )
+ @seq_map = false
val = Sequence.new
e.call( val )
self << "#{type} " if type.length.nonzero?
@@ -282,7 +286,7 @@ module YAML
@buffer.push( "" )
#p [ self.id, @level, :END ]
if @level < 0
- YAML.internal_to_utf( header + @buffer.to_s[@headless..-1], @options[:Encoding] )
+ header + @buffer.to_s[@headless..-1]
end
end
end
diff --git a/lib/yaml/encoding.rb b/lib/yaml/encoding.rb
index 59491b53b7f..e361163ac65 100644
--- a/lib/yaml/encoding.rb
+++ b/lib/yaml/encoding.rb
@@ -5,100 +5,6 @@
module YAML
#
- # Encodings ( $-K to ICONV )
- #
- CHARSETS = {
- 'NONE' => 'LATIN1',
- 'ASCII' => 'US-ASCII',
- 'UTF-8' => 'UTF-8',
- 'EUC' => 'EUC-JP',
- 'SJIS' => 'SHIFT-JIS'
- }
-
- #
- # YAML documents can be in UTF-8, UTF-16 or UTF-32
- # So let's read and write in Unicode
- #
-
- @@unicode = false
- begin
- require 'iconv'
- DEFAULTS[:Encoding] = :Utf8
- rescue LoadError
- end
-
- def YAML.unicode; @@unicode; end
- def YAML.unicode=( bool ); @@unicode = bool; end
-
- #
- # Unicode conversion
- #
-
- def YAML.utf_to_internal( str, from_enc )
- return unless str
- to_enc = CHARSETS[$-K]
- case from_enc
- when :Utf32
- Iconv.iconv( to_enc, 'UTF-32', str )[0]
- when :Utf16
- Iconv.iconv( to_enc, 'UTF-16', str )[0]
- when :Utf8
- Iconv.iconv( to_enc, 'UTF-8', str )[0]
- when :None
- str
- else
- raise YAML::Error, ERROR_UNSUPPORTED_ENCODING % from_enc.inspect
- end
- end
-
- def YAML.internal_to_utf( str, to_enc )
- return unless str
- from_enc = CHARSETS[$-K]
- case to_enc
- when :Utf32
- Iconv.iconv( 'UTF-32', from_enc, str )[0]
- when :Utf16
- Iconv.iconv( 'UTF-16', from_enc, str )[0]
- when :Utf8
- Iconv.iconv( 'UTF-8', from_enc, str )[0]
- when :None
- str
- else
- raise YAML::Error, ERROR_UNSUPPORTED_ENCODING % to_enc.inspect
- end
- end
-
- def YAML.sniff_encoding( str )
- unless YAML::unicode
- :None
- else
- case str
- when /^\x00\x00\xFE\xFF/ # UTF-32
- :Utf32
- when /^\xFE\xFF/ # UTF-32BE
- :Utf16
- else
- :Utf8
- end
- end
- end
-
- def YAML.enc_separator( enc )
- case enc
- when :Utf32
- "\000\000\000\n"
- when :Utf16
- "\000\n"
- when :Utf8
- "\n"
- when :None
- "\n"
- else
- raise YAML::Error, ERROR_UNSUPPORTED_ENCODING % enc.inspect
- end
- end
-
- #
# Escape the string, condensing common escapes
#
def YAML.escape( value )
@@ -109,7 +15,7 @@ module YAML
# Unescape the condenses escapes
#
def YAML.unescape( value )
- value.gsub( /\\(?:([nevbr\\fartz])|0?x([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/ ) { |x|
+ value.gsub( /\\(?:([nevfbart\\])|0?x([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/ ) { |x|
if $3
["#$3".hex ].pack('U*')
elsif $2
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index 92aee82daef..b2ac6158493 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -295,19 +295,20 @@ class String
if complex
if self.is_binary_data?
out.binary_base64( self )
+ elsif self =~ /^ |#{YAML::ESCAPE_CHAR}| $/
+ complex = false
else
out.node_text( self )
end
- else
+ end
+ if not complex
ostr = if out.options[:KeepValue]
self
elsif empty?
"''"
- elsif YAML.detect_implicit( self ) != 'str'
+ elsif self =~ /^[^#{YAML::WORD_CHAR}]|#{YAML::ESCAPE_CHAR}|[#{YAML::SPACE_INDICATORS}]( |$)| $|\n|\'/
"\"#{YAML.escape( self )}\""
- elsif self =~ /#{YAML::ESCAPE_CHAR}|[#{YAML::SPACE_INDICATORS}] |\n|\'/
- "\"#{YAML.escape( self )}\""
- elsif self =~ /^[^#{YAML::WORD_CHAR}]/
+ elsif YAML.detect_implicit( self ) != 'str'
"\"#{YAML.escape( self )}\""
else
self