Esempio n. 1
0
 public UnionExpr(Expr e1)
 {
     e = e1;
     next = null;
     current = this;
     ih = null;
     state = 0;
 }
Esempio n. 2
0
 public UnionExpr(Expr e1)
 {
     e       = e1;
     next    = null;
     current = this;
     ih      = null;
     state   = 0;
 }
Esempio n. 3
0
        public override void clearCache()
        {
            UnionExpr tmp = this;

            while (tmp != null)
            {
                tmp.e.clearCache();
                tmp = tmp.next;
            }
        }
Esempio n. 4
0
        public override void markCacheable()
        {
            UnionExpr tmp = this;

            while (tmp != null)
            {
                tmp.e.markCacheable();
                tmp = tmp.next;
            }
        }
Esempio n. 5
0
        public override bool isFinal()
        {
            UnionExpr tmp = this;

            while (tmp != null)
            {
                if (tmp.e.isFinal() == false)
                {
                    return(false);
                }
                tmp = tmp.next;
            }
            return(true);
        }
Esempio n. 6
0
        /*
         * (non-Javadoc)
         *
         * @see com.ximpleware.xpath.Expr#requireContextSize()
         */
        public override bool requireContextSize()
        {
            // boolean b = false;
            UnionExpr tmp = this;

            while (tmp != null)
            {
                if (tmp.e.requireContextSize() == true)
                {
                    return(true);
                }
                tmp = tmp.next;
            }
            return(false);
        }
Esempio n. 7
0
        public override void markCacheable2()
        {
            UnionExpr tmp = this;

            while (tmp != null)
            {
                if (tmp.e.isFinal() && tmp.e.NodeSet)
                {
                    CachedExpr ce = new CachedExpr(tmp.e);
                    tmp.e = ce;
                }
                tmp.e.markCacheable2();
                tmp = tmp.next;
            }
        }
Esempio n. 8
0
        /*
         * (non-Javadoc)
         *
         * @see com.ximpleware.xpath.Expr#reset(com.ximpleware.VTDNav)
         */
        public override void  reset(VTDNav vn)
        {
            // travese el list and reset every expression
            e.reset(vn);
            current = this;
            UnionExpr tmp = this.next;

            while (tmp != null)
            {
                tmp.e.reset(vn);
                tmp = tmp.next;
            }
            if (ih != null)
            {
                ih.reset();
            }
            state = 0;
        }
Esempio n. 9
0
        public override int adjust(int n)
        {
            int i = e.adjust(n);

            if (ih != null && i == ih.e)
            {
            }
            else
            {
                ih = new intHash(i);
            }
            UnionExpr tmp = this.next;

            while (tmp != null)
            {
                tmp.e.adjust(n);
                tmp = tmp.next;
            }
            return(i);
        }
Esempio n. 10
0
 /*
 * (non-Javadoc)
 *
 * @see com.ximpleware.xpath.Expr#reset(com.ximpleware.VTDNav)
 */
 public override void reset(VTDNav vn)
 {
     // travese el list and reset every expression
     e.reset(vn);
     current = this;
     UnionExpr tmp = this.next;
     while (tmp != null)
     {
         tmp.e.reset(vn);
         tmp = tmp.next;
     }
     if (ih != null)
         ih.reset();
     state = 0;
 }
Esempio n. 11
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="vn"></param>
        /// <returns></returns>
        public override int evalNodeSet(VTDNav vn)
        {
            int a;
            /*if (this.next == null)
            {
                return e.evalNodeSet(vn);
            }
            else
            {*/
                while (true)
                {
                    switch (state)
                    {

                        case 0:
                            if (ih == null)
                                ih = new intHash();
                            if (current != null)
                            {
                                vn.push2();
                                while ((a = current.e.evalNodeSet(vn)) != -1)
                                {
                                    if (isUnique(a))
                                    {
                                        state = 1;
                                        return a;
                                    }
                                }
                                state = 2;
                                vn.pop2();
                                break;
                            }
                            else
                                state = 3;
                            break;

                        case 1:
                            while ((a = current.e.evalNodeSet(vn)) != -1)
                            {
                                if (isUnique(a))
                                {
                                    state = 1;
                                    return a;
                                }
                            }
                            state = 2;
                            vn.pop2();
                            break;

                        case 2:
                            current = current.next;
                            if (current != null)
                            {
                                vn.push2();
                                while ((a = current.e.evalNodeSet(vn)) != -1)
                                {
                                    if (isUnique(a))
                                    {
                                        state = 1;
                                        return a;
                                    }
                                }
                                vn.pop2();
                                break;
                            }
                            else
                                state = 3;
                            break;

                        case 3:
                            return -1;

                        default:
                            throw new XPathEvalException("Invalid state evaluating PathExpr");

                    }
                }
               // }

            /*
            * default: throw new XPathEvalException( "Invalid state evaluating
            * PathExpr");
            */
        }
