Browse files

fix grammars (previous re2c mode resulted in broken utf-support)

Signed-off-by: why the lucky stiff <why@whytheluckystiff.net>
  • Loading branch information...
1 parent f158bfd commit 3d03cb9cec65946522d9ad1f14151dee38e33c8c Jimi Dini committed with why the lucky stiff Jan 11, 2009
Showing with 4,095 additions and 2,106 deletions.
  1. +1 −1 lib/Makefile.am
  2. +456 −192 lib/bytecode.c
  3. +2,504 −1,015 lib/implicit.c
  4. +2 −2 lib/implicit.re
  5. +1,132 −896 lib/token.c
View
2 lib/Makefile.am
@@ -5,7 +5,7 @@ SUFFIXES = .re
CFLAGS = -fPIC
.re.c:
- $(REC) -bi $< > $@.new && mv $@.new $@
+ $(REC) -i $< > $@.new && mv $@.new $@
lib_LIBRARIES = libsyck.a
include_HEADERS = syck.h syck_st.h
View
648 lib/bytecode.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Jun 2 14:42:51 2008 */
+/* Generated by re2c 0.13.5 on Tue Nov 18 20:30:02 2008 */
/*
* bytecode.re
*
@@ -164,16 +164,21 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- if (yych <= 0x00) goto yy2;
- if (yych == 'D') goto yy3;
- goto yy5;
+ switch (yych) {
+ case 0x00: goto yy2;
+ case 'D': goto yy3;
+ default: goto yy5;
+ }
yy2:
YYCURSOR = YYMARKER;
goto yy4;
yy3:
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '\n') goto yy6;
- if (yych == '\r') goto yy8;
+ switch (yych) {
+ case '\n': goto yy6;
+ case '\r': goto yy8;
+ default: goto yy4;
+ }
yy4:
{ YYPOS(0);
goto Document;
@@ -197,8 +202,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy8:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy6;
- goto yy2;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy6;
+ default: goto yy2;
+ }
}
@@ -217,68 +224,58 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- if (yych <= 'E') {
- if (yych <= '\r') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy30;
- } else {
- if (yych <= '\n') goto yy27;
- if (yych >= '\r') goto yy29;
- }
- } else {
- if (yych <= 'A') {
- if (yych >= 'A') goto yy19;
- } else {
- if (yych <= 'C') goto yy11;
- if (yych <= 'D') goto yy12;
- goto yy16;
- }
- }
- } else {
- if (yych <= 'Q') {
- if (yych <= 'M') {
- if (yych >= 'M') goto yy14;
- } else {
- if (yych <= 'O') goto yy11;
- if (yych <= 'P') goto yy13;
- goto yy15;
- }
- } else {
- if (yych <= 'T') {
- if (yych <= 'R') goto yy21;
- if (yych <= 'S') goto yy17;
- goto yy23;
- } else {
- if (yych == 'c') goto yy25;
- }
- }
+ switch (yych) {
+ case 0x00: goto yy30;
+ case '\n': goto yy27;
+ case '\r': goto yy29;
+ case 'A': goto yy19;
+ case 'D': goto yy12;
+ case 'E': goto yy16;
+ case 'M': goto yy14;
+ case 'P': goto yy13;
+ case 'Q': goto yy15;
+ case 'R': goto yy21;
+ case 'S': goto yy17;
+ case 'T': goto yy23;
+ case 'c': goto yy25;
+ default: goto yy11;
}
yy11:
yy12:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy41;
- if (yych == '\r') goto yy44;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy41;
+ case '\r': goto yy44;
+ default: goto yy11;
+ }
yy13:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy41;
- if (yych == '\r') goto yy43;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy41;
+ case '\r': goto yy43;
+ default: goto yy11;
+ }
yy14:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy38;
- if (yych == '\r') goto yy40;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy38;
+ case '\r': goto yy40;
+ default: goto yy11;
+ }
yy15:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy35;
- if (yych == '\r') goto yy37;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy35;
+ case '\r': goto yy37;
+ default: goto yy11;
+ }
yy16:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy32;
- if (yych == '\r') goto yy34;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy32;
+ case '\r': goto yy34;
+ default: goto yy11;
+ }
yy17:
++YYCURSOR;
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
@@ -380,8 +377,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy29:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy27;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy27;
+ default: goto yy11;
+ }
yy30:
++YYCURSOR;
{ ENSURE_YAML_IEND(lvl, -1);
@@ -427,8 +426,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy34:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy32;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy32;
+ default: goto yy11;
+ }
yy35:
++YYCURSOR;
{ int complex = 0;
@@ -447,8 +448,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy37:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy35;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy35;
+ default: goto yy11;
+ }
yy38:
++YYCURSOR;
{ int complex = 0;
@@ -467,8 +470,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy40:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy38;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy38;
+ default: goto yy11;
+ }
yy41:
++YYCURSOR;
{ ENSURE_YAML_IEND(lvl, -1);
@@ -477,12 +482,16 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy43:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy41;
- goto yy11;
+ switch (yych) {
+ case '\n': goto yy41;
+ default: goto yy11;
+ }
yy44:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy41;
- goto yy11;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy41;
+ default: goto yy11;
+ }
}
@@ -495,53 +504,97 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
YYCTYPE yych;
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 128, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 0, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yych <= 0x00) goto yy47;
- if (yych == 'V') goto yy48;
- goto yy50;
+ switch (yych) {
+ case 0x00: goto yy47;
+ case 'V': goto yy48;
+ default: goto yy50;
+ }
yy47:
YYCURSOR = YYMARKER;
goto yy49;
yy48:
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') goto yy49;
- if (yych == '`') goto yy49;
- if (yych <= 'z') goto yy51;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy51;
+ default: goto yy49;
+ }
yy49:
{ YYCURSOR = YYTOKEN;
return YAML_DOCSEP;
@@ -553,33 +606,261 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy51;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy51;
+ case ':': goto yy53;
+ default: goto yy47;
}
- if (yych != ':') goto yy47;
+yy53:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy54;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy54;
+ default: goto yy47;
}
- goto yy47;
yy54:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy54;
+ switch (yych) {
+ case '\n': goto yy56;
+ case '\r': goto yy58;
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy54;
+ default: goto yy47;
}
- if (yych == '\n') goto yy56;
- if (yych == '\r') goto yy58;
- goto yy47;
yy56:
++YYCURSOR;
{ CHK_NL(YYCURSOR);
goto Directive; }
yy58:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy56;
- goto yy47;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy56;
+ default: goto yy47;
+ }
}
@@ -594,13 +875,11 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy61;
- if (yych <= '\t') goto yy66;
- goto yy62;
- } else {
- if (yych == '\r') goto yy64;
- goto yy66;
+ switch (yych) {
+ case 0x00: goto yy61;
+ case '\n': goto yy62;
+ case '\r': goto yy64;
+ default: goto yy66;
}
yy61:
yy62:
@@ -610,7 +889,10 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
goto Document; }
yy64:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy67;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy67;
+ default: goto yy65;
+ }
yy65:
{ goto Comment; }
yy66:
@@ -640,63 +922,32 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
YYCTYPE yych;
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy74;
- if (yych <= '\t') goto yy76;
- } else {
- if (yych == '\r') goto yy72;
- goto yy76;
+ switch (yych) {
+ case 0x00: goto yy74;
+ case '\n': goto yy70;
+ case '\r': goto yy72;
+ default: goto yy76;
}
+yy70:
++YYCURSOR;
- if ((yych = *YYCURSOR) <= 'M') {
- if (yych == 'C') goto yy78;
- } else {
- if (yych <= 'N') goto yy80;
- if (yych == 'Z') goto yy83;
+ switch ((yych = *YYCURSOR)) {
+ case 'C': goto yy78;
+ case 'N': goto yy80;
+ case 'Z': goto yy83;
+ default: goto yy71;
}
yy71:
{ YYCURSOR = tok;
goto ScalarEnd;
}
yy72:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy77;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy77;
+ default: goto yy73;
+ }
yy73:
{ CAT(str, cap, idx, tok[0]);
goto Scalar2;
@@ -711,12 +962,11 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
goto yy73;
yy77:
yych = *++YYCURSOR;
- if (yych <= 'M') {
- if (yych != 'C') goto yy71;
- } else {
- if (yych <= 'N') goto yy80;
- if (yych == 'Z') goto yy83;
- goto yy71;
+ switch (yych) {
+ case 'C': goto yy78;
+ case 'N': goto yy80;
+ case 'Z': goto yy83;
+ default: goto yy71;
}
yy78:
++YYCURSOR;
@@ -726,9 +976,20 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy80;
+ switch (yych) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy80;
+ default: goto yy82;
}
+yy82:
{ CHK_NL(tok+1);
if ( tok + 2 < YYCURSOR )
{
@@ -791,20 +1052,23 @@ get_inline( SyckParser *parser )
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy91;
- if (yych <= '\t') goto yy93;
- } else {
- if (yych == '\r') goto yy89;
- goto yy93;
+ switch (yych) {
+ case 0x00: goto yy91;
+ case '\n': goto yy87;
+ case '\r': goto yy89;
+ default: goto yy93;
}
+yy87:
++YYCURSOR;
yy88:
{ CHK_NL(YYCURSOR);
return str; }
yy89:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy94;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy94;
+ default: goto yy90;
+ }
yy90:
{ CAT(str, cap, idx, tok[0]);
goto Inline;
View
3,519 lib/implicit.c
2,504 additions, 1,015 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
4 lib/implicit.re
@@ -1,8 +1,8 @@
/*
* implicit.re
*
- * $Author$
- * $Date$
+ * $Author: indeyets $
+ * $Date: 2007-10-24 23:56:48 +0400 (????, 24 ?????? 2007) $
*
* Copyright (C) 2003 why the lucky stiff
*/
View
2,028 lib/token.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Jun 2 14:42:51 2008 */
+/* Generated by re2c 0.13.5 on Tue Nov 18 20:30:04 2008 */
/*
* token.re
*
@@ -309,78 +309,38 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
YYCTYPE yych;
unsigned int yyaccept = 0;
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 48, 64, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 208, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
yych = *YYCURSOR;
- if (yych <= 0x1F) {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy7;
- if (yych <= 0x08) goto yy14;
- goto yy12;
- } else {
- if (yych <= '\n') goto yy9;
- if (yych == '\r') goto yy11;
- goto yy14;
- }
- } else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy12;
- if (yych <= '"') goto yy14;
- goto yy5;
- } else {
- if (yych <= ',') goto yy14;
- if (yych <= '-') goto yy2;
- if (yych <= '.') goto yy4;
- goto yy14;
- }
+ switch (yych) {
+ case 0x00: goto yy7;
+ case '\t':
+ case ' ': goto yy12;
+ case '\n': goto yy9;
+ case '\r': goto yy11;
+ case '#': goto yy5;
+ case '-': goto yy2;
+ case '.': goto yy4;
+ default: goto yy14;
}
yy2:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '-') goto yy30;
+ switch (yych) {
+ case '-': goto yy30;
+ default: goto yy3;
+ }
yy3:
{ YYPOS(0);
goto Document;
}
yy4:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy23;
- goto yy3;
+ switch (yych) {
+ case '.': goto yy23;
+ default: goto yy3;
+ }
yy5:
++YYCURSOR;
{ eat_comments( parser );
@@ -403,8 +363,10 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy11:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy17;
- goto yy3;
+ switch (yych) {
+ case '\n': goto yy17;
+ default: goto yy3;
+ }
yy12:
++YYCURSOR;
yych = *YYCURSOR;
@@ -421,56 +383,63 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy16:
- if (yybm[0+yych] & 16) {
- goto yy15;
+ switch (yych) {
+ case '\t':
+ case ' ': goto yy15;
+ default: goto yy13;
}
- goto yy13;
yy17:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy18:
- if (yybm[0+yych] & 32) {
- goto yy17;
- }
- if (yych <= '\f') {
- if (yych != '\n') goto yy10;
- } else {
- if (yych <= '\r') goto yy21;
- if (yych != ' ') goto yy10;
+ switch (yych) {
+ case '\t': goto yy17;
+ case '\n':
+ case ' ': goto yy19;
+ case '\r': goto yy21;
+ default: goto yy10;
}
yy19:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy19;
+ switch (yych) {
+ case '\n':
+ case ' ': goto yy19;
+ case '\r': goto yy21;
+ default: goto yy10;
}
- if (yych != '\r') goto yy10;
yy21:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych == '\n') goto yy19;
+ switch (yych) {
+ case '\n': goto yy19;
+ default: goto yy22;
+ }
yy22:
YYCURSOR = YYMARKER;
- if (yyaccept <= 0) {
- goto yy3;
- } else {
- goto yy10;
+ switch (yyaccept) {
+ case 0: goto yy3;
+ case 1: goto yy10;
}
yy23:
yych = *++YYCURSOR;
- if (yych != '.') goto yy22;
+ switch (yych) {
+ case '.': goto yy24;
+ default: goto yy22;
+ }
+yy24:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy27;
+ switch (yych) {
+ case '\n': goto yy25;
+ case '\r': goto yy29;
+ case ' ': goto yy27;
+ default: goto yy22;
}
- if (yych == '\n') goto yy25;
- if (yych == '\r') goto yy29;
- goto yy22;
yy25:
++YYCURSOR;
yy26:
@@ -491,24 +460,29 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy27;
+ switch (yych) {
+ case ' ': goto yy27;
+ default: goto yy26;
}
- goto yy26;
yy29:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy25;
- goto yy22;
+ switch (yych) {
+ case '\n': goto yy25;
+ default: goto yy22;
+ }
yy30:
yych = *++YYCURSOR;
- if (yych != '-') goto yy22;
+ switch (yych) {
+ case '-': goto yy31;
+ default: goto yy22;
+ }
+yy31:
yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych != '\n') goto yy22;
- } else {
- if (yych <= '\r') goto yy36;
- if (yych == ' ') goto yy34;
- goto yy22;
+ switch (yych) {
+ case '\n': goto yy32;
+ case '\r': goto yy36;
+ case ' ': goto yy34;
+ default: goto yy22;
}
yy32:
++YYCURSOR;
@@ -530,12 +504,16 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych == ' ') goto yy34;
- goto yy33;
+ switch (yych) {
+ case ' ': goto yy34;
+ default: goto yy33;
+ }
yy36:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy32;
- goto yy22;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy32;
+ default: goto yy22;
+ }
}
@@ -553,96 +531,33 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
YYCTYPE yych;
unsigned int yyaccept = 0;
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 68, 128, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 148, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 8, 0, 40, 0, 0,
- 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 0, 0, 0, 0, 0, 0,
- 0, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 0, 0, 0, 0, 32,
- 0, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
yych = *YYCURSOR;
- if (yych <= '*') {
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy64;
- if (yych <= 0x08) goto yy66;
- if (yych <= '\t') goto yy62;
- } else {
- if (yych == '\r') goto yy41;
- if (yych <= 0x1F) goto yy66;
- goto yy62;
- }
- } else {
- if (yych <= '%') {
- if (yych <= '!') goto yy53;
- if (yych <= '"') goto yy57;
- if (yych <= '#') goto yy60;
- goto yy66;
- } else {
- if (yych <= '&') goto yy51;
- if (yych <= '\'') goto yy55;
- if (yych <= ')') goto yy66;
- goto yy52;
- }
- }
- } else {
- if (yych <= '?') {
- if (yych <= '9') {
- if (yych <= '+') goto yy66;
- if (yych <= ',') goto yy49;
- if (yych <= '-') goto yy50;
- goto yy66;
- } else {
- if (yych <= ':') goto yy49;
- if (yych <= '=') goto yy66;
- if (yych <= '>') goto yy59;
- goto yy50;
- }
- } else {
- if (yych <= ']') {
- if (yych == '[') goto yy43;
- if (yych <= '\\') goto yy66;
- goto yy47;
- } else {
- if (yych <= '{') {
- if (yych <= 'z') goto yy66;
- goto yy45;
- } else {
- if (yych <= '|') goto yy59;
- if (yych <= '}') goto yy47;
- goto yy66;
- }
- }
- }
- }
+ switch (yych) {
+ case 0x00: goto yy64;
+ case '\t':
+ case ' ': goto yy62;
+ case '\n': goto yy39;
+ case '\r': goto yy41;
+ case '!': goto yy53;
+ case '"': goto yy57;
+ case '#': goto yy60;
+ case '&': goto yy51;
+ case '\'': goto yy55;
+ case '*': goto yy52;
+ case ',':
+ case ':': goto yy49;
+ case '-':
+ case '?': goto yy50;
+ case '>':
+ case '|': goto yy59;
+ case '[': goto yy43;
+ case ']':
+ case '}': goto yy47;
+ case '{': goto yy45;
+ default: goto yy66;
+ }
+yy39:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
goto yy94;
@@ -676,7 +591,10 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
}
yy41:
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy93;
+ switch ((yych = *YYCURSOR)) {
+ case '\n': goto yy93;
+ default: goto yy42;
+ }
yy42:
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
goto Plain;
@@ -703,53 +621,159 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
yy49:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\n') goto yy88;
- goto yy42;
- } else {
- if (yych <= '\r') goto yy92;
- if (yych == ' ') goto yy90;
- goto yy42;
+ switch (yych) {
+ case '\n': goto yy88;
+ case '\r': goto yy92;
+ case ' ': goto yy90;
+ default: goto yy42;
}
yy50:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\n') goto yy83;
- goto yy42;
- } else {
- if (yych <= '\r') goto yy87;
- if (yych == ' ') goto yy85;
- goto yy42;
+ switch (yych) {
+ case '\n': goto yy83;
+ case '\r': goto yy87;
+ case ' ': goto yy85;
+ default: goto yy42;
}
yy51:
yych = *++YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych <= ',') goto yy42;
- goto yy80;
- } else {
- if (yych <= '/') goto yy42;
- if (yych <= '9') goto yy80;
- goto yy42;
- }
- } else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy80;
- if (yych <= '^') goto yy42;
- goto yy80;
- } else {
- if (yych <= '`') goto yy42;
- if (yych <= 'z') goto yy80;
- goto yy42;
- }
+ switch (yych) {
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy80;
+ default: goto yy42;
}
yy52:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy77;
+ switch (yych) {
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy77;
+ default: goto yy42;
}
- goto yy42;
yy53:
++YYCURSOR;
{ goto TransferMethod; }
@@ -764,26 +788,23 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
yy59:
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy74;
- }
- if (yych <= '*') {
- if (yych <= '\n') {
- if (yych <= '\t') goto yy42;
- goto yy72;
- } else {
- if (yych == '\r') goto yy76;
- goto yy42;
- }
- } else {
- if (yych <= '-') {
- if (yych == ',') goto yy42;
- goto yy69;
- } else {
- if (yych <= '/') goto yy42;
- if (yych <= '9') goto yy69;
- goto yy42;
- }
+ switch (yych) {
+ case '\n': goto yy72;
+ case '\r': goto yy76;
+ case ' ': goto yy74;
+ case '+':
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy69;
+ default: goto yy42;
}
yy60:
++YYCURSOR;
@@ -810,37 +831,38 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy68:
- if (yybm[0+yych] & 4) {
- goto yy67;
+ switch (yych) {
+ case '\t':
+ case ' ': goto yy67;
+ default: goto yy63;
}
- goto yy63;
yy69:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yybm[0+yych] & 16) {
- goto yy74;
- }
- if (yych <= '*') {
- if (yych <= '\n') {
- if (yych >= '\n') goto yy72;
- } else {
- if (yych == '\r') goto yy76;
- }
- } else {
- if (yych <= '-') {
- if (yych != ',') goto yy69;
- } else {
- if (yych <= '/') goto yy71;
- if (yych <= '9') goto yy69;
- }
+ switch (yych) {
+ case '\n': goto yy72;
+ case '\r': goto yy76;
+ case ' ': goto yy74;
+ case '+':
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': goto yy69;
+ default: goto yy71;
}
yy71:
YYCURSOR = YYMARKER;
- if (yyaccept <= 0) {
- goto yy40;
- } else {
- goto yy42;
+ switch (yyaccept) {
+ case 0: goto yy40;
+ case 1: goto yy42;
}
yy72:
++YYCURSOR;
@@ -855,21 +877,88 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 16) {
- goto yy74;
+ switch (yych) {
+ case ' ': goto yy74;
+ default: goto yy73;
}
- goto yy73;
yy76:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy72;
- goto yy71;
+ switch (yych) {
+ case '\n': goto yy72;
+ default: goto yy71;
+ }
yy77:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy77;
- }
+ switch (yych) {
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy77;
+ default: goto yy79;
+ }
+yy79:
{ ENSURE_YAML_IOPEN(lvl, doc_level, 1);
sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
return YAML_ALIAS;
@@ -878,21 +967,72 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych <= '@') {
- if (yych <= '-') {
- if (yych >= '-') goto yy80;
- } else {
- if (yych <= '/') goto yy82;
- if (yych <= '9') goto yy80;
- }
- } else {
- if (yych <= '_') {
- if (yych <= 'Z') goto yy80;
- if (yych >= '_') goto yy80;
- } else {
- if (yych <= '`') goto yy82;
- if (yych <= 'z') goto yy80;
- }
+ switch (yych) {
+ case '-':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy80;
+ default: goto yy82;
}
yy82:
{ sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
@@ -925,12 +1065,16 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych == ' ') goto yy85;
- goto yy84;
+ switch (yych) {
+ case ' ': goto yy85;
+ default: goto yy84;
+ }
yy87:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy83;
- goto yy71;
+ switch (yych) {
+ case '\n': goto yy83;
+ default: goto yy71;
+ }
yy88:
++YYCURSOR;
yy89:
@@ -945,42 +1089,48 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych == ' ') goto yy90;
- goto yy89;
+ switch (yych) {
+ case ' ': goto yy90;
+ default: goto yy89;
+ }
yy92:
yych = *++YYCURSOR;
- if (yych == '\n') goto yy88;
- goto yy71;
+ switch (yych) {
+ case '\n': goto yy88;
+ default: goto yy71;
+ }
yy93:
yyaccept = 0;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy94:
- if (yybm[0+yych] & 64) {
- goto yy93;
- }
- if (yych <= '\f') {
- if (yych != '\n') goto yy40;
- } else {
- if (yych <= '\r') goto yy97;
- if (yych != ' ') goto yy40;
+ switch (yych) {
+ case '\t': goto yy93;
+ case '\n':
+ case ' ': goto yy95;
+ case '\r': goto yy97;
+ default: goto yy40;
}
yy95:
yyaccept = 0;
YYMARKER = ++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy95;
+ switch (yych) {
+ case '\n':
+ case ' ': goto yy95;
+ case '\r': goto yy97;
+ default: goto yy40;
}
- if (yych != '\r') goto yy40;
yy97:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yych == '\n') goto yy95;
- goto yy71;
+ switch (yych) {
+ case '\n': goto yy95;
+ default: goto yy71;
+ }
}
}
@@ -992,59 +1142,99 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
YYCTYPE yych;
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 128, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 0, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 192,
- 192, 192, 192, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yych <= 0x1F) {
- if (yych <= 0x00) goto yy100;
- if (yych == '\t') goto yy103;
- goto yy105;
- } else {
- if (yych <= ' ') goto yy103;
- if (yych == '%') goto yy101;
- goto yy105;
+ switch (yych) {
+ case 0x00: goto yy100;
+ case '\t':
+ case ' ': goto yy103;
+ case '%': goto yy101;
+ default: goto yy105;
}
yy100:
YYCURSOR = YYMARKER;
goto yy102;
yy101:
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '-') goto yy102;
- if (yych == '`') goto yy102;
- if (yych <= 'z') goto yy108;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy108;
+ default: goto yy102;
+ }
yy102:
{ YYCURSOR = YYTOKTMP;
return YAML_DOCSEP;
@@ -1063,30 +1253,259 @@ sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy107:
- if (yybm[0+yych] & 32) {
- goto yy106;
+ switch (yych) {
+ case '\t':
+ case ' ': goto yy106;
+ default: goto yy104;
}
- goto yy104;
yy108:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy108;
- }
- if (yych != ':') goto yy100;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy108;
+ case ':': goto yy110;
+ default: goto yy100;
+ }
+yy110:
yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy111;
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@':
+ case 'A':
+ case 'B':
+ case 'C':
+ case 'D':
+ case 'E':
+ case 'F':
+ case 'G':
+ case 'H':
+ case 'I':
+ case 'J':
+ case 'K':
+ case 'L':
+ case 'M':
+ case 'N':
+ case 'O':
+ case 'P':
+ case 'Q':
+ case 'R':
+ case 'S':
+ case 'T':
+ case 'U':
+ case 'V':
+ case 'W':
+ case 'X':
+ case 'Y':
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case 'a':
+ case 'b':
+ case 'c':
+ case 'd':
+ case 'e':
+ case 'f':
+ case 'g':
+ case 'h':
+ case 'i':
+ case 'j':
+ case 'k':
+ case 'l':
+ case 'm':
+ case 'n':
+ case 'o':
+ case 'p':
+ case 'q':
+ case 'r':
+ case 's':
+ case 't':
+ case 'u':
+ case 'v':
+ case 'w':
+ case 'x':
+ case 'y':
+ case 'z': goto yy111;
+ default: goto yy100;
}
- goto yy100;
yy111:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy111;
- }
+ switch (yych) {
+ case '.':
+ case '/':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ case ':':
+ case ';':
+ case '<':
+ case '=':
+ case '>':
+ case '?':
+ case '@