/* A recursive-descent parser generated by peg 0.1.15 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define YYRULECOUNT 23
#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(C, P)		free(P)
#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_Fname(yycontext *yy); /* 23 */
YY_RULE(int) yy_CLOSE(yycontext *yy); /* 22 */
YY_RULE(int) yy_OPEN(yycontext *yy); /* 21 */
YY_RULE(int) yy_Funcall(yycontext *yy); /* 20 */
YY_RULE(int) yy_Constant(yycontext *yy); /* 19 */
YY_RULE(int) yy_SI_Unit(yycontext *yy); /* 18 */
YY_RULE(int) yy_F_NUMBER(yycontext *yy); /* 17 */
YY_RULE(int) yy_MOD(yycontext *yy); /* 16 */
YY_RULE(int) yy_DIVIDE(yycontext *yy); /* 15 */
YY_RULE(int) yy_TIMES(yycontext *yy); /* 14 */
YY_RULE(int) yy_POW(yycontext *yy); /* 13 */
YY_RULE(int) yy_Value(yycontext *yy); /* 12 */
YY_RULE(int) yy_GREATER_THAN(yycontext *yy); /* 11 */
YY_RULE(int) yy_GREATEREQ_THAN(yycontext *yy); /* 10 */
YY_RULE(int) yy_LESS_THAN(yycontext *yy); /* 9 */
YY_RULE(int) yy_LESSEQ_THAN(yycontext *yy); /* 8 */
YY_RULE(int) yy_CLOSE_ENOUGH(yycontext *yy); /* 7 */
YY_RULE(int) yy_MINUS(yycontext *yy); /* 6 */
YY_RULE(int) yy_PLUS(yycontext *yy); /* 5 */
YY_RULE(int) yy_Product(yycontext *yy); /* 4 */
YY_RULE(int) yy_Sum(yycontext *yy); /* 3 */
YY_RULE(int) yy_SPACE(yycontext *yy); /* 2 */
YY_RULE(int) yy_Expr(yycontext *yy); /* 1 */