Esempio n. 12
0
        /*
         * (non-Javadoc)
         *
         * @see com.ximpleware.xpath.Expr#evalNodeSet(com.ximpleware.VTDNav)
         */
        public override int evalNodeSet(VTDNav vn)
        {
            int a;

            if (this.next == null)
            {
                return(e.evalNodeSet(vn));
            }
            else
            {
                while (true)
                {
                    switch (state)
                    {
                    case 0:
                        if (ih == null)
                        {
                            ih = new intHash();
                        }
                        if (current != null)
                        {
                            vn.push2();
                            while ((a = current.e.evalNodeSet(vn)) != -1)
                            {
                                if (isUnique(a))
                                {
                                    state = 1;
                                    return(a);
                                }
                            }
                            state = 2;
                            vn.pop2();
                            break;
                        }
                        else
                        {
                            state = 3;
                        }
                        break;


                    case 1:
                        while ((a = current.e.evalNodeSet(vn)) != -1)
                        {
                            if (isUnique(a))
                            {
                                state = 1;
                                return(a);
                            }
                        }
                        state = 2;
                        vn.pop2();
                        break;


                    case 2:
                        current = current.next;
                        if (current != null)
                        {
                            vn.push2();
                            while ((a = current.e.evalNodeSet(vn)) != -1)
                            {
                                if (isUnique(a))
                                {
                                    state = 1;
                                    return(a);
                                }
                            }
                            vn.pop2();
                            break;
                        }
                        else
                        {
                            state = 3;
                        }
                        break;


                    case 3:
                        return(-1);


                    default:
                        throw new XPathEvalException("Invalid state evaluating PathExpr");
                    }
                }
            }

            /*
             * default: throw new XPathEvalException( "Invalid state evaluating
             * PathExpr");
             */
        }
