summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-15 07:38:10 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-15 07:38:10 +0000
commit42fd4ff686071388417a5533a6d86d75f89ecbdc (patch)
tree08993a9b6fe63e0639ee7beace5c3f87ec597bd8 /ext/syck
parentd81342e3afc0fda6fc4d44bd431fc693901c0f30 (diff)
* ext/ruby/ext/syck/rubyext.c, lib/implicit.re: timestamp repairs to
timezone and milliseconds. * lib/syck.c (syck_parser_reset_levels): duplicate string literal to avoid warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/implicit.c1129
-rw-r--r--ext/syck/rubyext.c44
-rw-r--r--ext/syck/syck.c3
3 files changed, 596 insertions, 580 deletions
diff --git a/ext/syck/implicit.c b/ext/syck/implicit.c
index d5d96a4..d8a0ed9 100644
--- a/ext/syck/implicit.c
+++ b/ext/syck/implicit.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Sun May 11 19:35:35 2003 */
+/* Generated by re2c 0.5 on Wed May 14 17:12:22 2003 */
#line 1 "implicit.re"
/*
* implicit.re
@@ -144,94 +144,94 @@ yy2: YYCURSOR = YYMARKER;
case 0: goto yy4;
}
yy3: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy185;
+ if(yych <= '\000') goto yy181;
yy4:
#line 112
{ return "str"; }
yy5: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'o') goto yy158;
- if(yych == 'u') goto yy188;
+ if(yych == 'o') goto yy154;
+ if(yych == 'u') goto yy184;
goto yy4;
yy6: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych <= 'U'){
- if(yych == 'O') goto yy158;
+ if(yych == 'O') goto yy154;
if(yych <= 'T') goto yy4;
- goto yy181;
+ goto yy177;
} else {
if(yych <= 'o'){
if(yych <= 'n') goto yy4;
- goto yy158;
+ goto yy154;
} else {
- if(yych == 'u') goto yy182;
+ if(yych == 'u') goto yy178;
goto yy4;
}
}
yy7: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'r') goto yy179;
+ if(yych == 'r') goto yy175;
goto yy4;
yy8: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'R') goto yy175;
- if(yych == 'r') goto yy176;
+ if(yych == 'R') goto yy171;
+ if(yych == 'r') goto yy172;
goto yy4;
yy9: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'e') goto yy174;
+ if(yych == 'e') goto yy170;
goto yy4;
yy10: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'E') goto yy172;
- if(yych == 'e') goto yy173;
+ if(yych == 'E') goto yy168;
+ if(yych == 'e') goto yy169;
goto yy4;
yy11: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'f') goto yy171;
- if(yych == 'n') goto yy168;
+ if(yych == 'f') goto yy167;
+ if(yych == 'n') goto yy164;
goto yy4;
yy12: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych <= 'N'){
- if(yych == 'F') goto yy166;
+ if(yych == 'F') goto yy162;
if(yych <= 'M') goto yy4;
- goto yy168;
+ goto yy164;
} else {
if(yych <= 'f'){
if(yych <= 'e') goto yy4;
- goto yy167;
+ goto yy163;
} else {
- if(yych == 'n') goto yy168;
+ if(yych == 'n') goto yy164;
goto yy4;
}
}
yy13: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'a') goto yy163;
+ if(yych == 'a') goto yy159;
goto yy4;
yy14: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yych == 'A') goto yy154;
- if(yych == 'a') goto yy155;
+ if(yych == 'A') goto yy150;
+ if(yych == 'a') goto yy151;
goto yy4;
yy15: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych <= '/'){
- if(yych == '.') goto yy153;
+ if(yych == '.') goto yy149;
goto yy4;
} else {
- if(yych <= '0') goto yy144;
+ if(yych <= '0') goto yy140;
if(yych <= '9') goto yy38;
goto yy4;
}
yy16: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if(yych <= '/'){
- if(yych == '.') goto yy143;
+ if(yych == '.') goto yy139;
goto yy4;
} else {
- if(yych <= '0') goto yy144;
+ if(yych <= '0') goto yy140;
if(yych <= '9') goto yy38;
goto yy4;
}
@@ -242,17 +242,17 @@ yy17: yyaccept = 0;
if(yych <= '\000') goto yy42;
goto yy4;
} else {
- if(yych <= ',') goto yy128;
+ if(yych <= ',') goto yy124;
if(yych <= '-') goto yy4;
goto yy40;
}
} else {
if(yych <= '9'){
if(yych <= '/') goto yy4;
- if(yych <= '7') goto yy126;
- goto yy127;
+ if(yych <= '7') goto yy122;
+ goto yy123;
} else {
- if(yych == 'x') goto yy130;
+ if(yych == 'x') goto yy126;
goto yy4;
}
}
@@ -438,11 +438,11 @@ yy65:
{ return "timestamp#ymd"; }
yy66: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy112;
+ if(yych <= '9') goto yy108;
goto yy2;
yy67: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy92;
+ if(yych <= '9') goto yy90;
goto yy2;
yy68: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
@@ -480,10 +480,14 @@ yy77: yych = *++YYCURSOR;
yy78: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy79: if(yybm[0+yych] & 16) goto yy78;
- if(yych <= '0') goto yy2;
- if(yych <= '9') goto yy90;
- goto yy2;
+yy79: if(yych <= '\037'){
+ if(yych != '\t') goto yy2;
+ } else {
+ if(yych <= ' ') goto yy80;
+ if(yych <= '/') goto yy2;
+ if(yych <= '9') goto yy78;
+ goto yy2;
+ }
yy80: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
@@ -527,343 +531,318 @@ yy89: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych <= '9') goto yy82;
goto yy2;
-yy90: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy91: if(yybm[0+yych] & 16) goto yy78;
- if(yych <= '\037'){
- if(yych == '\t') goto yy80;
- goto yy2;
- } else {
- if(yych <= ' ') goto yy80;
- if(yych <= '0') goto yy2;
- if(yych <= '9') goto yy90;
- goto yy2;
- }
-yy92: yych = *++YYCURSOR;
+yy90: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy93: yych = *++YYCURSOR;
+yy91: yych = *++YYCURSOR;
if(yych != ':') goto yy2;
-yy94: yych = *++YYCURSOR;
+yy92: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy95: yych = *++YYCURSOR;
+yy93: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy96: yych = *++YYCURSOR;
+yy94: yych = *++YYCURSOR;
if(yych != ':') goto yy2;
-yy97: yych = *++YYCURSOR;
+yy95: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy98: yych = *++YYCURSOR;
+yy96: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy99: yych = *++YYCURSOR;
- if(yych <= '-'){
- if(yych == '+') goto yy103;
+yy97: yych = *++YYCURSOR;
+ if(yych == '.') goto yy98;
+ if(yych <= '/') goto yy99;
+ if(yych <= '9') goto yy2;
+ goto yy99;
+yy98: ++YYCURSOR;
+ if(YYLIMIT == YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+yy99: if(yych <= '-'){
+ if(yych == '+') goto yy101;
if(yych <= ',') goto yy2;
- goto yy103;
+ goto yy101;
} else {
- if(yych <= '.') goto yy100;
- if(yych == 'Z') goto yy102;
- goto yy2;
+ if(yych <= '9'){
+ if(yych <= '/') goto yy2;
+ goto yy98;
+ } else {
+ if(yych != 'Z') goto yy2;
+ }
}
-yy100: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy101: if(yych <= '/') goto yy2;
- if(yych <= '0') goto yy100;
- if(yych <= '9') goto yy110;
+yy100: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy105;
goto yy2;
-yy102: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy107;
- goto yy2;
-yy103: yych = *++YYCURSOR;
+yy101: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy104: yych = *++YYCURSOR;
+yy102: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy105: yych = *++YYCURSOR;
- if(yych <= '\000') goto yy107;
+yy103: yych = *++YYCURSOR;
+ if(yych <= '\000') goto yy105;
if(yych != ':') goto yy2;
-yy106: yych = *++YYCURSOR;
+yy104: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy109;
+ if(yych <= '9') goto yy107;
goto yy2;
-yy107: yych = *++YYCURSOR;
-yy108:
+yy105: yych = *++YYCURSOR;
+yy106:
#line 106
{ return "timestamp#iso8601"; }
-yy109: yych = *++YYCURSOR;
+yy107: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy102;
+ if(yych <= '9') goto yy100;
goto yy2;
-yy110: ++YYCURSOR;
- if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
- yych = *YYCURSOR;
-yy111: if(yych <= '/'){
- if(yych <= '+'){
- if(yych <= '*') goto yy2;
- goto yy103;
- } else {
- if(yych == '-') goto yy103;
- goto yy2;
- }
- } else {
- if(yych <= '9'){
- if(yych <= '0') goto yy100;
- goto yy110;
- } else {
- if(yych == 'Z') goto yy102;
- goto yy2;
- }
- }
-yy112: yych = *++YYCURSOR;
+yy108: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy113: yych = *++YYCURSOR;
+yy109: yych = *++YYCURSOR;
if(yych != ':') goto yy2;
-yy114: yych = *++YYCURSOR;
+yy110: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy115: yych = *++YYCURSOR;
+yy111: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy116: yych = *++YYCURSOR;
+yy112: yych = *++YYCURSOR;
if(yych != ':') goto yy2;
-yy117: yych = *++YYCURSOR;
+yy113: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy118: yych = *++YYCURSOR;
+yy114: yych = *++YYCURSOR;
if(yych <= '/') goto yy2;
if(yych >= ':') goto yy2;
-yy119: yych = *++YYCURSOR;
- if(yych <= '-'){
- if(yych == '+') goto yy103;
- if(yych <= ',') goto yy2;
- goto yy103;
+yy115: yych = *++YYCURSOR;
+ if(yych <= '/'){
+ if(yych != '.') goto yy117;
} else {
- if(yych <= '.') goto yy120;
- if(yych == 'Z') goto yy122;
- goto yy2;
+ if(yych <= '9') goto yy2;
+ if(yych == 'Z') goto yy118;
+ goto yy117;
}
-yy120: ++YYCURSOR;
- if(YYLIMIT == YYCURSOR) YYFILL(1);
- yych = *YYCURSOR;
-yy121: if(yych <= '/') goto yy2;
- if(yych <= '0') goto yy120;
- if(yych <= '9') goto yy124;
- goto yy2;
-yy122: yych = *++YYCURSOR;
- if(yych >= '\001') goto yy2;
-yy123: yych = *++YYCURSOR;
- goto yy108;
-yy124: ++YYCURSOR;
+yy116: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
yych = *YYCURSOR;
-yy125: if(yych <= '/'){
- if(yych <= '+'){
- if(yych <= '*') goto yy2;
- goto yy103;
+yy117: if(yybm[0+yych] & 16) goto yy116;
+ if(yych <= '-'){
+ if(yych == '+') goto yy101;
+ if(yych <= ',') goto yy2;
+ goto yy101;
+ } else {
+ if(yych <= '9'){
+ if(yych <= '0') goto yy2;
+ goto yy120;
} else {
- if(yych == '-') goto yy103;
+ if(yych == 'Z') goto yy100;
goto yy2;
}
+ }
+yy118: yych = *++YYCURSOR;
+ if(yych >= '\001') goto yy2;
+yy119: yych = *++YYCURSOR;
+ goto yy106;
+yy120: ++YYCURSOR;
+ if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
+ yych = *YYCURSOR;
+yy121: if(yybm[0+yych] & 16) goto yy116;
+ if(yych <= '-'){
+ if(yych == '+') goto yy101;
+ if(yych <= ',') goto yy2;
+ goto yy101;
} else {
if(yych <= '9'){
- if(yych <= '0') goto yy120;
- goto yy124;
+ if(yych <= '0') goto yy2;
+ goto yy120;
} else {
- if(yych == 'Z') goto yy122;
+ if(yych == 'Z') goto yy118;
goto yy2;
}
}
-yy126: yych = *++YYCURSOR;
- if(yych <= '/') goto yy129;
- if(yych <= '7') goto yy141;
- if(yych <= '9') goto yy139;
- goto yy129;
-yy127: yych = *++YYCURSOR;
- if(yych <= '/') goto yy138;
- if(yych <= '9') goto yy139;
- goto yy138;
-yy128: ++YYCURSOR;
+yy122: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy125;
+ if(yych <= '7') goto yy137;
+ if(yych <= '9') goto yy135;
+ goto yy125;
+yy123: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy134;
+ if(yych <= '9') goto yy135;
+ goto yy134;
+yy124: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy129: if(yybm[0+yych] & 64) goto yy128;
+yy125: if(yybm[0+yych] & 64) goto yy124;
if(yych <= '.'){
- if(yych <= '\000') goto yy135;
+ if(yych <= '\000') goto yy131;
if(yych <= '-') goto yy2;
goto yy40;
} else {
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy137;
+ if(yych <= '9') goto yy133;
goto yy2;
}
-yy130: yych = *++YYCURSOR;
+yy126: yych = *++YYCURSOR;
if(yych <= '\000') goto yy2;
- goto yy132;
-yy131: ++YYCURSOR;
+ goto yy128;
+yy127: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy132: if(yybm[0+yych] & 128) goto yy131;
+yy128: if(yybm[0+yych] & 128) goto yy127;
if(yych >= '\001') goto yy2;
-yy133: yych = *++YYCURSOR;
-yy134:
+yy129: yych = *++YYCURSOR;
+yy130:
#line 88
{ return "int#hex"; }
-yy135: yych = *++YYCURSOR;
-yy136:
+yy131: yych = *++YYCURSOR;
+yy132:
#line 90
{ return "int#oct"; }
-yy137: ++YYCURSOR;
+yy133: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy138: if(yych <= '-'){
- if(yych == ',') goto yy137;
+yy134: if(yych <= '-'){
+ if(yych == ',') goto yy133;
goto yy2;
} else {
if(yych <= '.') goto yy40;
if(yych <= '/') goto yy2;
- if(yych <= '9') goto yy137;
+ if(yych <= '9') goto yy133;
goto yy2;
}
-yy139: yych = *++YYCURSOR;
- if(yych <= '/') goto yy138;
- if(yych >= ':') goto yy138;
-yy140: yych = *++YYCURSOR;
+yy135: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy134;
+ if(yych >= ':') goto yy134;
+yy136: yych = *++YYCURSOR;
if(yych == '-') goto yy58;
- goto yy138;
-yy141: yych = *++YYCURSOR;
- if(yych <= '/') goto yy129;
- if(yych <= '7') goto yy142;
- if(yych <= '9') goto yy140;
- goto yy129;
-yy142: yych = *++YYCURSOR;
+ goto yy134;
+yy137: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy125;
+ if(yych <= '7') goto yy138;
+ if(yych <= '9') goto yy136;
+ goto yy125;
+yy138: yych = *++YYCURSOR;
if(yych == '-') goto yy58;
- goto yy129;
-yy143: yych = *++YYCURSOR;
- if(yych == 'I') goto yy146;
- if(yych == 'i') goto yy145;
+ goto yy125;
+yy139: yych = *++YYCURSOR;
+ if(yych == 'I') goto yy142;
+ if(yych == 'i') goto yy141;
goto yy2;
-yy144: yych = *++YYCURSOR;
+yy140: yych = *++YYCURSOR;
if(yych <= '\000') goto yy42;
- if(yych == 'x') goto yy130;
- goto yy129;
-yy145: yych = *++YYCURSOR;
- if(yych == 'n') goto yy152;
- goto yy2;
-yy146: yych = *++YYCURSOR;
- if(yych == 'N') goto yy147;
+ if(yych == 'x') goto yy126;
+ goto yy125;
+yy141: yych = *++YYCURSOR;
if(yych == 'n') goto yy148;
goto yy2;
-yy147: yych = *++YYCURSOR;
- if(yych == 'F') goto yy149;
+yy142: yych = *++YYCURSOR;
+ if(yych == 'N') goto yy143;
+ if(yych == 'n') goto yy144;
goto yy2;
-yy148: yych = *++YYCURSOR;
+yy143: yych = *++YYCURSOR;
+ if(yych == 'F') goto yy145;
+ goto yy2;
+yy144: yych = *++YYCURSOR;
if(yych != 'f') goto yy2;
-yy149: yych = *++YYCURSOR;
+yy145: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy150: yych = *++YYCURSOR;
-yy151:
+yy146: yych = *++YYCURSOR;
+yy147:
#line 100
{ return "float#neginf"; }
-yy152: yych = *++YYCURSOR;
- if(yych == 'f') goto yy149;
+yy148: yych = *++YYCURSOR;
+ if(yych == 'f') goto yy145;
goto yy2;
-yy153: yych = *++YYCURSOR;
+yy149: yych = *++YYCURSOR;
if(yych == 'I') goto yy24;
if(yych == 'i') goto yy23;
goto yy2;
-yy154: yych = *++YYCURSOR;
- if(yych == 'L') goto yy161;
+yy150: yych = *++YYCURSOR;
+ if(yych == 'L') goto yy157;
goto yy2;
-yy155: yych = *++YYCURSOR;
+yy151: yych = *++YYCURSOR;
if(yych != 'l') goto yy2;
-yy156: yych = *++YYCURSOR;
+yy152: yych = *++YYCURSOR;
if(yych != 's') goto yy2;
-yy157: yych = *++YYCURSOR;
+yy153: yych = *++YYCURSOR;
if(yych != 'e') goto yy2;
-yy158: yych = *++YYCURSOR;
+yy154: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy159: yych = *++YYCURSOR;
-yy160:
+yy155: yych = *++YYCURSOR;
+yy156:
#line 86
{ return "bool#no"; }
-yy161: yych = *++YYCURSOR;
+yy157: yych = *++YYCURSOR;
if(yych != 'S') goto yy2;
-yy162: yych = *++YYCURSOR;
- if(yych == 'E') goto yy158;
+yy158: yych = *++YYCURSOR;
+ if(yych == 'E') goto yy154;
goto yy2;
-yy163: yych = *++YYCURSOR;
+yy159: yych = *++YYCURSOR;
if(yych != 'l') goto yy2;
-yy164: yych = *++YYCURSOR;
+yy160: yych = *++YYCURSOR;
if(yych != 's') goto yy2;
-yy165: yych = *++YYCURSOR;
- if(yych == 'e') goto yy158;
+yy161: yych = *++YYCURSOR;
+ if(yych == 'e') goto yy154;
goto yy2;
-yy166: yych = *++YYCURSOR;
- if(yych == 'F') goto yy158;
+yy162: yych = *++YYCURSOR;
+ if(yych == 'F') goto yy154;
goto yy2;
-yy167: yych = *++YYCURSOR;
- if(yych == 'f') goto yy158;
+yy163: yych = *++YYCURSOR;
+ if(yych == 'f') goto yy154;
goto yy2;
-yy168: yych = *++YYCURSOR;
+yy164: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy169: yych = *++YYCURSOR;
-yy170:
+yy165: yych = *++YYCURSOR;
+yy166:
#line 84
{ return "bool#yes"; }
+yy167: yych = *++YYCURSOR;
+ if(yych == 'f') goto yy154;
+ goto yy2;
+yy168: yych = *++YYCURSOR;
+ if(yych == 'S') goto yy164;
+ goto yy2;
+yy169: yych = *++YYCURSOR;
+ if(yych == 's') goto yy164;
+ goto yy2;
+yy170: yych = *++YYCURSOR;
+ if(yych == 's') goto yy164;
+ goto yy2;
yy171: yych = *++YYCURSOR;
- if(yych == 'f') goto yy158;
+ if(yych == 'U') goto yy174;
goto yy2;
yy172: yych = *++YYCURSOR;
- if(yych == 'S') goto yy168;
- goto yy2;
+ if(yych != 'u') goto yy2;
yy173: yych = *++YYCURSOR;
- if(yych == 's') goto yy168;
+ if(yych == 'e') goto yy164;
goto yy2;
yy174: yych = *++YYCURSOR;
- if(yych == 's') goto yy168;
+ if(yych == 'E') goto yy164;
goto yy2;
yy175: yych = *++YYCURSOR;
- if(yych == 'U') goto yy178;
- goto yy2;
-yy176: yych = *++YYCURSOR;
if(yych != 'u') goto yy2;
+yy176: yych = *++YYCURSOR;
+ if(yych == 'e') goto yy164;
+ goto yy2;
yy177: yych = *++YYCURSOR;
- if(yych == 'e') goto yy168;
+ if(yych == 'L') goto yy183;
goto yy2;
yy178: yych = *++YYCURSOR;
- if(yych == 'E') goto yy168;
- goto yy2;
-yy179: yych = *++YYCURSOR;
- if(yych != 'u') goto yy2;
-yy180: yych = *++YYCURSOR;
- if(yych == 'e') goto yy168;
- goto yy2;
-yy181: yych = *++YYCURSOR;
- if(yych == 'L') goto yy187;
- goto yy2;
-yy182: yych = *++YYCURSOR;
if(yych != 'l') goto yy2;
-yy183: yych = *++YYCURSOR;
+yy179: yych = *++YYCURSOR;
if(yych != 'l') goto yy2;
-yy184: yych = *++YYCURSOR;
+yy180: yych = *++YYCURSOR;
if(yych >= '\001') goto yy2;
-yy185: yych = *++YYCURSOR;
-yy186:
+yy181: yych = *++YYCURSOR;
+yy182:
#line 82
{ return "null"; }
-yy187: yych = *++YYCURSOR;
- if(yych == 'L') goto yy184;
+yy183: yych = *++YYCURSOR;
+ if(yych == 'L') goto yy180;
goto yy2;
-yy188: yych = *++YYCURSOR;
+yy184: yych = *++YYCURSOR;
if(yych != 'l') goto yy2;
-yy189: yych = *++YYCURSOR;
- if(yych == 'l') goto yy184;
+yy185: yych = *++YYCURSOR;
+ if(yych == 'l') goto yy180;
goto yy2;
}
#line 114
@@ -916,180 +895,180 @@ syck_type_id_to_uri( char *type_id )
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
};
- goto yy190;
-yy191: ++YYCURSOR;
-yy190:
+ goto yy186;
+yy187: ++YYCURSOR;
+yy186:
if((YYLIMIT - YYCURSOR) < 20) YYFILL(20);
yych = *YYCURSOR;
if(yych <= '^'){
if(yych <= '/'){
- if(yych <= '\000') goto yy192;
- if(yych == '!') goto yy196;
- goto yy199;
+ if(yych <= '\000') goto yy188;
+ if(yych == '!') goto yy192;
+ goto yy195;
} else {
- if(yych <= '9') goto yy198;
- if(yych <= '@') goto yy199;
- if(yych <= 'Z') goto yy198;
- goto yy199;
+ if(yych <= '9') goto yy194;
+ if(yych <= '@') goto yy195;
+ if(yych <= 'Z') goto yy194;
+ goto yy195;
}
} else {
if(yych <= 't'){
- if(yych == '`') goto yy199;
- if(yych <= 's') goto yy198;
- goto yy193;
+ if(yych == '`') goto yy195;
+ if(yych <= 's') goto yy194;
+ goto yy189;
} else {
- if(yych == 'x') goto yy195;
- if(yych <= 'z') goto yy198;
- goto yy199;
+ if(yych == 'x') goto yy191;
+ if(yych <= 'z') goto yy194;
+ goto yy195;
}
}
-yy192: YYCURSOR = YYMARKER;
+yy188: YYCURSOR = YYMARKER;
switch(yyaccept){
- case 0: goto yy194;
+ case 0: goto yy190;
}
-yy193: yyaccept = 0;
+yy189: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 64) goto yy200;
+ if(yybm[0+yych] & 64) goto yy196;
if(yych <= '@'){
if(yych <= '.'){
- if(yych <= '+') goto yy194;
- if(yych <= ',') goto yy204;
- goto yy205;
+ if(yych <= '+') goto yy190;
+ if(yych <= ',') goto yy200;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych <= '9') goto yy202;
+ if(yych <= '/') goto yy202;
+ if(yych <= '9') goto yy198;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy202;
- if(yych >= '_') goto yy202;
+ if(yych <= 'Z') goto yy198;
+ if(yych >= '_') goto yy198;
} else {
- if(yych <= '`') goto yy194;
- if(yych <= 'a') goto yy233;
- if(yych <= 'z') goto yy202;
+ if(yych <= '`') goto yy190;
+ if(yych <= 'a') goto yy229;
+ if(yych <= 'z') goto yy198;
}
}
-yy194:
+yy190:
#line 166
{ return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
-yy195: yyaccept = 0;
+yy191: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 64) goto yy200;
+ if(yybm[0+yych] & 64) goto yy196;
if(yych <= 'Z'){
if(yych <= '.'){
- if(yych <= '+') goto yy194;
- if(yych <= ',') goto yy204;
- goto yy205;
+ if(yych <= '+') goto yy190;
+ if(yych <= ',') goto yy200;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych <= '9') goto yy202;
- if(yych <= '@') goto yy194;
- goto yy202;
+ if(yych <= '/') goto yy202;
+ if(yych <= '9') goto yy198;
+ if(yych <= '@') goto yy190;
+ goto yy198;
}
} else {
if(yych <= '`'){
- if(yych == '_') goto yy202;
- goto yy194;
+ if(yych == '_') goto yy198;
+ goto yy190;
} else {
- if(yych == 'p') goto yy224;
- if(yych <= 'z') goto yy202;
- goto yy194;
+ if(yych == 'p') goto yy220;
+ if(yych <= 'z') goto yy198;
+ goto yy190;
}
}
-yy196: yych = *++YYCURSOR;
-yy197:
+yy192: yych = *++YYCURSOR;
+yy193:
#line 140
{ return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); }
-yy198: yyaccept = 0;
+yy194: yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if(yybm[0+yych] & 64) goto yy200;
+ if(yybm[0+yych] & 64) goto yy196;
if(yych <= '@'){
if(yych <= '.'){
- if(yych <= '+') goto yy194;
- if(yych <= ',') goto yy204;
- goto yy205;
+ if(yych <= '+') goto yy190;
+ if(yych <= ',') goto yy200;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych <= '9') goto yy202;
- goto yy194;
+ if(yych <= '/') goto yy202;
+ if(yych <= '9') goto yy198;
+ goto yy190;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy202;
- if(yych <= '^') goto yy194;
- goto yy202;
+ if(yych <= 'Z') goto yy198;
+ if(yych <= '^') goto yy190;
+ goto yy198;
} else {
- if(yych <= '`') goto yy194;
- if(yych <= 'z') goto yy202;
- goto yy194;
+ if(yych <= '`') goto yy190;
+ if(yych <= 'z') goto yy198;
+ goto yy190;
}
}
-yy199: yych = *++YYCURSOR;
- goto yy194;
-yy200: ++YYCURSOR;
+yy195: yych = *++YYCURSOR;
+ goto yy190;
+yy196: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy201: if(yybm[0+yych] & 64) goto yy200;
+yy197: if(yybm[0+yych] & 64) goto yy196;
if(yych <= 'Z'){
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy202;
- if(yych <= '@') goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy198;
+ if(yych <= '@') goto yy188;
} else {
if(yych <= '_'){
- if(yych <= '^') goto yy192;
+ if(yych <= '^') goto yy188;
} else {
- if(yych <= '`') goto yy192;
- if(yych >= '{') goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych >= '{') goto yy188;
}
}
-yy202: ++YYCURSOR;
+yy198: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy203: if(yybm[0+yych] & 64) goto yy200;
+yy199: if(yybm[0+yych] & 64) goto yy196;
if(yych <= '@'){
if(yych <= '.'){
- if(yych <= '+') goto yy192;
- if(yych >= '-') goto yy205;
+ if(yych <= '+') goto yy188;
+ if(yych >= '-') goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych <= '9') goto yy202;
- goto yy192;
+ if(yych <= '/') goto yy202;
+ if(yych <= '9') goto yy198;
+ goto yy188;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy202;
- if(yych <= '^') goto yy192;
- goto yy202;
+ if(yych <= 'Z') goto yy198;
+ if(yych <= '^') goto yy188;
+ goto yy198;
} else {
- if(yych <= '`') goto yy192;
- if(yych <= 'z') goto yy202;
- goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych <= 'z') goto yy198;
+ goto yy188;
}
}
-yy204: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy212;
- goto yy192;
-yy205: ++YYCURSOR;
+yy200: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy208;
+ goto yy188;
+yy201: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if(yych <= 'Z'){
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy208;
- if(yych <= '@') goto yy192;
- goto yy208;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy204;
+ if(yych <= '@') goto yy188;
+ goto yy204;
} else {
if(yych <= '_'){
- if(yych <= '^') goto yy192;
- goto yy208;
+ if(yych <= '^') goto yy188;
+ goto yy204;
} else {
- if(yych <= '`') goto yy192;
- if(yych <= 'z') goto yy208;
- goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych <= 'z') goto yy204;
+ goto yy188;
}
}
-yy206: yych = *++YYCURSOR;
-yy207:
+yy202: yych = *++YYCURSOR;
+yy203:
#line 142
{ char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
char *uri;
@@ -1103,71 +1082,71 @@ yy207:
S_FREE( domain );
return uri;
}
-yy208: ++YYCURSOR;
+yy204: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy209: if(yych <= '9'){
+yy205: if(yych <= '9'){
if(yych <= '-'){
- if(yych <= '+') goto yy192;
- if(yych <= ',') goto yy204;
+ if(yych <= '+') goto yy188;
+ if(yych <= ',') goto yy200;
} else {
- if(yych <= '.') goto yy205;
- if(yych <= '/') goto yy206;
- goto yy208;
+ if(yych <= '.') goto yy201;
+ if(yych <= '/') goto yy202;
+ goto yy204;
}
} else {
if(yych <= '^'){
- if(yych <= '@') goto yy192;
- if(yych <= 'Z') goto yy208;
- goto yy192;
+ if(yych <= '@') goto yy188;
+ if(yych <= 'Z') goto yy204;
+ goto yy188;
} else {
- if(yych == '`') goto yy192;
- if(yych <= 'z') goto yy208;
- goto yy192;
+ if(yych == '`') goto yy188;
+ if(yych <= 'z') goto yy204;
+ goto yy188;
}
}
-yy210: ++YYCURSOR;
+yy206: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy211: if(yych <= '@'){
+yy207: if(yych <= '@'){
if(yych <= '-'){
- if(yych <= ',') goto yy192;
- goto yy210;
+ if(yych <= ',') goto yy188;
+ goto yy206;
} else {
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy208;
- goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy204;
+ goto yy188;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy208;
- if(yych <= '^') goto yy192;
- goto yy208;
+ if(yych <= 'Z') goto yy204;
+ if(yych <= '^') goto yy188;
+ goto yy204;
} else {
- if(yych <= '`') goto yy192;
- if(yych <= 'z') goto yy208;
- goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych <= 'z') goto yy204;
+ goto yy188;
}
}
+yy208: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy209: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy210: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy211: yych = *++YYCURSOR;
+ if(yych == '-') goto yy212;
+ if(yych == '/') goto yy213;
+ goto yy188;
yy212: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy215;
+ goto yy188;
yy213: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy214: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy215: yych = *++YYCURSOR;
- if(yych == '-') goto yy216;
- if(yych == '/') goto yy217;
- goto yy192;
-yy216: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy219;
- goto yy192;
-yy217: yych = *++YYCURSOR;
-yy218:
+yy214:
#line 155
{ char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
char *uri;
@@ -1179,286 +1158,286 @@ yy218:
S_FREE( domain );
return uri;
}
+yy215: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy216: yych = *++YYCURSOR;
+ if(yych == '-') goto yy217;
+ if(yych == '/') goto yy213;
+ goto yy188;
+yy217: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy218: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
yy219: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
+ if(yych == '/') goto yy213;
+ goto yy188;
yy220: yych = *++YYCURSOR;
- if(yych == '-') goto yy221;
- if(yych == '/') goto yy217;
- goto yy192;
-yy221: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy222: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy223: yych = *++YYCURSOR;
- if(yych == '/') goto yy217;
- goto yy192;
-yy224: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'r') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'r') goto yy197;
}
-yy225: yych = *++YYCURSOR;
+yy221: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'i') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'i') goto yy197;
}
-yy226: yych = *++YYCURSOR;
+yy222: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'v') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'v') goto yy197;
}
-yy227: yych = *++YYCURSOR;
+yy223: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'a') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'a') goto yy197;
}
-yy228: yych = *++YYCURSOR;
+yy224: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 't') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 't') goto yy197;
}
-yy229: yych = *++YYCURSOR;
+yy225: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'e') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'e') goto yy197;
}
-yy230: yych = *++YYCURSOR;
+yy226: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != ':') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != ':') goto yy197;
}
-yy231: yych = *++YYCURSOR;
-yy232:
+yy227: yych = *++YYCURSOR;
+yy228:
#line 138
{ return type_id; }
-yy233: yych = *++YYCURSOR;
+yy229: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'g') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'g') goto yy197;
}
-yy234: yych = *++YYCURSOR;
+yy230: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'u') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'u') goto yy197;
}
-yy235: yych = *++YYCURSOR;
+yy231: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'r') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'r') goto yy197;
}
-yy236: yych = *++YYCURSOR;
+yy232: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != 'i') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != 'i') goto yy197;
}
-yy237: yych = *++YYCURSOR;
+yy233: yych = *++YYCURSOR;
if(yych <= '.'){
- if(yych == ',') goto yy204;
- if(yych <= '-') goto yy201;
- goto yy205;
+ if(yych == ',') goto yy200;
+ if(yych <= '-') goto yy197;
+ goto yy201;
} else {
- if(yych <= '/') goto yy206;
- if(yych != ':') goto yy201;
+ if(yych <= '/') goto yy202;
+ if(yych != ':') goto yy197;
}
-yy238: yych = *++YYCURSOR;
- if(yych <= '+') goto yy240;
- if(yych <= '.') goto yy192;
- goto yy240;
-yy239: ++YYCURSOR;
+yy234: yych = *++YYCURSOR;
+ if(yych <= '+') goto yy236;
+ if(yych <= '.') goto yy188;
+ goto yy236;
+yy235: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy240: if(yych <= '9'){
+yy236: if(yych <= '9'){
if(yych <= '-'){
- if(yych <= '+') goto yy192;
- if(yych <= ',') goto yy243;
+ if(yych <= '+') goto yy188;
+ if(yych <= ',') goto yy239;
} else {
- if(yych <= '.') goto yy244;
- if(yych <= '/') goto yy192;
- goto yy239;
+ if(yych <= '.') goto yy240;
+ if(yych <= '/') goto yy188;
+ goto yy235;
}
} else {
if(yych <= '^'){
- if(yych <= '@') goto yy192;
- if(yych <= 'Z') goto yy239;
- goto yy192;
+ if(yych <= '@') goto yy188;
+ if(yych <= 'Z') goto yy235;
+ goto yy188;
} else {
- if(yych == '`') goto yy192;
- if(yych <= 'z') goto yy239;
- goto yy192;
+ if(yych == '`') goto yy188;
+ if(yych <= 'z') goto yy235;
+ goto yy188;
}
}
-yy241: ++YYCURSOR;
+yy237: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy242: if(yych <= '@'){
+yy238: if(yych <= '@'){
if(yych <= '-'){
- if(yych <= ',') goto yy192;
- goto yy241;
+ if(yych <= ',') goto yy188;
+ goto yy237;
} else {
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy239;
- goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy235;
+ goto yy188;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy239;
- if(yych <= '^') goto yy192;
- goto yy239;
+ if(yych <= 'Z') goto yy235;
+ if(yych <= '^') goto yy188;
+ goto yy235;
} else {
- if(yych <= '`') goto yy192;
- if(yych <= 'z') goto yy239;
- goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych <= 'z') goto yy235;
+ goto yy188;
}
}
-yy243: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy249;
- goto yy192;
-yy244: ++YYCURSOR;
+yy239: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy245;
+ goto yy188;
+yy240: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if(yych <= 'Z'){
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy245;
- if(yych <= '@') goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy241;
+ if(yych <= '@') goto yy188;
} else {
if(yych <= '_'){
- if(yych <= '^') goto yy192;
+ if(yych <= '^') goto yy188;
} else {
- if(yych <= '`') goto yy192;
- if(yych >= '{') goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych >= '{') goto yy188;
}
}
-yy245: ++YYCURSOR;
+yy241: ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
-yy246: if(yych <= '9'){
+yy242: if(yych <= '9'){
if(yych <= '-'){
- if(yych <= '+') goto yy192;
- if(yych <= ',') goto yy243;
+ if(yych <= '+') goto yy188;
+ if(yych <= ',') goto yy239;
} else {
- if(yych <= '.') goto yy244;
- if(yych <= '/') goto yy192;
- goto yy245;
+ if(yych <= '.') goto yy240;
+ if(yych <= '/') goto yy188;
+ goto yy241;
}
} else {
if(yych <= '^'){
- if(yych <= '@') goto yy192;
- if(yych <= 'Z') goto yy245;
- goto yy192;
+ if(yych <= '@') goto yy188;
+ if(yych <= 'Z') goto yy241;
+ goto yy188;
} else {
- if(yych == '`') goto yy192;
- if(yych <= 'z') goto yy245;
- goto yy192;
+ if(yych == '`') goto yy188;
+ if(yych <= 'z') goto yy241;
+ goto yy188;
}
}
-yy247: ++YYCURSOR;
+yy243: ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
-yy248: if(yych <= '@'){
+yy244: if(yych <= '@'){
if(yych <= '-'){
- if(yych <= ',') goto yy192;
- goto yy247;
+ if(yych <= ',') goto yy188;
+ goto yy243;
} else {
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy245;
- goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy241;
+ goto yy188;
}
} else {
if(yych <= '_'){
- if(yych <= 'Z') goto yy245;
- if(yych <= '^') goto yy192;
- goto yy245;
+ if(yych <= 'Z') goto yy241;
+ if(yych <= '^') goto yy188;
+ goto yy241;
} else {
- if(yych <= '`') goto yy192;
- if(yych <= 'z') goto yy245;
- goto yy192;
+ if(yych <= '`') goto yy188;
+ if(yych <= 'z') goto yy241;
+ goto yy188;
}
}
+yy245: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy246: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy247: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy248: yych = *++YYCURSOR;
+ if(yych == '-') goto yy249;
+ if(yych == ':') goto yy250;
+ goto yy188;
yy249: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych <= '9') goto yy252;
+ goto yy188;
yy250: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy251: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
+yy251:
+#line 136
+ { return type_id; }
yy252: yych = *++YYCURSOR;
- if(yych == '-') goto yy253;
- if(yych == ':') goto yy254;
- goto yy192;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
yy253: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych <= '9') goto yy256;
- goto yy192;
+ if(yych == '-') goto yy254;
+ if(yych == ':') goto yy250;
+ goto yy188;
yy254: yych = *++YYCURSOR;
-yy255:
-#line 136
- { return type_id; }
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
+yy255: yych = *++YYCURSOR;
+ if(yych <= '/') goto yy188;
+ if(yych >= ':') goto yy188;
yy256: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy257: yych = *++YYCURSOR;
- if(yych == '-') goto yy258;
- if(yych == ':') goto yy254;
- goto yy192;
-yy258: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy259: yych = *++YYCURSOR;
- if(yych <= '/') goto yy192;
- if(yych >= ':') goto yy192;
-yy260: yych = *++YYCURSOR;
- if(yych == ':') goto yy254;
- goto yy192;
+ if(yych == ':') goto yy250;
+ goto yy188;
}
#line 168
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 6be76d4..d8aeb5e 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -14,7 +14,7 @@
#define RUBY_DOMAIN "ruby.yaml.org,2002"
-static ID s_utc, s_read, s_binmode;
+static ID s_utc, s_at, s_to_f, s_read, s_binmode;
static VALUE sym_model, sym_generic;
static VALUE sym_scalar, sym_seq, sym_map;
VALUE cParser, cLoader, cNode, oDefaultLoader;
@@ -114,7 +114,7 @@ rb_syck_mktime(str)
{
VALUE time;
char *ptr = str;
- VALUE year, mon, day, hour, min, sec;
+ VALUE year, mon, day, hour, min, sec, usec;
// Year
ptr[4] = '\0';
@@ -145,7 +145,41 @@ rb_syck_mktime(str)
while ( !isdigit( *ptr ) ) ptr++;
sec = INT2FIX(strtol(ptr, NULL, 10));
- time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec );
+ // Millisecond
+ ptr += 2;
+ usec = INT2FIX( strtod( ptr, NULL ) * 1000000 );
+
+ // Make UTC time
+ time = rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, usec);
+
+ // Time Zone
+ while ( *ptr != 'Z' && *ptr != '+' && *ptr != '-' && *ptr != '\0' ) ptr++;
+ if ( *ptr == '-' || *ptr == '+' )
+ {
+ long tz_offset = 0;
+ double utc_time = 0;
+ tz_offset += strtol(ptr, NULL, 10) * 3600;
+
+ while ( *ptr != ':' && *ptr != '\0' ) ptr++;
+ if ( *ptr == ':' )
+ {
+ ptr += 1;
+ if ( tz_offset < 0 )
+ {
+ tz_offset -= strtol(ptr, NULL, 10) * 60;
+ }
+ else
+ {
+ tz_offset += strtol(ptr, NULL, 10) * 60;
+ }
+ }
+
+ // Make TZ time
+ utc_time = NUM2DBL(rb_funcall(time, s_to_f, 0));
+ utc_time -= tz_offset;
+ time = rb_funcall(rb_cTime, s_at, 1, rb_float_new(utc_time));
+ }
+
return time;
}
@@ -284,7 +318,7 @@ rb_syck_load_handler(p, n)
else if ( strcmp( n->type_id, "timestamp#ymd" ) == 0 )
{
S_REALLOC_N( n->data.str->ptr, char, 22 );
- strcat( n->data.str->ptr, "t12:00:00Z" );
+ strcat( n->data.str->ptr, "t00:00:00Z" );
obj = rb_syck_mktime( n->data.str->ptr );
}
else if ( strncmp( n->type_id, "timestamp", 9 ) == 0 )
@@ -789,6 +823,8 @@ Init_syck()
// Global symbols
//
s_utc = rb_intern("utc");
+ s_at = rb_intern("at");
+ s_to_f = rb_intern("to_f");
s_read = rb_intern("read");
s_binmode = rb_intern("binmode");
sym_model = ID2SYM(rb_intern("Model"));
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index df68768..683f4c8 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -119,7 +119,7 @@ syck_parser_reset_levels( SyckParser *p )
{
p->lvl_idx = 1;
p->levels[0].spaces = -1;
- p->levels[0].domain = ""; // YAML_DOMAIN + "/";
+ p->levels[0].domain = syck_strndup( "", 0 );
p->levels[0].status = syck_lvl_header;
}
}
@@ -220,6 +220,7 @@ syck_free_parser( SyckParser *p )
// Free all else
//
syck_parser_reset_levels( p );
+ S_FREE( p->levels[0].domain );
S_FREE( p->levels );
if ( p->buffer != NULL )