YY_ACTION(void) yy_5_SI_Unit(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_5_SI_Unit\n"));
  {
   math_eval_push(1000000000000000, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_4_SI_Unit(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_4_SI_Unit\n"));
  {
   math_eval_push(1000000000000, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_3_SI_Unit(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_3_SI_Unit\n"));
  {
   math_eval_push(1000000000, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_SI_Unit(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_SI_Unit\n"));
  {
   math_eval_push(1000000, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_SI_Unit(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_SI_Unit\n"));
  {
   math_eval_push(1000, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_13_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_13_Constant\n"));
  {
   math_eval_push(0.70710678118654752440, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_12_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_12_Constant\n"));
  {
   math_eval_push(1.41421356237309504880, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_11_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_11_Constant\n"));
  {
   math_eval_push(1.12837916709551257390, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_10_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_10_Constant\n"));
  {
   math_eval_push(0.63661977236758134308, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_9_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_9_Constant\n"));
  {
   math_eval_push(0.31830988618379067154, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_8_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_8_Constant\n"));
  {
   math_eval_push(0.78539816339744830962, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_7_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_7_Constant\n"));
  {
   math_eval_push(1.57079632679489661923, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_6_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_6_Constant\n"));
  {
   math_eval_push(3.14159265358979323846, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_5_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_5_Constant\n"));
  {
   math_eval_push(2.30258509299404568402, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_4_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_4_Constant\n"));
  {
   math_eval_push(0.69314718055994530942, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_3_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_3_Constant\n"));
  {
   math_eval_push(0.43429448190325182765, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_Constant\n"));
  {
   math_eval_push(1.4426950408889634074, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Constant(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Constant\n"));
  {
   math_eval_push(2.7182818284590452354, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Fname(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Fname\n"));
  {
   strcpy(yy->fname, yytext); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Funcall(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Funcall\n"));
  {
   math_eval_push(EvaluateMathFunction(yy->fname, math_eval_pop(yy->stack, &(yy->stackp))), yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_Value(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_Value\n"));
  {
   double scanned = 0; sscanf(yytext, "%lf", &scanned); math_eval_push(scanned, yy->stack, &(yy->stackp)); /*Log(LOG_LEVEL_ERR, "YY: read FP %lf", scanned);*/ ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Value(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Value\n"));
  {
   double scanned = 0; sscanf(yytext, "%lf", &scanned); math_eval_push(math_eval_pop(yy->stack, &(yy->stackp)) * scanned, yy->stack, &(yy->stackp)); /* Log(LOG_LEVEL_ERR, "YY: read FP %lf", scanned); */ ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_4_Product(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_4_Product\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push((long)l % (long)r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_3_Product(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_3_Product\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l / r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_Product(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_Product\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l * r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Product(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Product\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(pow(l, r), yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_7_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_7_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l > r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_6_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_6_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push((l > r || fabs(l - r) < 0.00000000000000001), yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_5_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_5_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l < r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_4_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_4_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push((l < r || fabs(l - r) < 0.00000000000000001), yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_3_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_3_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(fabs(l - r) < 0.00000000000000001, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l - r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Sum(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Sum\n"));
  {
   double r= math_eval_pop(yy->stack, &(yy->stackp)), l= math_eval_pop(yy->stack, &(yy->stackp));  math_eval_push(l + r, yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_2_Expr(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_2_Expr\n"));
  {
   strcpy(yy->failure, "expression could not be parsed"); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}
YY_ACTION(void) yy_1_Expr(yycontext *yy, char *yytext, int yyleng)
{
#define __ yy->__
#define yypos yy->__pos
#define yythunkpos yy->__thunkpos
  yyprintf((stderr, "do yy_1_Expr\n"));
  {
   yy->result = math_eval_pop(yy->stack, &(yy->stackp)); ;
  }
#undef yythunkpos
#undef yypos
#undef yy
}

YY_RULE(int) yy_Fname(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Fname"));  yyText(yy, yy->__begin, yy->__end);  {
#define yytext yy->__text
#define yyleng yy->__textlen
if (!(YY_BEGIN)) goto l1;
#undef yytext
#undef yyleng
  }
  {  int yypos2= yy->__pos, yythunkpos2= yy->__thunkpos;  if (!yymatchString(yy, "ceil")) goto l3;  goto l2;
  l3:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "floor")) goto l4;  goto l2;
  l4:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "log10")) goto l5;  goto l2;
  l5:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "log2")) goto l6;  goto l2;
  l6:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "log")) goto l7;  goto l2;
  l7:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "sqrt")) goto l8;  goto l2;
  l8:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "sin")) goto l9;  goto l2;
  l9:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "cos")) goto l10;  goto l2;
  l10:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "tan")) goto l11;  goto l2;
  l11:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "asin")) goto l12;  goto l2;
  l12:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "acos")) goto l13;  goto l2;
  l13:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "atan")) goto l14;  goto l2;
  l14:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "abs")) goto l15;  goto l2;
  l15:;	  yy->__pos= yypos2; yy->__thunkpos= yythunkpos2;  if (!yymatchString(yy, "step")) goto l1;
  }
  l2:;	  yyText(yy, yy->__begin, yy->__end);  {
#define yytext yy->__text
#define yyleng yy->__textlen
if (!(YY_END)) goto l1;
#undef yytext
#undef yyleng
  }  yyDo(yy, yy_1_Fname, yy->__begin, yy->__end);
  yyprintf((stderr, "  ok   %s @ %s\n", "Fname", yy->__buf+yy->__pos));
  return 1;
  l1:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Fname", 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 l16;  if (!yy_SPACE(yy)) goto l16;
  yyprintf((stderr, "  ok   %s @ %s\n", "CLOSE", yy->__buf+yy->__pos));
  return 1;
  l16:;	  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 l17;  if (!yy_SPACE(yy)) goto l17;
  yyprintf((stderr, "  ok   %s @ %s\n", "OPEN", yy->__buf+yy->__pos));
  return 1;
  l17:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "OPEN", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_Funcall(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Funcall"));  if (!yy_Fname(yy)) goto l18;  if (!yy_OPEN(yy)) goto l18;  if (!yy_Value(yy)) goto l18;  if (!yy_CLOSE(yy)) goto l18;  yyDo(yy, yy_1_Funcall, yy->__begin, yy->__end);
  yyprintf((stderr, "  ok   %s @ %s\n", "Funcall", yy->__buf+yy->__pos));
  return 1;
  l18:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Funcall", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_Constant(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Constant"));
  {  int yypos20= yy->__pos, yythunkpos20= yy->__thunkpos;  if (!yymatchChar(yy, 'e')) goto l21;  yyDo(yy, yy_1_Constant, yy->__begin, yy->__end);  goto l20;
  l21:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "log2e")) goto l22;  yyDo(yy, yy_2_Constant, yy->__begin, yy->__end);  goto l20;
  l22:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "log10e")) goto l23;  yyDo(yy, yy_3_Constant, yy->__begin, yy->__end);  goto l20;
  l23:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "ln2")) goto l24;  yyDo(yy, yy_4_Constant, yy->__begin, yy->__end);  goto l20;
  l24:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "ln10")) goto l25;  yyDo(yy, yy_5_Constant, yy->__begin, yy->__end);  goto l20;
  l25:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "pi")) goto l26;  yyDo(yy, yy_6_Constant, yy->__begin, yy->__end);  goto l20;
  l26:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "pi_2")) goto l27;  yyDo(yy, yy_7_Constant, yy->__begin, yy->__end);  goto l20;
  l27:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "pi_4")) goto l28;  yyDo(yy, yy_8_Constant, yy->__begin, yy->__end);  goto l20;
  l28:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "1_pi")) goto l29;  yyDo(yy, yy_9_Constant, yy->__begin, yy->__end);  goto l20;
  l29:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "2_pi")) goto l30;  yyDo(yy, yy_10_Constant, yy->__begin, yy->__end);  goto l20;
  l30:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "2_sqrtpi")) goto l31;  yyDo(yy, yy_11_Constant, yy->__begin, yy->__end);  goto l20;
  l31:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "sqrt2")) goto l32;  yyDo(yy, yy_12_Constant, yy->__begin, yy->__end);  goto l20;
  l32:;	  yy->__pos= yypos20; yy->__thunkpos= yythunkpos20;  if (!yymatchString(yy, "sqrt1_2")) goto l19;  yyDo(yy, yy_13_Constant, yy->__begin, yy->__end);
  }
  l20:;	
  yyprintf((stderr, "  ok   %s @ %s\n", "Constant", yy->__buf+yy->__pos));
  return 1;
  l19:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Constant", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_SI_Unit(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "SI_Unit"));
  {  int yypos34= yy->__pos, yythunkpos34= yy->__thunkpos;  if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\000\010\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l35;  if (!yy_SPACE(yy)) goto l35;  yyDo(yy, yy_1_SI_Unit, yy->__begin, yy->__end);  goto l34;
  l35:;	  yy->__pos= yypos34; yy->__thunkpos= yythunkpos34;  if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\000\040\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l36;  if (!yy_SPACE(yy)) goto l36;  yyDo(yy, yy_2_SI_Unit, yy->__begin, yy->__end);  goto l34;
  l36:;	  yy->__pos= yypos34; yy->__thunkpos= yythunkpos34;  if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\200\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l37;  if (!yy_SPACE(yy)) goto l37;  yyDo(yy, yy_3_SI_Unit, yy->__begin, yy->__end);  goto l34;
  l37:;	  yy->__pos= yypos34; yy->__thunkpos= yythunkpos34;  if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\000\000\020\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l38;  if (!yy_SPACE(yy)) goto l38;  yyDo(yy, yy_4_SI_Unit, yy->__begin, yy->__end);  goto l34;
  l38:;	  yy->__pos= yypos34; yy->__thunkpos= yythunkpos34;  if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\000\000\001\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l33;  if (!yy_SPACE(yy)) goto l33;  yyDo(yy, yy_5_SI_Unit, yy->__begin, yy->__end);
  }
  l34:;	
  yyprintf((stderr, "  ok   %s @ %s\n", "SI_Unit", yy->__buf+yy->__pos));
  return 1;
  l33:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "SI_Unit", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_F_NUMBER(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "F_NUMBER"));  yyText(yy, yy->__begin, yy->__end);  {
#define yytext yy->__text
#define yyleng yy->__textlen
if (!(YY_BEGIN)) goto l39;
#undef yytext
#undef yyleng
  }
  {  int yypos40= yy->__pos, yythunkpos40= yy->__thunkpos;
  {  int yypos42= yy->__pos, yythunkpos42= yy->__thunkpos;  if (!yymatchChar(yy, '-')) goto l42;  goto l43;
  l42:;	  yy->__pos= yypos42; yy->__thunkpos= yythunkpos42;
  }
  l43:;	  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 l41;
  l44:;	
  {  int yypos45= yy->__pos, yythunkpos45= yy->__thunkpos;  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 l45;  goto l44;
  l45:;	  yy->__pos= yypos45; yy->__thunkpos= yythunkpos45;
  }
  {  int yypos46= yy->__pos, yythunkpos46= yy->__thunkpos;  if (!yymatchChar(yy, '.')) goto l46;  goto l47;
  l46:;	  yy->__pos= yypos46; yy->__thunkpos= yythunkpos46;
  }
  l47:;	
  l48:;	
  {  int yypos49= yy->__pos, yythunkpos49= yy->__thunkpos;  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 l49;  goto l48;
  l49:;	  yy->__pos= yypos49; yy->__thunkpos= yythunkpos49;
  }  goto l40;
  l41:;	  yy->__pos= yypos40; yy->__thunkpos= yythunkpos40;
  {  int yypos50= yy->__pos, yythunkpos50= yy->__thunkpos;  if (!yymatchChar(yy, '-')) goto l50;  goto l51;
  l50:;	  yy->__pos= yypos50; yy->__thunkpos= yythunkpos50;
  }
  l51:;	  if (!yymatchChar(yy, '.')) goto l39;  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 l39;
  l52:;	
  {  int yypos53= yy->__pos, yythunkpos53= yy->__thunkpos;  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 l53;  goto l52;
  l53:;	  yy->__pos= yypos53; yy->__thunkpos= yythunkpos53;
  }
  }
  l40:;	  yyText(yy, yy->__begin, yy->__end);  {
#define yytext yy->__text
#define yyleng yy->__textlen
if (!(YY_END)) goto l39;
#undef yytext
#undef yyleng
  }  if (!yy_SPACE(yy)) goto l39;
  yyprintf((stderr, "  ok   %s @ %s\n", "F_NUMBER", yy->__buf+yy->__pos));
  return 1;
  l39:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "F_NUMBER", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_MOD(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "MOD"));  if (!yymatchChar(yy, '%')) goto l54;  if (!yy_SPACE(yy)) goto l54;
  yyprintf((stderr, "  ok   %s @ %s\n", "MOD", yy->__buf+yy->__pos));
  return 1;
  l54:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "MOD", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_DIVIDE(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "DIVIDE"));  if (!yymatchChar(yy, '/')) goto l55;  if (!yy_SPACE(yy)) goto l55;
  yyprintf((stderr, "  ok   %s @ %s\n", "DIVIDE", yy->__buf+yy->__pos));
  return 1;
  l55:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "DIVIDE", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_TIMES(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "TIMES"));  if (!yymatchChar(yy, '*')) goto l56;  if (!yy_SPACE(yy)) goto l56;
  yyprintf((stderr, "  ok   %s @ %s\n", "TIMES", yy->__buf+yy->__pos));
  return 1;
  l56:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "TIMES", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_POW(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "POW"));
  {  int yypos58= yy->__pos, yythunkpos58= yy->__thunkpos;  if (!yymatchChar(yy, '^')) goto l59;  if (!yy_SPACE(yy)) goto l59;  goto l58;
  l59:;	  yy->__pos= yypos58; yy->__thunkpos= yythunkpos58;  if (!yymatchString(yy, "**")) goto l57;  if (!yy_SPACE(yy)) goto l57;
  }
  l58:;	
  yyprintf((stderr, "  ok   %s @ %s\n", "POW", yy->__buf+yy->__pos));
  return 1;
  l57:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "POW", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_Value(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Value"));
  {  int yypos61= yy->__pos, yythunkpos61= yy->__thunkpos;  if (!yy_F_NUMBER(yy)) goto l62;  if (!yy_SI_Unit(yy)) goto l62;  yyDo(yy, yy_1_Value, yy->__begin, yy->__end);  goto l61;
  l62:;	  yy->__pos= yypos61; yy->__thunkpos= yythunkpos61;  if (!yy_F_NUMBER(yy)) goto l63;  yyDo(yy, yy_2_Value, yy->__begin, yy->__end);  goto l61;
  l63:;	  yy->__pos= yypos61; yy->__thunkpos= yythunkpos61;  if (!yy_Constant(yy)) goto l64;  goto l61;
  l64:;	  yy->__pos= yypos61; yy->__thunkpos= yythunkpos61;  if (!yy_Funcall(yy)) goto l65;  goto l61;
  l65:;	  yy->__pos= yypos61; yy->__thunkpos= yythunkpos61;  if (!yy_OPEN(yy)) goto l60;  if (!yy_Sum(yy)) goto l60;  if (!yy_CLOSE(yy)) goto l60;
  }
  l61:;	
  yyprintf((stderr, "  ok   %s @ %s\n", "Value", yy->__buf+yy->__pos));
  return 1;
  l60:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Value", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_GREATER_THAN(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "GREATER_THAN"));  if (!yymatchChar(yy, '>')) goto l66;  if (!yy_SPACE(yy)) goto l66;
  yyprintf((stderr, "  ok   %s @ %s\n", "GREATER_THAN", yy->__buf+yy->__pos));
  return 1;
  l66:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "GREATER_THAN", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_GREATEREQ_THAN(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "GREATEREQ_THAN"));  if (!yymatchString(yy, ">=")) goto l67;  if (!yy_SPACE(yy)) goto l67;
  yyprintf((stderr, "  ok   %s @ %s\n", "GREATEREQ_THAN", yy->__buf+yy->__pos));
  return 1;
  l67:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "GREATEREQ_THAN", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_LESS_THAN(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "LESS_THAN"));  if (!yymatchChar(yy, '<')) goto l68;  if (!yy_SPACE(yy)) goto l68;
  yyprintf((stderr, "  ok   %s @ %s\n", "LESS_THAN", yy->__buf+yy->__pos));
  return 1;
  l68:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "LESS_THAN", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_LESSEQ_THAN(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "LESSEQ_THAN"));  if (!yymatchString(yy, "<=")) goto l69;  if (!yy_SPACE(yy)) goto l69;
  yyprintf((stderr, "  ok   %s @ %s\n", "LESSEQ_THAN", yy->__buf+yy->__pos));
  return 1;
  l69:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "LESSEQ_THAN", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_CLOSE_ENOUGH(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "CLOSE_ENOUGH"));  if (!yymatchString(yy, "==")) goto l70;  if (!yy_SPACE(yy)) goto l70;
  yyprintf((stderr, "  ok   %s @ %s\n", "CLOSE_ENOUGH", yy->__buf+yy->__pos));
  return 1;
  l70:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "CLOSE_ENOUGH", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_MINUS(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "MINUS"));  if (!yymatchChar(yy, '-')) goto l71;  if (!yy_SPACE(yy)) goto l71;
  yyprintf((stderr, "  ok   %s @ %s\n", "MINUS", yy->__buf+yy->__pos));
  return 1;
  l71:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "MINUS", 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 l72;  if (!yy_SPACE(yy)) goto l72;
  yyprintf((stderr, "  ok   %s @ %s\n", "PLUS", yy->__buf+yy->__pos));
  return 1;
  l72:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "PLUS", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_Product(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Product"));  if (!yy_Value(yy)) goto l73;
  l74:;	
  {  int yypos75= yy->__pos, yythunkpos75= yy->__thunkpos;
  {  int yypos76= yy->__pos, yythunkpos76= yy->__thunkpos;  if (!yy_POW(yy)) goto l77;  if (!yy_Value(yy)) goto l77;  yyDo(yy, yy_1_Product, yy->__begin, yy->__end);  goto l76;
  l77:;	  yy->__pos= yypos76; yy->__thunkpos= yythunkpos76;  if (!yy_TIMES(yy)) goto l78;  if (!yy_Value(yy)) goto l78;  yyDo(yy, yy_2_Product, yy->__begin, yy->__end);  goto l76;
  l78:;	  yy->__pos= yypos76; yy->__thunkpos= yythunkpos76;  if (!yy_DIVIDE(yy)) goto l79;  if (!yy_Value(yy)) goto l79;  yyDo(yy, yy_3_Product, yy->__begin, yy->__end);  goto l76;
  l79:;	  yy->__pos= yypos76; yy->__thunkpos= yythunkpos76;  if (!yy_MOD(yy)) goto l75;  if (!yy_Value(yy)) goto l75;  yyDo(yy, yy_4_Product, yy->__begin, yy->__end);
  }
  l76:;	  goto l74;
  l75:;	  yy->__pos= yypos75; yy->__thunkpos= yythunkpos75;
  }
  yyprintf((stderr, "  ok   %s @ %s\n", "Product", yy->__buf+yy->__pos));
  return 1;
  l73:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Product", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_Sum(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Sum"));  if (!yy_Product(yy)) goto l80;
  l81:;	
  {  int yypos82= yy->__pos, yythunkpos82= yy->__thunkpos;
  {  int yypos83= yy->__pos, yythunkpos83= yy->__thunkpos;  if (!yy_PLUS(yy)) goto l84;  if (!yy_Product(yy)) goto l84;  yyDo(yy, yy_1_Sum, yy->__begin, yy->__end);  goto l83;
  l84:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_MINUS(yy)) goto l85;  if (!yy_Product(yy)) goto l85;  yyDo(yy, yy_2_Sum, yy->__begin, yy->__end);  goto l83;
  l85:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_CLOSE_ENOUGH(yy)) goto l86;  if (!yy_Product(yy)) goto l86;  yyDo(yy, yy_3_Sum, yy->__begin, yy->__end);  goto l83;
  l86:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_LESSEQ_THAN(yy)) goto l87;  if (!yy_Product(yy)) goto l87;  yyDo(yy, yy_4_Sum, yy->__begin, yy->__end);  goto l83;
  l87:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_LESS_THAN(yy)) goto l88;  if (!yy_Product(yy)) goto l88;  yyDo(yy, yy_5_Sum, yy->__begin, yy->__end);  goto l83;
  l88:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_GREATEREQ_THAN(yy)) goto l89;  if (!yy_Product(yy)) goto l89;  yyDo(yy, yy_6_Sum, yy->__begin, yy->__end);  goto l83;
  l89:;	  yy->__pos= yypos83; yy->__thunkpos= yythunkpos83;  if (!yy_GREATER_THAN(yy)) goto l82;  if (!yy_Product(yy)) goto l82;  yyDo(yy, yy_7_Sum, yy->__begin, yy->__end);
  }
  l83:;	  goto l81;
  l82:;	  yy->__pos= yypos82; yy->__thunkpos= yythunkpos82;
  }
  yyprintf((stderr, "  ok   %s @ %s\n", "Sum", yy->__buf+yy->__pos));
  return 1;
  l80:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Sum", yy->__buf+yy->__pos));
  return 0;
}
YY_RULE(int) yy_SPACE(yycontext *yy)
{
  yyprintf((stderr, "%s\n", "SPACE"));
  l91:;	
  {  int yypos92= yy->__pos, yythunkpos92= yy->__thunkpos;  if (!yymatchClass(yy, (unsigned char *)"\000\002\000\000\001\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 l92;  goto l91;
  l92:;	  yy->__pos= yypos92; yy->__thunkpos= yythunkpos92;
  }
  yyprintf((stderr, "  ok   %s @ %s\n", "SPACE", yy->__buf+yy->__pos));
  return 1;
}
YY_RULE(int) yy_Expr(yycontext *yy)
{  int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
  yyprintf((stderr, "%s\n", "Expr"));
  {  int yypos94= yy->__pos, yythunkpos94= yy->__thunkpos;  if (!yy_SPACE(yy)) goto l95;  if (!yy_Sum(yy)) goto l95;  yyDo(yy, yy_1_Expr, yy->__begin, yy->__end);  goto l94;
  l95:;	  yy->__pos= yypos94; yy->__thunkpos= yythunkpos94;  if (!yymatchDot(yy)) goto l93;  yyDo(yy, yy_2_Expr, yy->__begin, yy->__end);
  }
  l94:;	
  yyprintf((stderr, "  ok   %s @ %s\n", "Expr", yy->__buf+yy->__pos));
  return 1;
  l93:;	  yy->__pos= yypos0; yy->__thunkpos= yythunkpos0;
  yyprintf((stderr, "  fail %s @ %s\n", "Expr", 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_Expr);
}

YY_PARSE(yycontext *) YYRELEASE(yycontext *yyctx)
{
  if (yyctx->__buflen)
    {
      yyctx->__buflen= 0;
      YY_FREE(yyctx, yyctx->__buf);
      YY_FREE(yyctx, yyctx->__text);
      YY_FREE(yyctx, yyctx->__thunks);
      YY_FREE(yyctx, yyctx->__vals);
    }
  return yyctx;
}

#endif