Esempio n. 13
0
        /** Method with the actual generated action code. */
        public TUVienna.CS_CUP.Runtime.Symbol CUP_parser_do_action(
    int                        CUP_parser_act_num,
    TUVienna.CS_CUP.Runtime.lr_parser CUP_parser_parser,
    System.Collections.Stack            xstack1,
    int                        CUP_parser_top)
        {
            /* Symbol object for return from actions */
              mStack CUP_parser_stack =new mStack(xstack1);
              TUVienna.CS_CUP.Runtime.Symbol CUP_parser_result;

              /* select the action based on the action number */
              switch (CUP_parser_act_num)
            {
              /*. . . . . . . . . . . . . . . . . . . .*/
              case 65: // FunctionName ::= FNAME
            {
              FuncName RESULT = null;
            int fnleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int fnright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            FuncName fn = (FuncName)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = fn;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(2/*FunctionName*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 64: // VariableReference ::= DOLLAR NAME
            {
              Expr RESULT = null;
            int nleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int nright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            NameType n = (NameType)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;

               		  if (my_parser.symbolHash[n.qname]==null)
               		    throw new XPathParseException("variableExpression not declared ==> $"+n.qname);
               		    RESULT = new VariableExpr(n.qname, (Expr)my_parser.symbolHash[n.qname]);

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(13/*VariableReference*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 63: // Predicate ::= LB Expr RB
            {
              Predicate RESULT = null;
            int eleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int eright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Expr e = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
            RESULT = new Predicate();
            if (e.isFinal() && e.Numerical)
            {
                RESULT.d = e.evalNumber((VTDNav)null);
                Yylex scanner = (Yylex)my_parser.getScanner();
                if (RESULT.d < 1)
                    throw new XPathParseException("invalid index number for predicate",
                            scanner.getOffset());
                RESULT.type = Predicate.simple;
            }
            RESULT.expr = e;
            RESULT.requireContext = e.requireContextSize();

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(28/*Predicate*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 62: // AbbreviatedRelativeLocationPath ::= Step DSLASH RelativeLocationPath
            {
              Step RESULT = null;
            int sleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int sright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Step s = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new Step();
              RESULT.AxisType = AxisType.DESCENDANT_OR_SELF;
              my_parser.tempNt = new NodeTest();

              my_parser.tempNt.TestType = NodeTest.NODE;
              RESULT.NodeTest = my_parser.tempNt;
              s.NextStep=RESULT;
              RESULT.PrevStep=s;
              RESULT.NextStep=rlp;
              rlp.PrevStep=RESULT;
              RESULT = s;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(27/*AbbreviatedRelativeLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 61: // AbbreviatedAbsoluteLocationPath ::= DSLASH RelativeLocationPath
            {
              Step RESULT = null;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;

              RESULT = new Step();
              RESULT.AxisType=AxisType.DESCENDANT_OR_SELF;
              my_parser.tempNt = new NodeTest();
              my_parser.tempNt.TestType=NodeTest.NODE;
              RESULT.NodeTest=my_parser.tempNt;
              RESULT.NextStep=rlp;
              rlp.PrevStep=RESULT;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(26/*AbbreviatedAbsoluteLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 60: // AbbreviatedStep ::= DDOT
            {
              Step RESULT = null;
              RESULT = new Step();
            my_parser.tempNt = new NodeTest();
              		    my_parser.tempNt.TestType=NodeTest.NODE;
            RESULT.AxisType=AxisType.PARENT;
            RESULT.NodeTest=my_parser.tempNt;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(23/*AbbreviatedStep*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 59: // AbbreviatedStep ::= DOT
            {
              Step RESULT = null;
              RESULT = new Step();
            my_parser.tempNt = new NodeTest();
              		    my_parser.tempNt.TestType=NodeTest.NODE;
            RESULT.AxisType=AxisType.SELF;
            RESULT.NodeTest=my_parser.tempNt;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(23/*AbbreviatedStep*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 58: // AbbreviatedAxisSpecifier ::= AT
            {
              AxisType RESULT = null;
             RESULT = new AxisType(); RESULT.i = AxisType.ATTRIBUTE;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 57: // AbbreviatedAxisSpecifier ::=
            {
              AxisType RESULT = null;
             RESULT = new AxisType(); RESULT.i = AxisType.CHILD;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(20/*AbbreviatedAxisSpecifier*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 56: // AxisSpecifier ::= AbbreviatedAxisSpecifier
            {
              AxisType RESULT = null;
            int aasleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aasright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            AxisType aas = (AxisType)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = aas;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(19/*AxisSpecifier*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 55: // AxisSpecifier ::= AXISNAME
            {
              AxisType RESULT = null;
            int anleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int anright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            AxisType an = (AxisType)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = an;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(19/*AxisSpecifier*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 54: // PredicateList ::= Predicate PredicateList
            {
              Predicate RESULT = null;
            int pleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int pright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Predicate p = (Predicate)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
            int plleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int plright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Predicate pl = (Predicate)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              p.nextP = pl;
            RESULT = p;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(29/*PredicateList*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 53: // PredicateList ::=
            {
              Predicate RESULT = null;
             RESULT = null;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(29/*PredicateList*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 52: // nodetest ::= NTEST
            {
              NodeTest RESULT = null;
            int n2left = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int n2right = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Ntest n2 = (Ntest)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new NodeTest();
              		   if (n2.i!=3)
               	RESULT.TestType=n2.i;
               else {
               	if (n2.arg ==null)
               	   RESULT.TestType=n2.i; //PI0
               	else {
               		RESULT.TestType=4; //PI1
               		RESULT.NodeName=n2.arg;
               	}
               }

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(21/*nodetest*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 51: // nodetest ::= NAME
            {
              NodeTest RESULT = null;
            int nleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int nright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            NameType n = (NameType)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new NodeTest();
             	   RESULT.TestType=NodeTest.NAMETEST;
               RESULT.NodeName=n.qname;
               if (n.localname!=null){
               	 RESULT.setNodeNameNS(n.prefix,n.localname);
               	 if (my_parser.nsHash==null || my_parser.nsHash[n.prefix] ==null)

               	    throw new XPathParseException("No URL found for prefix:"+n.prefix);
               	 RESULT.URL = (String) my_parser.nsHash[n.prefix];
               }

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(21/*nodetest*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 50: // Step ::= AbbreviatedStep
            {
              Step RESULT = null;
            int absleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int absright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step abs = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = abs; /*System.out.println(" step 4");*/

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(22/*Step*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 49: // Step ::= AxisSpecifier nodetest PredicateList
            {
              Step RESULT = null;
            int as1left = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int as1right = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            AxisType as1 = (AxisType)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int ntleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int ntright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            NodeTest nt = (NodeTest)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
            int plleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int plright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Predicate pl = (Predicate)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new Step();
              	   RESULT.AxisType=as1.i;
              	   if ( (as1.i== AxisType.ATTRIBUTE
              	         || as1.i == AxisType.NAMESPACE) &&
              	        (nt.testType>1)){
              	          Yylex scanner = (Yylex)my_parser.getScanner();
              	          throw new XPathParseException(as1.getAxisString()+" axis can't operate on"+
              	                 " comment(), pi(), or text()",
              	         	scanner.getOffset());
              	         	}

              	   RESULT.NodeTest=nt;
               RESULT.Predicate=pl;
               //System.out.println(" Step 3 ");

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(22/*Step*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 48: // RelativeLocationPath ::= AbbreviatedRelativeLocationPath
            {
              Step RESULT = null;
            int arlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int arlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step arlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = arlp;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(24/*RelativeLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 47: // RelativeLocationPath ::= Step SLASH RelativeLocationPath
            {
              Step RESULT = null;
            int sleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int sright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Step s = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             //if (s == rlp) throw new XPathParseException("$1 = $3!!!!");
               s.NextStep= rlp;
               rlp.PrevStep = s;
               RESULT= s;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(24/*RelativeLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 46: // RelativeLocationPath ::= Step
            {
              Step RESULT = null;
            int sleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int sright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step s = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = s;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(24/*RelativeLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 45: // AbsoluteLocationPath ::= AbbreviatedAbsoluteLocationPath
            {
              Step RESULT = null;
            int aalpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aalpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step aalp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = aalp;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(25/*AbsoluteLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 44: // AbsoluteLocationPath ::= SLASH RelativeLocationPath
            {
              Step RESULT = null;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = rlp;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(25/*AbsoluteLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 43: // AbsoluteLocationPath ::= SLASH
            {
              Step RESULT = null;
              RESULT = null;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(25/*AbsoluteLocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 42: // LocationPath ::= AbsoluteLocationPath
            {
              LocationPathExpr RESULT = null;
            int alpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int alpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step alp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new LocationPathExpr();
               RESULT.PathType=LocationPathExpr.ABSOLUTE_PATH;
               //System.out.println(" absolute ");
               RESULT.Step=alp;
               RESULT.optimize();
               //startStep = currentStep=null;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(18/*LocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 41: // LocationPath ::= RelativeLocationPath
            {
              LocationPathExpr RESULT = null;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new LocationPathExpr();
               RESULT.Step=rlp;
               RESULT.optimize();
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(18/*LocationPath*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 40: // Argument ::= Expr
            {
              Expr RESULT = null;
            int eleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int eright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr e = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = e;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(17/*Argument*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 39: // ArgumentList ::= Argument COMMA ArgumentList
            {
              Alist RESULT = null;
            int aleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int aright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr a = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int alleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int alright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Alist al = (Alist)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new Alist();
               RESULT.e = a;
               RESULT.next = al;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(15/*ArgumentList*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 38: // ArgumentList ::= Argument
            {
              Alist RESULT = null;
            int aleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr a = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new Alist();
               RESULT.e = a;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(15/*ArgumentList*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 37: // ArgumentList ::=
            {
              Alist RESULT = null;
             RESULT = null;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(15/*ArgumentList*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 36: // FunctionCall ::= FunctionName LP ArgumentList RP
            {
              FuncExpr RESULT = null;
            int fnleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-3)).left;
            int fnright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-3)).right;
            FuncName fn = (FuncName)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-3)).value;
            int alleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int alright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Alist al = (Alist)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
             //RESULT = new FuncExpr(fn.i, al);
             FuncExpr tfe = new FuncExpr(fn.i, al);
             if (!tfe.checkArgumentCount())
             throw new XPathParseException(" argument input for function " + tfe.fname() + " incorrect");
             RESULT = tfe;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(1/*FunctionCall*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-3)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 35: // PrimaryExpr ::= FunctionCall
            {
              Expr RESULT = null;
            int fcleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int fcright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            FuncExpr fc = (FuncExpr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = fc;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(16/*PrimaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 34: // PrimaryExpr ::= NUMBER
            {
              Expr RESULT = null;
            int neleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int neright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Double ne = (Double)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new NumExpr(ne);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(16/*PrimaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 33: // PrimaryExpr ::= LITERAL
            {
              Expr RESULT = null;
            int leleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int leright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            String le = (String)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new LiteralExpr(le);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(16/*PrimaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 32: // PrimaryExpr ::= LP Expr RP
            {
              Expr RESULT = null;
            int eleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int eright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Expr e = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
             RESULT = e;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(16/*PrimaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 31: // PrimaryExpr ::= VariableReference
            {
              Expr RESULT = null;
            int veleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int veright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ve = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = ve;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(16/*PrimaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 30: // FilterExpr ::= FilterExpr Predicate
            {
              Expr RESULT = null;
            int feleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int feright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Expr fe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
            int pleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int pright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Predicate p = (Predicate)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new FilterExpr(fe, p);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(12/*FilterExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 29: // FilterExpr ::= PrimaryExpr
            {
              Expr RESULT = null;
            int peleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int peright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr pe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = pe;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(12/*FilterExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 28: // PathExpr ::= FilterExpr DSLASH RelativeLocationPath
            {
              Expr RESULT = null;
            int feleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int feright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr fe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
               my_parser.tempStep = new Step();

             my_parser.tempStep.AxisType=AxisType.DESCENDANT_OR_SELF;
             my_parser.tempNt = new NodeTest();
             my_parser.tempNt.TestType=NodeTest.NODE;

             my_parser.tempStep.NodeTest=my_parser.tempNt;

             my_parser.tempStep.NextStep=rlp;
             rlp.PrevStep=my_parser.tempStep;

             /*parser.tempStep2 = new Step();
             parser.tempNt = new NodeTest();
             parser.tempStep2.AxisType=AxisType.SELF;
             parser.tempNt.TestType=NodeTest.NODE;

             parser.tempStep2.NodeTest=parser.tempNt;

              		     parser.tempStep2.NextStep=parser.tempStep;
             parser.tempStep.PrevStep=parser.tempStep2;*/

             my_parser.tempLPExpr = new LocationPathExpr();
             my_parser.tempLPExpr.Step=my_parser.tempStep;
             RESULT = new PathExpr(fe, my_parser.tempLPExpr);

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(11/*PathExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 27: // PathExpr ::= FilterExpr SLASH RelativeLocationPath
            {
              Expr RESULT = null;
            int feleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int feright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr fe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int rlpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int rlpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Step rlp = (Step)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
               my_parser.tempLPExpr = new LocationPathExpr();
             my_parser.tempLPExpr.Step=rlp;
             RESULT = new PathExpr(fe, my_parser.tempLPExpr);

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(11/*PathExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 26: // PathExpr ::= FilterExpr
            {
              Expr RESULT = null;
            int feleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int feright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr fe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = fe;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(11/*PathExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 25: // PathExpr ::= LocationPath
            {
              Expr RESULT = null;
            int lpleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int lpright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            LocationPathExpr lp = (LocationPathExpr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
              RESULT = lp;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(11/*PathExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 24: // UnionExpr ::= PathExpr UNION UnionExpr
            {
              UnionExpr RESULT = null;
            int peleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int peright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr pe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int uneleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int uneright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            UnionExpr une = (UnionExpr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;

               		   RESULT = new UnionExpr(pe);
               		   RESULT.next = une;

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(14/*UnionExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 23: // UnionExpr ::= PathExpr
            {
              UnionExpr RESULT = null;
            int peleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int peright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr pe = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT =  new UnionExpr(pe);

              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(14/*UnionExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 22: // UnaryExpr ::= SUB UnaryExpr
            {
              Expr RESULT = null;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ue = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new UnaryExpr( BinaryExpr.SUB, ue);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(10/*UnaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 21: // UnaryExpr ::= UnionExpr
            {
              Expr RESULT = null;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            UnionExpr ue = (UnionExpr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
            if (ue.next == null)
            RESULT = ue.e;
            else
            RESULT = ue;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(10/*UnaryExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 20: // MultiplicativeExpr ::= MultiplicativeExpr MOD UnaryExpr
            {
              Expr RESULT = null;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ue = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(me, BinaryExpr.MOD, ue);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(9/*MultiplicativeExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 19: // MultiplicativeExpr ::= MultiplicativeExpr DIV UnaryExpr
            {
              Expr RESULT = null;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ue = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(me, BinaryExpr.DIV, ue);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(9/*MultiplicativeExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 18: // MultiplicativeExpr ::= MultiplicativeExpr MULT UnaryExpr
            {
              Expr RESULT = null;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ue = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(me, BinaryExpr.MULT, ue);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(9/*MultiplicativeExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 17: // MultiplicativeExpr ::= UnaryExpr
            {
              Expr RESULT = null;
            int ueleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int ueright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ue = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = ue;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(9/*MultiplicativeExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 16: // AdditiveExpr ::= AdditiveExpr SUB MultiplicativeExpr
            {
              Expr RESULT = null;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(ae, BinaryExpr.SUB, me);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(8/*AdditiveExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 15: // AdditiveExpr ::= AdditiveExpr ADD MultiplicativeExpr
            {
              Expr RESULT = null;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(ae, BinaryExpr.ADD, me);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(8/*AdditiveExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 14: // AdditiveExpr ::= MultiplicativeExpr
            {
              Expr RESULT = null;
            int meleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int meright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr me = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = me;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(8/*AdditiveExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 13: // RelationalExpr ::= RelationalExpr GE AdditiveExpr
            {
              Expr RESULT = null;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(re, BinaryExpr.GE, ae);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(7/*RelationalExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 12: // RelationalExpr ::= RelationalExpr LE AdditiveExpr
            {
              Expr RESULT = null;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(re, BinaryExpr.LE, ae);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(7/*RelationalExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 11: // RelationalExpr ::= RelationalExpr GT AdditiveExpr
            {
              Expr RESULT = null;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(re, BinaryExpr.GT, ae);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(7/*RelationalExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 10: // RelationalExpr ::= RelationalExpr LT AdditiveExpr
            {
              Expr RESULT = null;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(re, BinaryExpr.LT, ae);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(7/*RelationalExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 9: // RelationalExpr ::= AdditiveExpr
            {
              Expr RESULT = null;
            int aeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ae = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = ae;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(7/*RelationalExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 8: // EqualityExpr ::= EqualityExpr NE RelationalExpr
            {
              Expr RESULT = null;
            int eeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int eeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr ee = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(ee, BinaryExpr.NE, re);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(5/*EqualityExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 7: // EqualityExpr ::= EqualityExpr EQ RelationalExpr
            {
              Expr RESULT = null;
            int eeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int eeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr ee = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(ee, BinaryExpr.EQ, re);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(5/*EqualityExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 6: // EqualityExpr ::= RelationalExpr
            {
              Expr RESULT = null;
            int releft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int reright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr re = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = re;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(5/*EqualityExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 5: // AndExpr ::= AndExpr AND EqualityExpr
            {
              Expr RESULT = null;
            int aleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int aright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr a = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int eeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int eeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ee = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(a, BinaryExpr.AND, ee);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(6/*AndExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 4: // AndExpr ::= EqualityExpr
            {
              Expr RESULT = null;
            int eeleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int eeright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr ee = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = ee;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(6/*AndExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 3: // OrExpr ::= OrExpr OR AndExpr
            {
              Expr RESULT = null;
            int oleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left;
            int oright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).right;
            Expr o = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-2)).value;
            int aleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr a = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = new BinaryExpr(o,BinaryExpr.OR,a);
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(4/*OrExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-2)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 2: // OrExpr ::= AndExpr
            {
              Expr RESULT = null;
            int aleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int aright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr a = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = a;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(4/*OrExpr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 1: // $START ::= Expr EOF
            {
              object RESULT = null;
            int start_valleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left;
            int start_valright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).right;
            Expr start_val = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-1)).value;
            RESULT = start_val;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(0/*$START*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-1)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              /* ACCEPT */
              CUP_parser_parser.done_parsing();
              return CUP_parser_result;

              /*. . . . . . . . . . . . . . . . . . . .*/
              case 0: // Expr ::= OrExpr
            {
              Expr RESULT = null;
            int oleft = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left;
            int oright = ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right;
            Expr o = (Expr)((TUVienna.CS_CUP.Runtime.Symbol) CUP_parser_stack.elementAt(CUP_parser_top-0)).value;
             RESULT = o;
              CUP_parser_result = new TUVienna.CS_CUP.Runtime.Symbol(3/*Expr*/, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).left, ((TUVienna.CS_CUP.Runtime.Symbol)CUP_parser_stack.elementAt(CUP_parser_top-0)).right, RESULT);
            }
              return CUP_parser_result;

              /* . . . . . .*/
              default:
            throw new System.Exception(
               "Invalid action number found in internal parse table");

            }
        }