ref: aee77b97a7506d7cd3f02f80a713f1e6b5d1271e
dir: /src/peg.peg-c/
/* A recursive-descent parser generated by peg 0.1.12 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define YYRULECOUNT 32 #ifndef YY_MALLOC #define YY_MALLOC(C, N) malloc(N) #endif #ifndef YY_REALLOC #define YY_REALLOC(C, P, N) realloc(P, N) #endif #ifndef YY_FREE #define YY_FREE free #endif #ifndef YY_LOCAL #define YY_LOCAL(T) static T #endif #ifndef YY_ACTION #define YY_ACTION(T) static T #endif #ifndef YY_RULE #define YY_RULE(T) static T #endif #ifndef YY_PARSE #define YY_PARSE(T) T #endif #ifndef YYPARSE #define YYPARSE yyparse #endif #ifndef YYPARSEFROM #define YYPARSEFROM yyparsefrom #endif #ifndef YYRELEASE #define YYRELEASE yyrelease #endif #ifndef YY_BEGIN #define YY_BEGIN ( yy->__begin= yy->__pos, 1) #endif #ifndef YY_END #define YY_END ( yy->__end= yy->__pos, 1) #endif #ifdef YY_DEBUG # define yyprintf(args) fprintf args #else # define yyprintf(args) #endif #ifndef YYSTYPE #define YYSTYPE int #endif #ifndef YY_STACK_SIZE #define YY_STACK_SIZE 128 #endif #ifndef YY_BUFFER_SIZE #define YY_BUFFER_SIZE 1024 #endif #ifndef YY_PART typedef struct _yycontext yycontext; typedef void (*yyaction)(yycontext *yy, char *yytext, int yyleng); typedef struct _yythunk { int begin, end; yyaction action; struct _yythunk *next; } yythunk; struct _yycontext { char *__buf; int __buflen; int __pos; int __limit; char *__text; int __textlen; int __begin; int __end; int __textmax; yythunk *__thunks; int __thunkslen; int __thunkpos; YYSTYPE __; YYSTYPE *__val; YYSTYPE *__vals; int __valslen; #ifdef YY_CTX_MEMBERS YY_CTX_MEMBERS #endif }; #ifdef YY_CTX_LOCAL #define YY_CTX_PARAM_ yycontext *yyctx, #define YY_CTX_PARAM yycontext *yyctx #define YY_CTX_ARG_ yyctx, #define YY_CTX_ARG yyctx #ifndef YY_INPUT #define YY_INPUT(yy, buf, result, max_size) \ { \ int yyc= getchar(); \ result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ yyprintf((stderr, "<%c>", yyc)); \ } #endif #else #define YY_CTX_PARAM_ #define YY_CTX_PARAM #define YY_CTX_ARG_ #define YY_CTX_ARG yycontext _yyctx= { 0, 0 }; yycontext *yyctx= &_yyctx; #ifndef YY_INPUT #define YY_INPUT(buf, result, max_size) \ { \ int yyc= getchar(); \ result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \ yyprintf((stderr, "<%c>", yyc)); \ } #endif #endif YY_LOCAL(int) yyrefill(yycontext *yy) { int yyn; while (yy->__buflen - yy->__pos < 512) { yy->__buflen *= 2; yy->__buf= (char *)YY_REALLOC(yy, yy->__buf, yy->__buflen); } #ifdef YY_CTX_LOCAL YY_INPUT(yy, (yy->__buf + yy->__pos), yyn, (yy->__buflen - yy->__pos)); #else YY_INPUT((yy->__buf + yy->__pos), yyn, (yy->__buflen - yy->__pos)); #endif if (!yyn) return 0; yy->__limit += yyn; return 1; } YY_LOCAL(int) yymatchDot(yycontext *yy) { if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; ++yy->__pos; return 1; } YY_LOCAL(int) yymatchChar(yycontext *yy, int c) { if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; if ((unsigned char)yy->__buf[yy->__pos] == c) { ++yy->__pos; yyprintf((stderr, " ok yymatchChar(yy, %c) @ %s\n", c, yy->__buf+yy->__pos)); return 1; } yyprintf((stderr, " fail yymatchChar(yy, %c) @ %s\n", c, yy->__buf+yy->__pos)); return 0; } YY_LOCAL(int) yymatchString(yycontext *yy, const char *s) { int yysav= yy->__pos; while (*s) { if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; if (yy->__buf[yy->__pos] != *s) { yy->__pos= yysav; return 0; } ++s; ++yy->__pos; } return 1; } YY_LOCAL(int) yymatchClass(yycontext *yy, unsigned char *bits) { int c; if (yy->__pos >= yy->__limit && !yyrefill(yy)) return 0; c= (unsigned char)yy->__buf[yy->__pos]; if (bits[c >> 3] & (1 << (c & 7))) { ++yy->__pos; yyprintf((stderr, " ok yymatchClass @ %s\n", yy->__buf+yy->__pos)); return 1; } yyprintf((stderr, " fail yymatchClass @ %s\n", yy->__buf+yy->__pos)); return 0; } YY_LOCAL(void) yyDo(yycontext *yy, yyaction action, int begin, int end) { while (yy->__thunkpos >= yy->__thunkslen) { yy->__thunkslen *= 2; yy->__thunks= (yythunk *)YY_REALLOC(yy, yy->__thunks, sizeof(yythunk) * yy->__thunkslen); } yy->__thunks[yy->__thunkpos].begin= begin; yy->__thunks[yy->__thunkpos].end= end; yy->__thunks[yy->__thunkpos].action= action; ++yy->__thunkpos; } YY_LOCAL(int) yyText(yycontext *yy, int begin, int end) { int yyleng= end - begin; if (yyleng <= 0) yyleng= 0; else { while (yy->__textlen < (yyleng + 1)) { yy->__textlen *= 2; yy->__text= (char *)YY_REALLOC(yy, yy->__text, yy->__textlen); } memcpy(yy->__text, yy->__buf + begin, yyleng); } yy->__text[yyleng]= '\0'; return yyleng; } YY_LOCAL(void) yyDone(yycontext *yy) { int pos; for (pos= 0; pos < yy->__thunkpos; ++pos) { yythunk *thunk= &yy->__thunks[pos]; int yyleng= thunk->end ? yyText(yy, thunk->begin, thunk->end) : thunk->begin; yyprintf((stderr, "DO [%d] %p %s\n", pos, thunk->action, yy->__text)); thunk->action(yy, yy->__text, yyleng); } yy->__thunkpos= 0; } YY_LOCAL(void) yyCommit(yycontext *yy) { if ((yy->__limit -= yy->__pos)) { memmove(yy->__buf, yy->__buf + yy->__pos, yy->__limit); } yy->__begin -= yy->__pos; yy->__end -= yy->__pos; yy->__pos= yy->__thunkpos= 0; } YY_LOCAL(int) yyAccept(yycontext *yy, int tp0) { if (tp0) { fprintf(stderr, "accept denied at %d\n", tp0); return 0; } else { yyDone(yy); yyCommit(yy); } return 1; } YY_LOCAL(void) yyPush(yycontext *yy, char *text, int count) { yy->__val += count; while (yy->__valslen <= yy->__val - yy->__vals) { long offset= yy->__val - yy->__vals; yy->__valslen *= 2; yy->__vals= (YYSTYPE *)YY_REALLOC(yy, yy->__vals, sizeof(YYSTYPE) * yy->__valslen); yy->__val= yy->__vals + offset; } } YY_LOCAL(void) yyPop(yycontext *yy, char *text, int count) { yy->__val -= count; } YY_LOCAL(void) yySet(yycontext *yy, char *text, int count) { yy->__val[count]= yy->__; } #endif /* YY_PART */ #define YYACCEPT yyAccept(yy, yythunkpos0) YY_RULE(int) yy_EndOfLine(yycontext *yy); /* 32 */ YY_RULE(int) yy_Comment(yycontext *yy); /* 31 */ YY_RULE(int) yy_Space(yycontext *yy); /* 30 */ YY_RULE(int) yy_Range(yycontext *yy); /* 29 */ YY_RULE(int) yy_Char(yycontext *yy); /* 28 */ YY_RULE(int) yy_IdentCont(yycontext *yy); /* 27 */ YY_RULE(int) yy_IdentStart(yycontext *yy); /* 26 */ YY_RULE(int) yy_END(yycontext *yy); /* 25 */ YY_RULE(int) yy_BEGIN(yycontext *yy); /* 24 */ YY_RULE(int) yy_DOT(yycontext *yy); /* 23 */ YY_RULE(int) yy_Class(yycontext *yy); /* 22 */ YY_RULE(int) yy_Literal(yycontext *yy); /* 21 */ YY_RULE(int) yy_CLOSE(yycontext *yy); /* 20 */ YY_RULE(int) yy_OPEN(yycontext *yy); /* 19 */ YY_RULE(int) yy_PLUS(yycontext *yy); /* 18 */ YY_RULE(int) yy_STAR(yycontext *yy); /* 17 */ YY_RULE(int) yy_QUESTION(yycontext *yy); /* 16 */ YY_RULE(int) yy_Primary(yycontext *yy); /* 15 */ YY_RULE(int) yy_NOT(yycontext *yy); /* 14 */ YY_RULE(int) yy_Suffix(yycontext *yy); /* 13 */ YY_RULE(int) yy_Action(yycontext *yy); /* 12 */ YY_RULE(int) yy_AND(yycontext *yy); /* 11 */ YY_RULE(int) yy_Prefix(yycontext *yy); /* 10 */ YY_RULE(int) yy_SLASH(yycontext *yy); /* 9 */ YY_RULE(int) yy_Sequence(yycontext *yy); /* 8 */ YY_RULE(int) yy_Expression(yycontext *yy); /* 7 */ YY_RULE(int) yy_LEFTARROW(yycontext *yy); /* 6 */ YY_RULE(int) yy_Identifier(yycontext *yy); /* 5 */ YY_RULE(int) yy_EndOfFile(yycontext *yy); /* 4 */ YY_RULE(int) yy_Definition(yycontext *yy); /* 3 */ YY_RULE(int) yy_Spacing(yycontext *yy); /* 2 */ YY_RULE(int) yy_Grammar(yycontext *yy); /* 1 */ YY_ACTION(void) yy_7_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_7_Primary\n")); { push(makePredicate("YY_END")); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_6_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_6_Primary\n")); { push(makePredicate("YY_BEGIN")); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_5_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_5_Primary\n")); { push(makeAction(yytext)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_4_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_4_Primary\n")); { push(makeDot()); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_3_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_3_Primary\n")); { push(makeClass(yytext)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_2_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_2_Primary\n")); { push(makeString(yytext)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Primary(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Primary\n")); { push(makeName(findRule(yytext))); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_3_Suffix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_3_Suffix\n")); { push(makePlus (pop())); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_2_Suffix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_2_Suffix\n")); { push(makeStar (pop())); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Suffix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Suffix\n")); { push(makeQuery(pop())); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_3_Prefix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_3_Prefix\n")); { push(makePeekNot(pop())); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_2_Prefix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_2_Prefix\n")); { push(makePeekFor(pop())); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Prefix(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Prefix\n")); { push(makePredicate(yytext)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_2_Sequence(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_2_Sequence\n")); { push(makePredicate("1")); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Sequence(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Sequence\n")); { Node *f= pop(); push(Sequence_append(pop(), f)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Expression(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Expression\n")); { Node *f= pop(); push(Alternate_append(pop(), f)); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_2_Definition(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_2_Definition\n")); { Node *e= pop(); Rule_setExpression(pop(), e); ; } #undef yythunkpos #undef yypos #undef yy } YY_ACTION(void) yy_1_Definition(yycontext *yy, char *yytext, int yyleng) { #define __ yy->__ #define yypos yy->__pos #define yythunkpos yy->__thunkpos yyprintf((stderr, "do yy_1_Definition\n")); { if (push(beginRule(findRule(yytext)))->rule.expression) fprintf(stderr, "rule '%s' redefined\n", yytext); ; } #undef yythunkpos #undef yypos #undef yy } YY_RULE(int) yy_EndOfLine(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "EndOfLine")); { int yypos2= yy->__pos, yythunkpos2= yy->__thunkpos; if (!yymatchString(yy, "\r\n")) goto l3; goto l2; l3:; yy->__pos= yypos2; yy->__thunkpos= yythunkpos2; if (!yymatchChar(yy, '\n')) goto l4; goto l2; l4:; yy->__pos= yypos2; yy->__thunkpos= yythunkpos2; if (!yymatchChar(yy, '\r')) goto l1; } l2:; yyprintf((stderr, " ok %s @ %s\n", "EndOfLine", yy->__buf+yy->__pos)); return 1; l1:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "EndOfLine", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Comment(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Comment")); if (!yymatchChar(yy, '#')) goto l5; l6:; { int yypos7= yy->__pos, yythunkpos7= yy->__thunkpos; { int yypos8= yy->__pos, yythunkpos8= yy->__thunkpos; if (!yy_EndOfLine(yy)) goto l8; goto l7; l8:; yy->__pos= yypos8; yy->__thunkpos= yythunkpos8; } if (!yymatchDot(yy)) goto l7; goto l6; l7:; yy->__pos= yypos7; yy->__thunkpos= yythunkpos7; } if (!yy_EndOfLine(yy)) goto l5; yyprintf((stderr, " ok %s @ %s\n", "Comment", yy->__buf+yy->__pos)); return 1; l5:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Comment", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Space(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Space")); { int yypos10= yy->__pos, yythunkpos10= yy->__thunkpos; if (!yymatchChar(yy, ' ')) goto l11; goto l10; l11:; yy->__pos= yypos10; yy->__thunkpos= yythunkpos10; if (!yymatchChar(yy, '\t')) goto l12; goto l10; l12:; yy->__pos= yypos10; yy->__thunkpos= yythunkpos10; if (!yy_EndOfLine(yy)) goto l9; } l10:; yyprintf((stderr, " ok %s @ %s\n", "Space", yy->__buf+yy->__pos)); return 1; l9:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Space", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Range(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Range")); { int yypos14= yy->__pos, yythunkpos14= yy->__thunkpos; if (!yy_Char(yy)) goto l15; if (!yymatchChar(yy, '-')) goto l15; if (!yy_Char(yy)) goto l15; goto l14; l15:; yy->__pos= yypos14; yy->__thunkpos= yythunkpos14; if (!yy_Char(yy)) goto l13; } l14:; yyprintf((stderr, " ok %s @ %s\n", "Range", yy->__buf+yy->__pos)); return 1; l13:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Range", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Char(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Char")); { int yypos17= yy->__pos, yythunkpos17= yy->__thunkpos; if (!yymatchChar(yy, '\\')) goto l18; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\204\000\000\000\000\000\000\070\146\100\124\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l18; goto l17; l18:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17; if (!yymatchChar(yy, '\\')) goto l19; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\017\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l19; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l19; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l19; goto l17; l19:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17; if (!yymatchChar(yy, '\\')) goto l20; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l20; { int yypos21= yy->__pos, yythunkpos21= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l21; goto l22; l21:; yy->__pos= yypos21; yy->__thunkpos= yythunkpos21; } l22:; goto l17; l20:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17; if (!yymatchChar(yy, '\\')) goto l23; if (!yymatchChar(yy, '-')) goto l23; goto l17; l23:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17; { int yypos24= yy->__pos, yythunkpos24= yy->__thunkpos; if (!yymatchChar(yy, '\\')) goto l24; goto l16; l24:; yy->__pos= yypos24; yy->__thunkpos= yythunkpos24; } if (!yymatchDot(yy)) goto l16; } l17:; yyprintf((stderr, " ok %s @ %s\n", "Char", yy->__buf+yy->__pos)); return 1; l16:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Char", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_IdentCont(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "IdentCont")); { int yypos26= yy->__pos, yythunkpos26= yy->__thunkpos; if (!yy_IdentStart(yy)) goto l27; goto l26; l27:; yy->__pos= yypos26; yy->__thunkpos= yythunkpos26; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l25; } l26:; yyprintf((stderr, " ok %s @ %s\n", "IdentCont", yy->__buf+yy->__pos)); return 1; l25:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "IdentCont", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_IdentStart(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "IdentStart")); if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\207\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l28; yyprintf((stderr, " ok %s @ %s\n", "IdentStart", yy->__buf+yy->__pos)); return 1; l28:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "IdentStart", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_END(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "END")); if (!yymatchChar(yy, '>')) goto l29; if (!yy_Spacing(yy)) goto l29; yyprintf((stderr, " ok %s @ %s\n", "END", yy->__buf+yy->__pos)); return 1; l29:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "END", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_BEGIN(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "BEGIN")); if (!yymatchChar(yy, '<')) goto l30; if (!yy_Spacing(yy)) goto l30; yyprintf((stderr, " ok %s @ %s\n", "BEGIN", yy->__buf+yy->__pos)); return 1; l30:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "BEGIN", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_DOT(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "DOT")); if (!yymatchChar(yy, '.')) goto l31; if (!yy_Spacing(yy)) goto l31; yyprintf((stderr, " ok %s @ %s\n", "DOT", yy->__buf+yy->__pos)); return 1; l31:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "DOT", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Class(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Class")); if (!yymatchChar(yy, '[')) goto l32; yyText(yy, yy->__begin, yy->__end); if (!(YY_BEGIN)) goto l32; l33:; { int yypos34= yy->__pos, yythunkpos34= yy->__thunkpos; { int yypos35= yy->__pos, yythunkpos35= yy->__thunkpos; if (!yymatchChar(yy, ']')) goto l35; goto l34; l35:; yy->__pos= yypos35; yy->__thunkpos= yythunkpos35; } if (!yy_Range(yy)) goto l34; goto l33; l34:; yy->__pos= yypos34; yy->__thunkpos= yythunkpos34; } yyText(yy, yy->__begin, yy->__end); if (!(YY_END)) goto l32; if (!yymatchChar(yy, ']')) goto l32; if (!yy_Spacing(yy)) goto l32; yyprintf((stderr, " ok %s @ %s\n", "Class", yy->__buf+yy->__pos)); return 1; l32:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Class", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Literal(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Literal")); { int yypos37= yy->__pos, yythunkpos37= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l38; yyText(yy, yy->__begin, yy->__end); if (!(YY_BEGIN)) goto l38; l39:; { int yypos40= yy->__pos, yythunkpos40= yy->__thunkpos; { int yypos41= yy->__pos, yythunkpos41= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l41; goto l40; l41:; yy->__pos= yypos41; yy->__thunkpos= yythunkpos41; } if (!yy_Char(yy)) goto l40; goto l39; l40:; yy->__pos= yypos40; yy->__thunkpos= yythunkpos40; } yyText(yy, yy->__begin, yy->__end); if (!(YY_END)) goto l38; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l38; if (!yy_Spacing(yy)) goto l38; goto l37; l38:; yy->__pos= yypos37; yy->__thunkpos= yythunkpos37; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l36; yyText(yy, yy->__begin, yy->__end); if (!(YY_BEGIN)) goto l36; l42:; { int yypos43= yy->__pos, yythunkpos43= yy->__thunkpos; { int yypos44= yy->__pos, yythunkpos44= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l44; goto l43; l44:; yy->__pos= yypos44; yy->__thunkpos= yythunkpos44; } if (!yy_Char(yy)) goto l43; goto l42; l43:; yy->__pos= yypos43; yy->__thunkpos= yythunkpos43; } yyText(yy, yy->__begin, yy->__end); if (!(YY_END)) goto l36; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l36; if (!yy_Spacing(yy)) goto l36; } l37:; yyprintf((stderr, " ok %s @ %s\n", "Literal", yy->__buf+yy->__pos)); return 1; l36:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Literal", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_CLOSE(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "CLOSE")); if (!yymatchChar(yy, ')')) goto l45; if (!yy_Spacing(yy)) goto l45; yyprintf((stderr, " ok %s @ %s\n", "CLOSE", yy->__buf+yy->__pos)); return 1; l45:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "CLOSE", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_OPEN(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "OPEN")); if (!yymatchChar(yy, '(')) goto l46; if (!yy_Spacing(yy)) goto l46; yyprintf((stderr, " ok %s @ %s\n", "OPEN", yy->__buf+yy->__pos)); return 1; l46:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "OPEN", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_PLUS(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "PLUS")); if (!yymatchChar(yy, '+')) goto l47; if (!yy_Spacing(yy)) goto l47; yyprintf((stderr, " ok %s @ %s\n", "PLUS", yy->__buf+yy->__pos)); return 1; l47:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "PLUS", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_STAR(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "STAR")); if (!yymatchChar(yy, '*')) goto l48; if (!yy_Spacing(yy)) goto l48; yyprintf((stderr, " ok %s @ %s\n", "STAR", yy->__buf+yy->__pos)); return 1; l48:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "STAR", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_QUESTION(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "QUESTION")); if (!yymatchChar(yy, '?')) goto l49; if (!yy_Spacing(yy)) goto l49; yyprintf((stderr, " ok %s @ %s\n", "QUESTION", yy->__buf+yy->__pos)); return 1; l49:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "QUESTION", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Primary(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Primary")); { int yypos51= yy->__pos, yythunkpos51= yy->__thunkpos; if (!yy_Identifier(yy)) goto l52; { int yypos53= yy->__pos, yythunkpos53= yy->__thunkpos; if (!yy_LEFTARROW(yy)) goto l53; goto l52; l53:; yy->__pos= yypos53; yy->__thunkpos= yythunkpos53; } yyDo(yy, yy_1_Primary, yy->__begin, yy->__end); goto l51; l52:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_OPEN(yy)) goto l54; if (!yy_Expression(yy)) goto l54; if (!yy_CLOSE(yy)) goto l54; goto l51; l54:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_Literal(yy)) goto l55; yyDo(yy, yy_2_Primary, yy->__begin, yy->__end); goto l51; l55:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_Class(yy)) goto l56; yyDo(yy, yy_3_Primary, yy->__begin, yy->__end); goto l51; l56:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_DOT(yy)) goto l57; yyDo(yy, yy_4_Primary, yy->__begin, yy->__end); goto l51; l57:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_Action(yy)) goto l58; yyDo(yy, yy_5_Primary, yy->__begin, yy->__end); goto l51; l58:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_BEGIN(yy)) goto l59; yyDo(yy, yy_6_Primary, yy->__begin, yy->__end); goto l51; l59:; yy->__pos= yypos51; yy->__thunkpos= yythunkpos51; if (!yy_END(yy)) goto l50; yyDo(yy, yy_7_Primary, yy->__begin, yy->__end); } l51:; yyprintf((stderr, " ok %s @ %s\n", "Primary", yy->__buf+yy->__pos)); return 1; l50:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Primary", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_NOT(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "NOT")); if (!yymatchChar(yy, '!')) goto l60; if (!yy_Spacing(yy)) goto l60; yyprintf((stderr, " ok %s @ %s\n", "NOT", yy->__buf+yy->__pos)); return 1; l60:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "NOT", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Suffix(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Suffix")); if (!yy_Primary(yy)) goto l61; { int yypos62= yy->__pos, yythunkpos62= yy->__thunkpos; { int yypos64= yy->__pos, yythunkpos64= yy->__thunkpos; if (!yy_QUESTION(yy)) goto l65; yyDo(yy, yy_1_Suffix, yy->__begin, yy->__end); goto l64; l65:; yy->__pos= yypos64; yy->__thunkpos= yythunkpos64; if (!yy_STAR(yy)) goto l66; yyDo(yy, yy_2_Suffix, yy->__begin, yy->__end); goto l64; l66:; yy->__pos= yypos64; yy->__thunkpos= yythunkpos64; if (!yy_PLUS(yy)) goto l62; yyDo(yy, yy_3_Suffix, yy->__begin, yy->__end); } l64:; goto l63; l62:; yy->__pos= yypos62; yy->__thunkpos= yythunkpos62; } l63:; yyprintf((stderr, " ok %s @ %s\n", "Suffix", yy->__buf+yy->__pos)); return 1; l61:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Suffix", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Action(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Action")); if (!yymatchChar(yy, '{')) goto l67; yyText(yy, yy->__begin, yy->__end); if (!(YY_BEGIN)) goto l67; l68:; { int yypos69= yy->__pos, yythunkpos69= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\337\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377")) goto l69; goto l68; l69:; yy->__pos= yypos69; yy->__thunkpos= yythunkpos69; } yyText(yy, yy->__begin, yy->__end); if (!(YY_END)) goto l67; if (!yymatchChar(yy, '}')) goto l67; if (!yy_Spacing(yy)) goto l67; yyprintf((stderr, " ok %s @ %s\n", "Action", yy->__buf+yy->__pos)); return 1; l67:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Action", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_AND(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "AND")); if (!yymatchChar(yy, '&')) goto l70; if (!yy_Spacing(yy)) goto l70; yyprintf((stderr, " ok %s @ %s\n", "AND", yy->__buf+yy->__pos)); return 1; l70:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "AND", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Prefix(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Prefix")); { int yypos72= yy->__pos, yythunkpos72= yy->__thunkpos; if (!yy_AND(yy)) goto l73; if (!yy_Action(yy)) goto l73; yyDo(yy, yy_1_Prefix, yy->__begin, yy->__end); goto l72; l73:; yy->__pos= yypos72; yy->__thunkpos= yythunkpos72; if (!yy_AND(yy)) goto l74; if (!yy_Suffix(yy)) goto l74; yyDo(yy, yy_2_Prefix, yy->__begin, yy->__end); goto l72; l74:; yy->__pos= yypos72; yy->__thunkpos= yythunkpos72; if (!yy_NOT(yy)) goto l75; if (!yy_Suffix(yy)) goto l75; yyDo(yy, yy_3_Prefix, yy->__begin, yy->__end); goto l72; l75:; yy->__pos= yypos72; yy->__thunkpos= yythunkpos72; if (!yy_Suffix(yy)) goto l71; } l72:; yyprintf((stderr, " ok %s @ %s\n", "Prefix", yy->__buf+yy->__pos)); return 1; l71:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Prefix", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_SLASH(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "SLASH")); if (!yymatchChar(yy, '/')) goto l76; if (!yy_Spacing(yy)) goto l76; yyprintf((stderr, " ok %s @ %s\n", "SLASH", yy->__buf+yy->__pos)); return 1; l76:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "SLASH", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Sequence(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Sequence")); { int yypos78= yy->__pos, yythunkpos78= yy->__thunkpos; if (!yy_Prefix(yy)) goto l79; l80:; { int yypos81= yy->__pos, yythunkpos81= yy->__thunkpos; if (!yy_Prefix(yy)) goto l81; yyDo(yy, yy_1_Sequence, yy->__begin, yy->__end); goto l80; l81:; yy->__pos= yypos81; yy->__thunkpos= yythunkpos81; } goto l78; l79:; yy->__pos= yypos78; yy->__thunkpos= yythunkpos78; yyDo(yy, yy_2_Sequence, yy->__begin, yy->__end); } l78:; yyprintf((stderr, " ok %s @ %s\n", "Sequence", yy->__buf+yy->__pos)); return 1; l77:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Sequence", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Expression(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Expression")); if (!yy_Sequence(yy)) goto l82; l83:; { int yypos84= yy->__pos, yythunkpos84= yy->__thunkpos; if (!yy_SLASH(yy)) goto l84; if (!yy_Sequence(yy)) goto l84; yyDo(yy, yy_1_Expression, yy->__begin, yy->__end); goto l83; l84:; yy->__pos= yypos84; yy->__thunkpos= yythunkpos84; } yyprintf((stderr, " ok %s @ %s\n", "Expression", yy->__buf+yy->__pos)); return 1; l82:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Expression", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_LEFTARROW(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "LEFTARROW")); if (!yymatchString(yy, "<-")) goto l85; if (!yy_Spacing(yy)) goto l85; yyprintf((stderr, " ok %s @ %s\n", "LEFTARROW", yy->__buf+yy->__pos)); return 1; l85:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "LEFTARROW", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Identifier(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Identifier")); yyText(yy, yy->__begin, yy->__end); if (!(YY_BEGIN)) goto l86; if (!yy_IdentStart(yy)) goto l86; l87:; { int yypos88= yy->__pos, yythunkpos88= yy->__thunkpos; if (!yy_IdentCont(yy)) goto l88; goto l87; l88:; yy->__pos= yypos88; yy->__thunkpos= yythunkpos88; } yyText(yy, yy->__begin, yy->__end); if (!(YY_END)) goto l86; if (!yy_Spacing(yy)) goto l86; yyprintf((stderr, " ok %s @ %s\n", "Identifier", yy->__buf+yy->__pos)); return 1; l86:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Identifier", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_EndOfFile(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "EndOfFile")); { int yypos90= yy->__pos, yythunkpos90= yy->__thunkpos; if (!yymatchDot(yy)) goto l90; goto l89; l90:; yy->__pos= yypos90; yy->__thunkpos= yythunkpos90; } yyprintf((stderr, " ok %s @ %s\n", "EndOfFile", yy->__buf+yy->__pos)); return 1; l89:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "EndOfFile", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Definition(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Definition")); if (!yy_Identifier(yy)) goto l91; yyDo(yy, yy_1_Definition, yy->__begin, yy->__end); if (!yy_LEFTARROW(yy)) goto l91; if (!yy_Expression(yy)) goto l91; yyDo(yy, yy_2_Definition, yy->__begin, yy->__end); yyText(yy, yy->__begin, yy->__end); if (!( YYACCEPT )) goto l91; yyprintf((stderr, " ok %s @ %s\n", "Definition", yy->__buf+yy->__pos)); return 1; l91:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Definition", yy->__buf+yy->__pos)); return 0; } YY_RULE(int) yy_Spacing(yycontext *yy) { yyprintf((stderr, "%s\n", "Spacing")); l93:; { int yypos94= yy->__pos, yythunkpos94= yy->__thunkpos; { int yypos95= yy->__pos, yythunkpos95= yy->__thunkpos; if (!yy_Space(yy)) goto l96; goto l95; l96:; yy->__pos= yypos95; yy->__thunkpos= yythunkpos95; if (!yy_Comment(yy)) goto l94; } l95:; goto l93; l94:; yy->__pos= yypos94; yy->__thunkpos= yythunkpos94; } yyprintf((stderr, " ok %s @ %s\n", "Spacing", yy->__buf+yy->__pos)); return 1; } YY_RULE(int) yy_Grammar(yycontext *yy) { int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos; yyprintf((stderr, "%s\n", "Grammar")); if (!yy_Spacing(yy)) goto l97; if (!yy_Definition(yy)) goto l97; l98:; { int yypos99= yy->__pos, yythunkpos99= yy->__thunkpos; if (!yy_Definition(yy)) goto l99; goto l98; l99:; yy->__pos= yypos99; yy->__thunkpos= yythunkpos99; } if (!yy_EndOfFile(yy)) goto l97; yyprintf((stderr, " ok %s @ %s\n", "Grammar", yy->__buf+yy->__pos)); return 1; l97:; yy->__pos= yypos0; yy->__thunkpos= yythunkpos0; yyprintf((stderr, " fail %s @ %s\n", "Grammar", yy->__buf+yy->__pos)); return 0; } #ifndef YY_PART typedef int (*yyrule)(yycontext *yy); YY_PARSE(int) YYPARSEFROM(YY_CTX_PARAM_ yyrule yystart) { int yyok; if (!yyctx->__buflen) { yyctx->__buflen= YY_BUFFER_SIZE; yyctx->__buf= (char *)YY_MALLOC(yyctx, yyctx->__buflen); yyctx->__textlen= YY_BUFFER_SIZE; yyctx->__text= (char *)YY_MALLOC(yyctx, yyctx->__textlen); yyctx->__thunkslen= YY_STACK_SIZE; yyctx->__thunks= (yythunk *)YY_MALLOC(yyctx, sizeof(yythunk) * yyctx->__thunkslen); yyctx->__valslen= YY_STACK_SIZE; yyctx->__vals= (YYSTYPE *)YY_MALLOC(yyctx, sizeof(YYSTYPE) * yyctx->__valslen); yyctx->__begin= yyctx->__end= yyctx->__pos= yyctx->__limit= yyctx->__thunkpos= 0; } yyctx->__begin= yyctx->__end= yyctx->__pos; yyctx->__thunkpos= 0; yyctx->__val= yyctx->__vals; yyok= yystart(yyctx); if (yyok) yyDone(yyctx); yyCommit(yyctx); return yyok; } YY_PARSE(int) YYPARSE(YY_CTX_PARAM) { return YYPARSEFROM(YY_CTX_ARG_ yy_Grammar); } YY_PARSE(yycontext *) YYRELEASE(yycontext *yyctx) { if (yyctx->__buflen) { yyctx->__buflen= 0; YY_FREE(yyctx->__buf); YY_FREE(yyctx->__text); YY_FREE(yyctx->__thunks); YY_FREE(yyctx->__vals); } return yyctx; } #endif