public Object yyparse (yyInput yyLex)
public Object yyparse (yyInput yyLex, Object yydebug)
  public Object yyparse (yyInput yyLex)				throws java.io.IOException, yyException {    if (yyMax <= 0) yyMax = 256;			// initial size    int yyState = 0, yyStates[] = new int[yyMax];	// state stack    Object yyVal = null, yyVals[] = new Object[yyMax];	// value stack    int yyToken = -1;					// current input    int yyErrorFlag = 0;				// #tks to shift    yyLoop: for (int yyTop = 0;; ++ yyTop) {      if (yyTop >= yyStates.length) {			// dynamically increase        int[] i = new int[yyStates.length+yyMax];        System.arraycopy(yyStates, 0, i, 0, yyStates.length);        yyStates = i;        Object[] o = new Object[yyVals.length+yyMax];        System.arraycopy(yyVals, 0, o, 0, yyVals.length);        yyVals = o;      }      yyStates[yyTop] = yyState;      yyVals[yyTop] = yyVal;//t      if (yydebug != null) yydebug.push(yyState, yyVal);      yyDiscarded: for (;;) {	// discarding a token does not change stack        int yyN;        if ((yyN = YyDefRedClass.yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)          if (yyToken < 0) {            yyToken = yyLex.advance() ? yyLex.token() : 0;//t            if (yydebug != null)//t              yydebug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());          }          if ((yyN = YySindexClass.yySindex[yyState]) != 0 && (yyN += yyToken) >= 0              && yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken) {//t            if (yydebug != null)//t              yydebug.shift(yyState, YyTableClass.yyTable[yyN], yyErrorFlag-1);            yyState = YyTableClass.yyTable[yyN];		// shift to yyN            yyVal = yyLex.value();            yyToken = -1;            if (yyErrorFlag > 0) -- yyErrorFlag;            continue yyLoop;          }          if ((yyN = YyRindexClass.yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0              && yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyToken)            yyN = YyTableClass.yyTable[yyN];			// reduce (yyN)          else            switch (yyErrorFlag) {              case 0:              yyerror("syntax error", yyExpecting(yyState));//t              if (yydebug != null) yydebug.error("syntax error");              case 1: case 2:              yyErrorFlag = 3;              do {                if ((yyN = YySindexClass.yySindex[yyStates[yyTop]]) != 0                    && (yyN += yyErrorCode) >= 0 && yyN < YyTableClass.yyTable.length                    && YyCheckClass.yyCheck[yyN] == yyErrorCode) {//t                  if (yydebug != null)//t                    yydebug.shift(yyStates[yyTop], YyTableClass.yyTable[yyN], 3);                  yyState = YyTableClass.yyTable[yyN];                  yyVal = yyLex.value();                  continue yyLoop;                }//t                if (yydebug != null) yydebug.pop(yyStates[yyTop]);              } while (-- yyTop >= 0);//t              if (yydebug != null) yydebug.reject();              throw new yyException("irrecoverable syntax error");              case 3:              if (yyToken == 0) {//t                if (yydebug != null) yydebug.reject();                throw new yyException("irrecoverable syntax error at end-of-file");              }//t              if (yydebug != null)//t                yydebug.discard(yyState, yyToken, yyname(yyToken),//t  							yyLex.value());              yyToken = -1;              continue yyDiscarded;		// leave stack alone            }        }        int yyV = yyTop + 1-YyLenClass.yyLen[yyN];//t        if (yydebug != null)//t          yydebug.reduce(yyState, yyStates[yyV-1], yyN, YyRuleClass.yyRule[yyN], YyLenClass.yyLen[yyN]);        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);        switch (yyN) {case 4:					// line 276 "XPathParser.y"  {      yyVal = new Root();    }  break;case 5:					// line 280 "XPathParser.y"  {      Steps steps;      if (yyVals[0+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[0+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[0+yyTop]);        }      steps.path.addFirst(new Root());      yyVal = steps;      /*$$ = new Step(new Root(), (Path) $2);*/    }  break;case 6:					// line 296 "XPathParser.y"  {      Test nt = new NodeTypeTest((short) 0);      Selector s = new Selector(Selector.DESCENDANT_OR_SELF,                                Collections.singletonList (nt));      Steps steps;      if (yyVals[0+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[0+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[0+yyTop]);        }      steps.path.addFirst(s);      steps.path.addFirst(new Root());      yyVal = steps;      /*Step step = new Step(s, (Path) $2);*/      /*$$ = new Step(new Root(), step);*/    }  break;case 8:					// line 321 "XPathParser.y"  {      Steps steps;      if (yyVals[-2+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[-2+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[-2+yyTop]);        }      steps.path.addLast(yyVals[0+yyTop]);      yyVal = steps;      /*$$ = new Step((Expr) $1, (Path) $3);*/    }  break;case 9:					// line 337 "XPathParser.y"  {      Test nt = new NodeTypeTest((short) 0);      Selector s = new Selector(Selector.DESCENDANT_OR_SELF,                                Collections.singletonList (nt));      Steps steps;      if (yyVals[-2+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[-2+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[-2+yyTop]);        }      steps.path.addLast(s);      steps.path.addLast(yyVals[0+yyTop]);      yyVal = steps;      /*Step step = new Step(s, (Path) $3);*/      /*$$ = new Step((Expr) $1, step);*/    }  break;case 10:					// line 361 "XPathParser.y"  {      yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);    }  break;case 11:					// line 365 "XPathParser.y"  {      yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);    }  break;case 12:					// line 369 "XPathParser.y"  {      yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);    }  break;case 13:					// line 373 "XPathParser.y"  {      yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);    }  break;case 14:					// line 377 "XPathParser.y"  {      yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);    }  break;case 15:					// line 384 "XPathParser.y"  {      List list = new ArrayList();      list.add(yyVals[0+yyTop]);      yyVal = list;    }  break;case 16:					// line 390 "XPathParser.y"  {      List list = (List)yyVals[-1+yyTop];      list.add(yyVals[0+yyTop]);      yyVal = list;    }  break;case 17:					// line 414 "XPathParser.y"  {      yyVal = new Integer(Selector.ANCESTOR);    }  break;case 18:					// line 418 "XPathParser.y"  {      yyVal = new Integer(Selector.ANCESTOR_OR_SELF);    }  break;case 19:					// line 422 "XPathParser.y"  {      yyVal = new Integer(Selector.ATTRIBUTE);    }  break;case 20:					// line 426 "XPathParser.y"  {      yyVal = new Integer(Selector.CHILD);    }  break;case 21:					// line 430 "XPathParser.y"  {      yyVal = new Integer(Selector.DESCENDANT);    }  break;case 22:					// line 434 "XPathParser.y"  {      yyVal = new Integer(Selector.DESCENDANT_OR_SELF);    }  break;case 23:					// line 438 "XPathParser.y"  {      yyVal = new Integer(Selector.FOLLOWING);    }  break;case 24:					// line 442 "XPathParser.y"  {      yyVal = new Integer(Selector.FOLLOWING_SIBLING);    }  break;case 25:					// line 446 "XPathParser.y"  {      yyVal = new Integer(Selector.NAMESPACE);    }  break;case 26:					// line 450 "XPathParser.y"  {      yyVal = new Integer(Selector.PARENT);    }  break;case 27:					// line 454 "XPathParser.y"  {      yyVal = new Integer(Selector.PRECEDING);    }  break;case 28:					// line 458 "XPathParser.y"  {      yyVal = new Integer(Selector.PRECEDING_SIBLING);    }  break;case 29:					// line 462 "XPathParser.y"  {      yyVal = new Integer(Selector.SELF);    }  break;case 31:					// line 471 "XPathParser.y"  {      yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);    }  break;case 32:					// line 476 "XPathParser.y"  {      yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());    }  break;case 33:					// line 483 "XPathParser.y"  {      yyVal = new Predicate((Expr) yyVals[-1+yyTop]);    }  break;case 35:					// line 491 "XPathParser.y"  {      yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);    }  break;case 36:					// line 495 "XPathParser.y"  {      yyVal = new Constant(yyVals[0+yyTop]);    }  break;case 37:					// line 499 "XPathParser.y"  {      yyVal = new Constant(yyVals[0+yyTop]);    }  break;case 39:					// line 507 "XPathParser.y"  {      yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);    }  break;case 40:					// line 511 "XPathParser.y"  {      yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);    }  break;case 41:					// line 518 "XPathParser.y"  {      List list = new ArrayList();      list.add(yyVals[0+yyTop]);      yyVal = list;    }  break;case 42:					// line 524 "XPathParser.y"  {      List list = (List) yyVals[0+yyTop];      list.add(0, yyVals[-2+yyTop]);      yyVal = list;    }  break;case 44:					// line 534 "XPathParser.y"  {      yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);    }  break;case 47:					// line 543 "XPathParser.y"  {      Steps steps;      if (yyVals[0+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[0+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[0+yyTop]);        }      steps.path.addFirst(yyVals[-2+yyTop]);      yyVal = steps;      /*$$ = new Step ((Expr) $1, (Path) $3);*/    }  break;case 48:					// line 559 "XPathParser.y"  {      Test nt = new NodeTypeTest((short) 0);      Selector s = new Selector(Selector.DESCENDANT_OR_SELF,                                Collections.singletonList(nt));      Steps steps;      if (yyVals[0+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[0+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[0+yyTop]);        }      steps.path.addFirst(s);      steps.path.addFirst(yyVals[-2+yyTop]);      yyVal = steps;      /*Step step = new Step (s, (Path) $3);*/      /*$$ = new Step ((Expr) $1, step);*/    }  break;case 50:					// line 584 "XPathParser.y"  {      Predicate filter = (Predicate) yyVals[0+yyTop];      Selector s = new Selector(Selector.SELF,                                Collections.singletonList(filter));      Steps steps;      if (yyVals[-1+yyTop] instanceof Steps)        {          steps = (Steps) yyVals[-1+yyTop];        }      else        {          steps = new Steps();          steps.path.addFirst(yyVals[-1+yyTop]);        }      steps.path.addLast(s);      yyVal = steps;      /*$$ = new Step ((Expr) $1, s);*/    }  break;case 52:					// line 607 "XPathParser.y"  {      yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);    }  break;case 54:					// line 615 "XPathParser.y"  {      yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);    }  break;case 56:					// line 623 "XPathParser.y"  {      yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);    }  break;case 57:					// line 627 "XPathParser.y"  {      yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);    }  break;case 59:					// line 635 "XPathParser.y"  {      yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);    }  break;case 60:					// line 639 "XPathParser.y"  {      yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);    }  break;case 61:					// line 643 "XPathParser.y"  {      yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);    }  break;case 62:					// line 647 "XPathParser.y"  {      yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);    }  break;case 64:					// line 655 "XPathParser.y"  {      yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);    }  break;case 65:					// line 659 "XPathParser.y"  {      yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);    }  break;case 67:					// line 667 "XPathParser.y"  {      yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);    }  break;case 68:					// line 671 "XPathParser.y"  {      yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);    }  break;case 69:					// line 675 "XPathParser.y"  {      yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);    }  break;case 71:					// line 683 "XPathParser.y"  {      yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);    }  break;case 72:					// line 690 "XPathParser.y"  {      yyVal = new Double((String) yyVals[0+yyTop] + ".0");    }  break;case 73:					// line 694 "XPathParser.y"  {      yyVal = new Double((String) yyVals[-1+yyTop] + ".0");    }  break;case 74:					// line 698 "XPathParser.y"  {      yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);    }  break;case 75:					// line 702 "XPathParser.y"  {      yyVal = new Double("0." + (String) yyVals[0+yyTop]);    }  break;case 77:					// line 731 "XPathParser.y"  {      yyVal = new VariableReference(variableResolver, (String) yyVals[0+yyTop]);    }  break;case 78:					// line 738 "XPathParser.y"  {      yyVal = new NameTest(null, true, true);    }  break;case 79:					// line 742 "XPathParser.y"  {      QName qName = getQName((String) yyVals[-2+yyTop]);      yyVal = new NameTest(qName, true, false);    }  break;case 80:					// line 747 "XPathParser.y"  {      QName qName = getQName((String) yyVals[0+yyTop]);      yyVal = new NameTest(qName, false, false);    }  break;case 82:					// line 756 "XPathParser.y"  {      yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];    }  break;case 83:					// line 763 "XPathParser.y"  {      yyVal = new Short(Node.COMMENT_NODE);    }  break;case 84:					// line 767 "XPathParser.y"  {      yyVal = new Short(Node.TEXT_NODE);    }  break;case 85:					// line 771 "XPathParser.y"  {      yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);    }  break;case 86:					// line 775 "XPathParser.y"  {      yyVal = new Short((short) 0);    }  break;					// line 986 "-"        }        yyTop -= YyLenClass.yyLen[yyN];        yyState = yyStates[yyTop];        int yyM = YyLhsClass.yyLhs[yyN];        if (yyState == 0 && yyM == 0) {//t          if (yydebug != null) yydebug.shift(0, yyFinal);          yyState = yyFinal;          if (yyToken < 0) {            yyToken = yyLex.advance() ? yyLex.token() : 0;//t            if (yydebug != null)//t               yydebug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());          }          if (yyToken == 0) {//t            if (yydebug != null) yydebug.accept(yyVal);            return yyVal;          }          continue yyLoop;        }        if ((yyN = YyGindexClass.yyGindex[yyM]) != 0 && (yyN += yyState) >= 0            && yyN < YyTableClass.yyTable.length && YyCheckClass.yyCheck[yyN] == yyState)          yyState = YyTableClass.yyTable[yyN];        else          yyState = YyDgotoClass.yyDgoto[yyM];//t        if (yydebug != null) yydebug.shift(yyStates[yyTop], yyState);	 continue yyLoop;      }    }  }