mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-11 00:44:27 -05:00
913 lines
36 KiB
Plaintext
913 lines
36 KiB
Plaintext
|
/* A recursive-descent parser generated by peg 0.1.9 */
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#define YYRULECOUNT 32
|
||
|
#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 YY_INPUT
|
||
|
#define YY_INPUT(buf, result, max_size) \
|
||
|
{ \
|
||
|
int yyc= getchar(); \
|
||
|
result= (EOF == yyc) ? 0 : (*(buf)= yyc, 1); \
|
||
|
yyprintf((stderr, "<%c>", yyc)); \
|
||
|
}
|
||
|
#endif
|
||
|
#ifndef YY_BEGIN
|
||
|
#define YY_BEGIN ( ctx->begin= ctx->pos, 1)
|
||
|
#endif
|
||
|
#ifndef YY_END
|
||
|
#define YY_END ( ctx->end= ctx->pos, 1)
|
||
|
#endif
|
||
|
#ifdef YY_DEBUG
|
||
|
# define yyprintf(args) fprintf args
|
||
|
#else
|
||
|
# define yyprintf(args)
|
||
|
#endif
|
||
|
#ifndef YYSTYPE
|
||
|
#define YYSTYPE int
|
||
|
#endif
|
||
|
|
||
|
#ifndef YY_PART
|
||
|
|
||
|
typedef struct _yycontext yycontext;
|
||
|
typedef void (*yyaction)(yycontext *ctx, 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 yy;
|
||
|
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
|
||
|
#else
|
||
|
#define YY_CTX_PARAM_
|
||
|
#define YY_CTX_PARAM
|
||
|
#define YY_CTX_ARG_
|
||
|
#define YY_CTX_ARG
|
||
|
yycontext yyctx0;
|
||
|
yycontext *yyctx= &yyctx0;
|
||
|
#endif
|
||
|
|
||
|
YY_LOCAL(int) yyrefill(yycontext *ctx)
|
||
|
{
|
||
|
int yyn;
|
||
|
while (ctx->buflen - ctx->pos < 512)
|
||
|
{
|
||
|
ctx->buflen *= 2;
|
||
|
ctx->buf= (char *)realloc(ctx->buf, ctx->buflen);
|
||
|
}
|
||
|
YY_INPUT((ctx->buf + ctx->pos), yyn, (ctx->buflen - ctx->pos));
|
||
|
if (!yyn) return 0;
|
||
|
ctx->limit += yyn;
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yymatchDot(yycontext *ctx)
|
||
|
{
|
||
|
if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;
|
||
|
++ctx->pos;
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yymatchChar(yycontext *ctx, int c)
|
||
|
{
|
||
|
if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;
|
||
|
if ((unsigned char)ctx->buf[ctx->pos] == c)
|
||
|
{
|
||
|
++ctx->pos;
|
||
|
yyprintf((stderr, " ok yymatchChar(ctx, %c) @ %s\n", c, ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
}
|
||
|
yyprintf((stderr, " fail yymatchChar(ctx, %c) @ %s\n", c, ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yymatchString(yycontext *ctx, char *s)
|
||
|
{
|
||
|
int yysav= ctx->pos;
|
||
|
while (*s)
|
||
|
{
|
||
|
if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;
|
||
|
if (ctx->buf[ctx->pos] != *s)
|
||
|
{
|
||
|
ctx->pos= yysav;
|
||
|
return 0;
|
||
|
}
|
||
|
++s;
|
||
|
++ctx->pos;
|
||
|
}
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yymatchClass(yycontext *ctx, unsigned char *bits)
|
||
|
{
|
||
|
int c;
|
||
|
if (ctx->pos >= ctx->limit && !yyrefill(ctx)) return 0;
|
||
|
c= (unsigned char)ctx->buf[ctx->pos];
|
||
|
if (bits[c >> 3] & (1 << (c & 7)))
|
||
|
{
|
||
|
++ctx->pos;
|
||
|
yyprintf((stderr, " ok yymatchClass @ %s\n", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
}
|
||
|
yyprintf((stderr, " fail yymatchClass @ %s\n", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(void) yyDo(yycontext *ctx, yyaction action, int begin, int end)
|
||
|
{
|
||
|
while (ctx->thunkpos >= ctx->thunkslen)
|
||
|
{
|
||
|
ctx->thunkslen *= 2;
|
||
|
ctx->thunks= (yythunk *)realloc(ctx->thunks, sizeof(yythunk) * ctx->thunkslen);
|
||
|
}
|
||
|
ctx->thunks[ctx->thunkpos].begin= begin;
|
||
|
ctx->thunks[ctx->thunkpos].end= end;
|
||
|
ctx->thunks[ctx->thunkpos].action= action;
|
||
|
++ctx->thunkpos;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yyText(yycontext *ctx, int begin, int end)
|
||
|
{
|
||
|
int yyleng= end - begin;
|
||
|
if (yyleng <= 0)
|
||
|
yyleng= 0;
|
||
|
else
|
||
|
{
|
||
|
while (ctx->textlen < (yyleng + 1))
|
||
|
{
|
||
|
ctx->textlen *= 2;
|
||
|
ctx->text= (char *)realloc(ctx->text, ctx->textlen);
|
||
|
}
|
||
|
memcpy(ctx->text, ctx->buf + begin, yyleng);
|
||
|
}
|
||
|
ctx->text[yyleng]= '\0';
|
||
|
return yyleng;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(void) yyDone(yycontext *ctx)
|
||
|
{
|
||
|
int pos;
|
||
|
for (pos= 0; pos < ctx->thunkpos; ++pos)
|
||
|
{
|
||
|
yythunk *thunk= &ctx->thunks[pos];
|
||
|
int yyleng= thunk->end ? yyText(ctx, thunk->begin, thunk->end) : thunk->begin;
|
||
|
yyprintf((stderr, "DO [%d] %p %s\n", pos, thunk->action, ctx->text));
|
||
|
thunk->action(ctx, ctx->text, yyleng);
|
||
|
}
|
||
|
ctx->thunkpos= 0;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(void) yyCommit(yycontext *ctx)
|
||
|
{
|
||
|
if ((ctx->limit -= ctx->pos))
|
||
|
{
|
||
|
memmove(ctx->buf, ctx->buf + ctx->pos, ctx->limit);
|
||
|
}
|
||
|
ctx->begin -= ctx->pos;
|
||
|
ctx->end -= ctx->pos;
|
||
|
ctx->pos= ctx->thunkpos= 0;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(int) yyAccept(yycontext *ctx, int tp0)
|
||
|
{
|
||
|
if (tp0)
|
||
|
{
|
||
|
fprintf(stderr, "accept denied at %d\n", tp0);
|
||
|
return 0;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
yyDone(ctx);
|
||
|
yyCommit(ctx);
|
||
|
}
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
YY_LOCAL(void) yyPush(yycontext *ctx, char *text, int count) { ctx->val += count; }
|
||
|
YY_LOCAL(void) yyPop(yycontext *ctx, char *text, int count) { ctx->val -= count; }
|
||
|
YY_LOCAL(void) yySet(yycontext *ctx, char *text, int count) { ctx->val[count]= ctx->yy; }
|
||
|
|
||
|
#endif /* YY_PART */
|
||
|
|
||
|
#define YYACCEPT yyAccept(ctx, yythunkpos0)
|
||
|
|
||
|
YY_RULE(int) yy_EndOfLine(yycontext *ctx); /* 32 */
|
||
|
YY_RULE(int) yy_Comment(yycontext *ctx); /* 31 */
|
||
|
YY_RULE(int) yy_Space(yycontext *ctx); /* 30 */
|
||
|
YY_RULE(int) yy_Range(yycontext *ctx); /* 29 */
|
||
|
YY_RULE(int) yy_Char(yycontext *ctx); /* 28 */
|
||
|
YY_RULE(int) yy_IdentCont(yycontext *ctx); /* 27 */
|
||
|
YY_RULE(int) yy_IdentStart(yycontext *ctx); /* 26 */
|
||
|
YY_RULE(int) yy_END(yycontext *ctx); /* 25 */
|
||
|
YY_RULE(int) yy_BEGIN(yycontext *ctx); /* 24 */
|
||
|
YY_RULE(int) yy_DOT(yycontext *ctx); /* 23 */
|
||
|
YY_RULE(int) yy_Class(yycontext *ctx); /* 22 */
|
||
|
YY_RULE(int) yy_Literal(yycontext *ctx); /* 21 */
|
||
|
YY_RULE(int) yy_CLOSE(yycontext *ctx); /* 20 */
|
||
|
YY_RULE(int) yy_OPEN(yycontext *ctx); /* 19 */
|
||
|
YY_RULE(int) yy_PLUS(yycontext *ctx); /* 18 */
|
||
|
YY_RULE(int) yy_STAR(yycontext *ctx); /* 17 */
|
||
|
YY_RULE(int) yy_QUESTION(yycontext *ctx); /* 16 */
|
||
|
YY_RULE(int) yy_Primary(yycontext *ctx); /* 15 */
|
||
|
YY_RULE(int) yy_NOT(yycontext *ctx); /* 14 */
|
||
|
YY_RULE(int) yy_Suffix(yycontext *ctx); /* 13 */
|
||
|
YY_RULE(int) yy_Action(yycontext *ctx); /* 12 */
|
||
|
YY_RULE(int) yy_AND(yycontext *ctx); /* 11 */
|
||
|
YY_RULE(int) yy_Prefix(yycontext *ctx); /* 10 */
|
||
|
YY_RULE(int) yy_SLASH(yycontext *ctx); /* 9 */
|
||
|
YY_RULE(int) yy_Sequence(yycontext *ctx); /* 8 */
|
||
|
YY_RULE(int) yy_Expression(yycontext *ctx); /* 7 */
|
||
|
YY_RULE(int) yy_LEFTARROW(yycontext *ctx); /* 6 */
|
||
|
YY_RULE(int) yy_Identifier(yycontext *ctx); /* 5 */
|
||
|
YY_RULE(int) yy_EndOfFile(yycontext *ctx); /* 4 */
|
||
|
YY_RULE(int) yy_Definition(yycontext *ctx); /* 3 */
|
||
|
YY_RULE(int) yy_Spacing(yycontext *ctx); /* 2 */
|
||
|
YY_RULE(int) yy_Grammar(yycontext *ctx); /* 1 */
|
||
|
|
||
|
YY_ACTION(void) yy_7_Primary(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_5_Primary\n"));
|
||
|
push(makeAction(yytext)); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_4_Primary(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_4_Primary\n"));
|
||
|
push(makeDot()); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_3_Primary(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_3_Primary\n"));
|
||
|
push(makeClass(yytext)); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_2_Primary(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_2_Primary\n"));
|
||
|
push(makeString(yytext)); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_1_Primary(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_3_Suffix\n"));
|
||
|
push(makePlus (pop())); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_2_Suffix(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_2_Suffix\n"));
|
||
|
push(makeStar (pop())); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_1_Suffix(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_1_Suffix\n"));
|
||
|
push(makeQuery(pop())); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_3_Prefix(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_3_Prefix\n"));
|
||
|
push(makePeekNot(pop())); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_2_Prefix(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_2_Prefix\n"));
|
||
|
push(makePeekFor(pop())); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_1_Prefix(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_1_Prefix\n"));
|
||
|
push(makePredicate(yytext)); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_2_Sequence(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->thunkpos
|
||
|
yyprintf((stderr, "do yy_2_Sequence\n"));
|
||
|
push(makePredicate("1")); ;
|
||
|
#undef yythunkpos
|
||
|
#undef yypos
|
||
|
#undef yy
|
||
|
}
|
||
|
YY_ACTION(void) yy_1_Sequence(yycontext *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx, char *yytext, int yyleng)
|
||
|
{
|
||
|
#define yy ctx->yy
|
||
|
#define yypos ctx->pos
|
||
|
#define yythunkpos ctx->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 *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "EndOfLine"));
|
||
|
{ int yypos2= ctx->pos, yythunkpos2= ctx->thunkpos; if (!yymatchString(ctx, "\r\n")) goto l3; goto l2;
|
||
|
l3:; ctx->pos= yypos2; ctx->thunkpos= yythunkpos2; if (!yymatchChar(ctx, '\n')) goto l4; goto l2;
|
||
|
l4:; ctx->pos= yypos2; ctx->thunkpos= yythunkpos2; if (!yymatchChar(ctx, '\r')) goto l1;
|
||
|
}
|
||
|
l2:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "EndOfLine", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l1:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "EndOfLine", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Comment(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Comment")); if (!yymatchChar(ctx, '#')) goto l5;
|
||
|
l6:;
|
||
|
{ int yypos7= ctx->pos, yythunkpos7= ctx->thunkpos;
|
||
|
{ int yypos8= ctx->pos, yythunkpos8= ctx->thunkpos; if (!yy_EndOfLine(ctx)) goto l8; goto l7;
|
||
|
l8:; ctx->pos= yypos8; ctx->thunkpos= yythunkpos8;
|
||
|
} if (!yymatchDot(ctx)) goto l7; goto l6;
|
||
|
l7:; ctx->pos= yypos7; ctx->thunkpos= yythunkpos7;
|
||
|
} if (!yy_EndOfLine(ctx)) goto l5;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Comment", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l5:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Comment", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Space(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Space"));
|
||
|
{ int yypos10= ctx->pos, yythunkpos10= ctx->thunkpos; if (!yymatchChar(ctx, ' ')) goto l11; goto l10;
|
||
|
l11:; ctx->pos= yypos10; ctx->thunkpos= yythunkpos10; if (!yymatchChar(ctx, '\t')) goto l12; goto l10;
|
||
|
l12:; ctx->pos= yypos10; ctx->thunkpos= yythunkpos10; if (!yy_EndOfLine(ctx)) goto l9;
|
||
|
}
|
||
|
l10:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Space", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l9:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Space", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Range(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Range"));
|
||
|
{ int yypos14= ctx->pos, yythunkpos14= ctx->thunkpos; if (!yy_Char(ctx)) goto l15; if (!yymatchChar(ctx, '-')) goto l15; if (!yy_Char(ctx)) goto l15; goto l14;
|
||
|
l15:; ctx->pos= yypos14; ctx->thunkpos= yythunkpos14; if (!yy_Char(ctx)) goto l13;
|
||
|
}
|
||
|
l14:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Range", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l13:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Range", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Char(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Char"));
|
||
|
{ int yypos17= ctx->pos, yythunkpos17= ctx->thunkpos; if (!yymatchChar(ctx, '\\')) goto l18; if (!yymatchClass(ctx, (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:; ctx->pos= yypos17; ctx->thunkpos= yythunkpos17; if (!yymatchChar(ctx, '\\')) goto l19; if (!yymatchClass(ctx, (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(ctx, (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(ctx, (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:; ctx->pos= yypos17; ctx->thunkpos= yythunkpos17; if (!yymatchChar(ctx, '\\')) goto l20; if (!yymatchClass(ctx, (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= ctx->pos, yythunkpos21= ctx->thunkpos; if (!yymatchClass(ctx, (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:; ctx->pos= yypos21; ctx->thunkpos= yythunkpos21;
|
||
|
}
|
||
|
l22:; goto l17;
|
||
|
l20:; ctx->pos= yypos17; ctx->thunkpos= yythunkpos17; if (!yymatchChar(ctx, '\\')) goto l23; if (!yymatchChar(ctx, '-')) goto l23; goto l17;
|
||
|
l23:; ctx->pos= yypos17; ctx->thunkpos= yythunkpos17;
|
||
|
{ int yypos24= ctx->pos, yythunkpos24= ctx->thunkpos; if (!yymatchChar(ctx, '\\')) goto l24; goto l16;
|
||
|
l24:; ctx->pos= yypos24; ctx->thunkpos= yythunkpos24;
|
||
|
} if (!yymatchDot(ctx)) goto l16;
|
||
|
}
|
||
|
l17:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Char", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l16:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Char", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_IdentCont(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "IdentCont"));
|
||
|
{ int yypos26= ctx->pos, yythunkpos26= ctx->thunkpos; if (!yy_IdentStart(ctx)) goto l27; goto l26;
|
||
|
l27:; ctx->pos= yypos26; ctx->thunkpos= yythunkpos26; if (!yymatchClass(ctx, (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", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l25:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "IdentCont", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_IdentStart(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "IdentStart")); if (!yymatchClass(ctx, (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", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l28:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "IdentStart", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_END(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "END")); if (!yymatchChar(ctx, '>')) goto l29; if (!yy_Spacing(ctx)) goto l29;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "END", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l29:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "END", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_BEGIN(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "BEGIN")); if (!yymatchChar(ctx, '<')) goto l30; if (!yy_Spacing(ctx)) goto l30;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "BEGIN", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l30:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "BEGIN", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_DOT(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "DOT")); if (!yymatchChar(ctx, '.')) goto l31; if (!yy_Spacing(ctx)) goto l31;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "DOT", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l31:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "DOT", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Class(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Class")); if (!yymatchChar(ctx, '[')) goto l32; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l32;
|
||
|
l33:;
|
||
|
{ int yypos34= ctx->pos, yythunkpos34= ctx->thunkpos;
|
||
|
{ int yypos35= ctx->pos, yythunkpos35= ctx->thunkpos; if (!yymatchChar(ctx, ']')) goto l35; goto l34;
|
||
|
l35:; ctx->pos= yypos35; ctx->thunkpos= yythunkpos35;
|
||
|
} if (!yy_Range(ctx)) goto l34; goto l33;
|
||
|
l34:; ctx->pos= yypos34; ctx->thunkpos= yythunkpos34;
|
||
|
} yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l32; if (!yymatchChar(ctx, ']')) goto l32; if (!yy_Spacing(ctx)) goto l32;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Class", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l32:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Class", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Literal(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Literal"));
|
||
|
{ int yypos37= ctx->pos, yythunkpos37= ctx->thunkpos; if (!yymatchClass(ctx, (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(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l38;
|
||
|
l39:;
|
||
|
{ int yypos40= ctx->pos, yythunkpos40= ctx->thunkpos;
|
||
|
{ int yypos41= ctx->pos, yythunkpos41= ctx->thunkpos; if (!yymatchClass(ctx, (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:; ctx->pos= yypos41; ctx->thunkpos= yythunkpos41;
|
||
|
} if (!yy_Char(ctx)) goto l40; goto l39;
|
||
|
l40:; ctx->pos= yypos40; ctx->thunkpos= yythunkpos40;
|
||
|
} yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l38; if (!yymatchClass(ctx, (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(ctx)) goto l38; goto l37;
|
||
|
l38:; ctx->pos= yypos37; ctx->thunkpos= yythunkpos37; if (!yymatchClass(ctx, (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(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l36;
|
||
|
l42:;
|
||
|
{ int yypos43= ctx->pos, yythunkpos43= ctx->thunkpos;
|
||
|
{ int yypos44= ctx->pos, yythunkpos44= ctx->thunkpos; if (!yymatchClass(ctx, (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:; ctx->pos= yypos44; ctx->thunkpos= yythunkpos44;
|
||
|
} if (!yy_Char(ctx)) goto l43; goto l42;
|
||
|
l43:; ctx->pos= yypos43; ctx->thunkpos= yythunkpos43;
|
||
|
} yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l36; if (!yymatchClass(ctx, (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(ctx)) goto l36;
|
||
|
}
|
||
|
l37:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Literal", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l36:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Literal", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_CLOSE(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "CLOSE")); if (!yymatchChar(ctx, ')')) goto l45; if (!yy_Spacing(ctx)) goto l45;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "CLOSE", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l45:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "CLOSE", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_OPEN(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "OPEN")); if (!yymatchChar(ctx, '(')) goto l46; if (!yy_Spacing(ctx)) goto l46;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "OPEN", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l46:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "OPEN", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_PLUS(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "PLUS")); if (!yymatchChar(ctx, '+')) goto l47; if (!yy_Spacing(ctx)) goto l47;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "PLUS", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l47:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "PLUS", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_STAR(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "STAR")); if (!yymatchChar(ctx, '*')) goto l48; if (!yy_Spacing(ctx)) goto l48;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "STAR", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l48:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "STAR", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_QUESTION(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "QUESTION")); if (!yymatchChar(ctx, '?')) goto l49; if (!yy_Spacing(ctx)) goto l49;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "QUESTION", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l49:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "QUESTION", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Primary(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Primary"));
|
||
|
{ int yypos51= ctx->pos, yythunkpos51= ctx->thunkpos; if (!yy_Identifier(ctx)) goto l52;
|
||
|
{ int yypos53= ctx->pos, yythunkpos53= ctx->thunkpos; if (!yy_LEFTARROW(ctx)) goto l53; goto l52;
|
||
|
l53:; ctx->pos= yypos53; ctx->thunkpos= yythunkpos53;
|
||
|
} yyDo(ctx, yy_1_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l52:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_OPEN(ctx)) goto l54; if (!yy_Expression(ctx)) goto l54; if (!yy_CLOSE(ctx)) goto l54; goto l51;
|
||
|
l54:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_Literal(ctx)) goto l55; yyDo(ctx, yy_2_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l55:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_Class(ctx)) goto l56; yyDo(ctx, yy_3_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l56:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_DOT(ctx)) goto l57; yyDo(ctx, yy_4_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l57:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_Action(ctx)) goto l58; yyDo(ctx, yy_5_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l58:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_BEGIN(ctx)) goto l59; yyDo(ctx, yy_6_Primary, ctx->begin, ctx->end); goto l51;
|
||
|
l59:; ctx->pos= yypos51; ctx->thunkpos= yythunkpos51; if (!yy_END(ctx)) goto l50; yyDo(ctx, yy_7_Primary, ctx->begin, ctx->end);
|
||
|
}
|
||
|
l51:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Primary", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l50:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Primary", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_NOT(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "NOT")); if (!yymatchChar(ctx, '!')) goto l60; if (!yy_Spacing(ctx)) goto l60;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "NOT", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l60:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "NOT", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Suffix(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Suffix")); if (!yy_Primary(ctx)) goto l61;
|
||
|
{ int yypos62= ctx->pos, yythunkpos62= ctx->thunkpos;
|
||
|
{ int yypos64= ctx->pos, yythunkpos64= ctx->thunkpos; if (!yy_QUESTION(ctx)) goto l65; yyDo(ctx, yy_1_Suffix, ctx->begin, ctx->end); goto l64;
|
||
|
l65:; ctx->pos= yypos64; ctx->thunkpos= yythunkpos64; if (!yy_STAR(ctx)) goto l66; yyDo(ctx, yy_2_Suffix, ctx->begin, ctx->end); goto l64;
|
||
|
l66:; ctx->pos= yypos64; ctx->thunkpos= yythunkpos64; if (!yy_PLUS(ctx)) goto l62; yyDo(ctx, yy_3_Suffix, ctx->begin, ctx->end);
|
||
|
}
|
||
|
l64:; goto l63;
|
||
|
l62:; ctx->pos= yypos62; ctx->thunkpos= yythunkpos62;
|
||
|
}
|
||
|
l63:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Suffix", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l61:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Suffix", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Action(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Action")); if (!yymatchChar(ctx, '{')) goto l67; yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l67;
|
||
|
l68:;
|
||
|
{ int yypos69= ctx->pos, yythunkpos69= ctx->thunkpos; if (!yymatchClass(ctx, (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:; ctx->pos= yypos69; ctx->thunkpos= yythunkpos69;
|
||
|
} yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l67; if (!yymatchChar(ctx, '}')) goto l67; if (!yy_Spacing(ctx)) goto l67;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Action", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l67:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Action", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_AND(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "AND")); if (!yymatchChar(ctx, '&')) goto l70; if (!yy_Spacing(ctx)) goto l70;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "AND", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l70:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "AND", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Prefix(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Prefix"));
|
||
|
{ int yypos72= ctx->pos, yythunkpos72= ctx->thunkpos; if (!yy_AND(ctx)) goto l73; if (!yy_Action(ctx)) goto l73; yyDo(ctx, yy_1_Prefix, ctx->begin, ctx->end); goto l72;
|
||
|
l73:; ctx->pos= yypos72; ctx->thunkpos= yythunkpos72; if (!yy_AND(ctx)) goto l74; if (!yy_Suffix(ctx)) goto l74; yyDo(ctx, yy_2_Prefix, ctx->begin, ctx->end); goto l72;
|
||
|
l74:; ctx->pos= yypos72; ctx->thunkpos= yythunkpos72; if (!yy_NOT(ctx)) goto l75; if (!yy_Suffix(ctx)) goto l75; yyDo(ctx, yy_3_Prefix, ctx->begin, ctx->end); goto l72;
|
||
|
l75:; ctx->pos= yypos72; ctx->thunkpos= yythunkpos72; if (!yy_Suffix(ctx)) goto l71;
|
||
|
}
|
||
|
l72:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Prefix", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l71:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Prefix", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_SLASH(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "SLASH")); if (!yymatchChar(ctx, '/')) goto l76; if (!yy_Spacing(ctx)) goto l76;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "SLASH", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l76:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "SLASH", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Sequence(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Sequence"));
|
||
|
{ int yypos78= ctx->pos, yythunkpos78= ctx->thunkpos; if (!yy_Prefix(ctx)) goto l79;
|
||
|
l80:;
|
||
|
{ int yypos81= ctx->pos, yythunkpos81= ctx->thunkpos; if (!yy_Prefix(ctx)) goto l81; yyDo(ctx, yy_1_Sequence, ctx->begin, ctx->end); goto l80;
|
||
|
l81:; ctx->pos= yypos81; ctx->thunkpos= yythunkpos81;
|
||
|
} goto l78;
|
||
|
l79:; ctx->pos= yypos78; ctx->thunkpos= yythunkpos78; yyDo(ctx, yy_2_Sequence, ctx->begin, ctx->end);
|
||
|
}
|
||
|
l78:;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Sequence", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l77:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Sequence", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Expression(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Expression")); if (!yy_Sequence(ctx)) goto l82;
|
||
|
l83:;
|
||
|
{ int yypos84= ctx->pos, yythunkpos84= ctx->thunkpos; if (!yy_SLASH(ctx)) goto l84; if (!yy_Sequence(ctx)) goto l84; yyDo(ctx, yy_1_Expression, ctx->begin, ctx->end); goto l83;
|
||
|
l84:; ctx->pos= yypos84; ctx->thunkpos= yythunkpos84;
|
||
|
}
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Expression", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l82:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Expression", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_LEFTARROW(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "LEFTARROW")); if (!yymatchString(ctx, "<-")) goto l85; if (!yy_Spacing(ctx)) goto l85;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "LEFTARROW", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l85:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "LEFTARROW", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Identifier(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Identifier")); yyText(ctx, ctx->begin, ctx->end); if (!(YY_BEGIN)) goto l86; if (!yy_IdentStart(ctx)) goto l86;
|
||
|
l87:;
|
||
|
{ int yypos88= ctx->pos, yythunkpos88= ctx->thunkpos; if (!yy_IdentCont(ctx)) goto l88; goto l87;
|
||
|
l88:; ctx->pos= yypos88; ctx->thunkpos= yythunkpos88;
|
||
|
} yyText(ctx, ctx->begin, ctx->end); if (!(YY_END)) goto l86; if (!yy_Spacing(ctx)) goto l86;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Identifier", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l86:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Identifier", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_EndOfFile(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "EndOfFile"));
|
||
|
{ int yypos90= ctx->pos, yythunkpos90= ctx->thunkpos; if (!yymatchDot(ctx)) goto l90; goto l89;
|
||
|
l90:; ctx->pos= yypos90; ctx->thunkpos= yythunkpos90;
|
||
|
}
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "EndOfFile", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l89:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "EndOfFile", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Definition(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Definition")); if (!yy_Identifier(ctx)) goto l91; yyDo(ctx, yy_1_Definition, ctx->begin, ctx->end); if (!yy_LEFTARROW(ctx)) goto l91; if (!yy_Expression(ctx)) goto l91; yyDo(ctx, yy_2_Definition, ctx->begin, ctx->end); yyText(ctx, ctx->begin, ctx->end); if (!( YYACCEPT )) goto l91;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Definition", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l91:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Definition", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
YY_RULE(int) yy_Spacing(yycontext *ctx)
|
||
|
{
|
||
|
yyprintf((stderr, "%s\n", "Spacing"));
|
||
|
l93:;
|
||
|
{ int yypos94= ctx->pos, yythunkpos94= ctx->thunkpos;
|
||
|
{ int yypos95= ctx->pos, yythunkpos95= ctx->thunkpos; if (!yy_Space(ctx)) goto l96; goto l95;
|
||
|
l96:; ctx->pos= yypos95; ctx->thunkpos= yythunkpos95; if (!yy_Comment(ctx)) goto l94;
|
||
|
}
|
||
|
l95:; goto l93;
|
||
|
l94:; ctx->pos= yypos94; ctx->thunkpos= yythunkpos94;
|
||
|
}
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Spacing", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
}
|
||
|
YY_RULE(int) yy_Grammar(yycontext *ctx)
|
||
|
{ int yypos0= ctx->pos, yythunkpos0= ctx->thunkpos;
|
||
|
yyprintf((stderr, "%s\n", "Grammar")); if (!yy_Spacing(ctx)) goto l97; if (!yy_Definition(ctx)) goto l97;
|
||
|
l98:;
|
||
|
{ int yypos99= ctx->pos, yythunkpos99= ctx->thunkpos; if (!yy_Definition(ctx)) goto l99; goto l98;
|
||
|
l99:; ctx->pos= yypos99; ctx->thunkpos= yythunkpos99;
|
||
|
} if (!yy_EndOfFile(ctx)) goto l97;
|
||
|
yyprintf((stderr, " ok %s @ %s\n", "Grammar", ctx->buf+ctx->pos));
|
||
|
return 1;
|
||
|
l97:; ctx->pos= yypos0; ctx->thunkpos= yythunkpos0;
|
||
|
yyprintf((stderr, " fail %s @ %s\n", "Grammar", ctx->buf+ctx->pos));
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
#ifndef YY_PART
|
||
|
|
||
|
typedef int (*yyrule)(yycontext *ctx);
|
||
|
|
||
|
YY_PARSE(int) YYPARSEFROM(YY_CTX_PARAM_ yyrule yystart)
|
||
|
{
|
||
|
int yyok;
|
||
|
if (!yyctx->buflen)
|
||
|
{
|
||
|
yyctx->buflen= 1024;
|
||
|
yyctx->buf= (char *)malloc(yyctx->buflen);
|
||
|
yyctx->textlen= 1024;
|
||
|
yyctx->text= (char *)malloc(yyctx->textlen);
|
||
|
yyctx->thunkslen= 32;
|
||
|
yyctx->thunks= (yythunk *)malloc(sizeof(yythunk) * yyctx->thunkslen);
|
||
|
yyctx->valslen= 32;
|
||
|
yyctx->vals= (YYSTYPE *)malloc(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);
|
||
|
}
|
||
|
|
||
|
#endif
|