Example #1
0
  /**
   * Resumes scanning until the next regular expression is matched,
   * the end of input is encountered or an I/O-Error occurs.
   *
   * @return      the next token
   * @exception   System.IO.IOException  if any I/O-Error occurs
   */
  public TUVienna.CS_CUP.Runtime.Symbol next_token() {
    int zzInput = 0;
    int zzAction;

    // cached fields:
    int zzCurrentPosL;
    int zzMarkedPosL;
    int zzEndReadL = zzEndRead;
    char [] zzBufferL = zzBuffer;
    char [] zzCMapL = ZZ_CMAP;

    int [] zzTransL = ZZ_TRANS;
    int [] zzRowMapL = ZZ_ROWMAP;
    int [] zzAttrL = ZZ_ATTRIBUTE;

    while (true) {
      zzMarkedPosL = zzMarkedPos;

      yychar+= zzMarkedPosL-zzStartRead;

      zzAction = -1;

      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
  
      zzState = zzLexicalState;


        while (true) {
          goto zzForAction_skip;
        zzForAction: break;
        zzForAction_skip:
          if (!ZZ_SPURIOUS_WARNINGS_SUCK) goto zzForAction;
    
          if (zzCurrentPosL < zzEndReadL)
            zzInput = zzBufferL[zzCurrentPosL++];
          else if (zzAtEOF) {
            zzInput = YYEOF;
            goto zzForAction;
          }
          else {
            // store back cached positions
            zzCurrentPos  = zzCurrentPosL;
            zzMarkedPos   = zzMarkedPosL;
            bool eof = zzRefill();
            // get translated positions and possibly new buffer
            zzCurrentPosL  = zzCurrentPos;
            zzMarkedPosL   = zzMarkedPos;
            zzBufferL      = zzBuffer;
            zzEndReadL     = zzEndRead;
            if (eof) {
              zzInput = YYEOF;
            goto zzForAction;
            }
            else {
              zzInput = zzBufferL[zzCurrentPosL++];
            }
          }
          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
          if (zzNext == -1) goto zzForAction;
          zzState = zzNext;

          int zzAttributes = zzAttrL[zzState];
          if ( (zzAttributes & 1) == 1 ) {
            zzAction = zzState;
            zzMarkedPosL = zzCurrentPosL;
            if ( (zzAttributes & 8) == 8 ) goto zzForAction;
          }

        }

      // store back cached position
      zzMarkedPos = zzMarkedPosL;

      switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
        case 65: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 190 "scanner_cs.flex"
                      	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.LOCAL_NAME;
				fname = new FuncName();
				fname.i = FuncName.LOCAL_NAME;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 29: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 123 "scanner_cs.flex"
          if (isName == 0 ) {
		  isName = 1 ;
		 return sym(DIV);
	      } else {
		 isName = 0;
		 name = new NameType();
		 name.qname = "div";
		 return sym(NAME,name);
	      }
	
#line default
          }
          break;
        case 5: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 82 "scanner_cs.flex"
    isName = 1 ; return sym(SUB);
#line default
          }
          break;
        case 92: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 543 "scanner_cs.flex"
                                                    
						isName = 0;
						ntest = new Ntest();
						ntest.i = Ntest.PROCESSING_INSTRUCTION;
						ntest.arg = getArgument('\'', yytext());
						//System.out.println(" !!!!!!!!!!!argument ==>" +ntest.arg);
						return sym(NTEST,ntest);
					
#line default
          }
          break;
        case 74: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 269 "scanner_cs.flex"
                         	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.STRING_LENGTH;
				fname = new FuncName();
				fname.i = FuncName.STRING_LENGTH;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 57: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 237 "scanner_cs.flex"
                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.CONTAINS;
				fname = new FuncName();
				fname.i = FuncName.CONTAINS;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 47: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 462 "scanner_cs.flex"
                   	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.NUMBER;
				fname = new FuncName();
				fname.i = FuncName.NUMBER;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 27: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 503 "scanner_cs.flex"
           
				isName = 0;
				len = yytext().Length;
				literal = yytext().Substring(1, len-2);
				return sym(LITERAL,literal);
			
#line default
          }
          break;
        case 53: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 486 "scanner_cs.flex"
                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.CEILING;
				fname = new FuncName();
				fname.i = FuncName.CEILING;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 4: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 701 "scanner_cs.flex"
    	
			throw new XPathParseException("Invalid char in XPath Expression");
		
#line default
          }
          break;
        case 63: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 583 "scanner_cs.flex"
                  	isName = 1;
				at = new AxisType();
				at.i = AxisType.ATTRIBUTE;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 75: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 413 "scanner_cs.flex"
                          	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ENCODE_FOR_URI;
				fname = new FuncName();
				fname.i = FuncName.ENCODE_FOR_URI;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 62: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 397 "scanner_cs.flex"
                      	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.IRI_TO_URI;
				fname = new FuncName();
				fname.i = FuncName.IRI_TO_URI;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 23: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 95 "scanner_cs.flex"
      isName = 1 ; return sym(LE);
#line default
          }
          break;
        case 89: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 381 "scanner_cs.flex"
                                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX;
				fname = new FuncName();
				fname.i = FuncName.NAMESPACE_URI_FOR_PREFIX;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 58: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 570 "scanner_cs.flex"
                  	isName = 1;
				at = new AxisType();
				at.i = AxisType.ANCESTOR;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 88: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 561 "scanner_cs.flex"
                                        
						isName = 0;
						ntest = new Ntest();
						ntest.i = Ntest.PROCESSING_INSTRUCTION;
						ntest.arg = null;
						//Console.WriteLine(" !!!!!!!!!!!argument ");
						return sym(NTEST,ntest);
					
#line default
          }
          break;
        case 82: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 301 "scanner_cs.flex"
                              	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_EVEN;
				fname = new FuncName();
				fname.i = FuncName.ROUND_HALF_TO_EVEN;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 34: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 470 "scanner_cs.flex"
                	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.SUM;
				fname = new FuncName();
				fname.i = FuncName.SUM;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 50: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 589 "scanner_cs.flex"
               	isName = 1;
				at = new AxisType();
				at.i = AxisType.CHILD;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 55: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 176 "scanner_cs.flex"
                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.POSITION;
				fname = new FuncName();
				fname.i = FuncName.POSITION;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 10: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 88 "scanner_cs.flex"
     isName = 1 ; return sym(LP);
#line default
          }
          break;
        case 44: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 446 "scanner_cs.flex"
                  	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.FALSE;
				fname = new FuncName();
				fname.i = FuncName.FALSE;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 18: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 100 "scanner_cs.flex"
     if (isName ==0){
		isName = 1;
		//System.out.println("returned a MULT");
		return  sym(MULT);
	}
	 else {
		isName = 0;
		name = new NameType();
		name.qname = "*";
		return sym(NAME,name);
	 }	 
	
#line default
          }
          break;
        case 35: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 204 "scanner_cs.flex"
                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.NAME;
				fname = new FuncName();
				fname.i = FuncName.NAME;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 91: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 552 "scanner_cs.flex"
                                                       
						isName = 0;
						ntest = new Ntest();
						ntest.i = Ntest.PROCESSING_INSTRUCTION;
						ntest.arg = getArgument('"',yytext());
						Console.WriteLine(" !!!!!!!!!!!argument ==>" +ntest.arg);
						return sym(NTEST,ntest);
					
#line default
          }
          break;
        case 24: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 97 "scanner_cs.flex"
      isName = 1 ; return sym(NE);
#line default
          }
          break;
        case 83: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 637 "scanner_cs.flex"
                          	isName = 1;
				at = new AxisType();
				at.i = AxisType.PRECEDING_SIBLING;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 67: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 631 "scanner_cs.flex"
                  	isName = 1;
				at = new AxisType();
				at.i = AxisType.PRECEDING;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 22: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 94 "scanner_cs.flex"
      isName = 1 ; return sym(GE);
#line default
          }
          break;
        case 11: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 89 "scanner_cs.flex"
     isName = 0 ; return sym(RP);
#line default
          }
          break;
        case 19: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 113 "scanner_cs.flex"
     isName = 1 ; 
	 //System.out.println("SLASH returned ");
	 return sym(SLASH);
	
#line default
          }
          break;
        case 78: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 405 "scanner_cs.flex"
                           	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ESCAPE_HTML_URI;
				fname = new FuncName();
				fname.i = FuncName.ESCAPE_HTML_URI;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 32: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 293 "scanner_cs.flex"
               	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ABS;
				fname = new FuncName();
				fname.i = FuncName.ABS;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 13: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 91 "scanner_cs.flex"
     isName = 0 ; return sym(RB);
#line default
          }
          break;
        case 54: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 422 "scanner_cs.flex"
                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.BOOLEAN;
				fname = new FuncName();
				fname.i = FuncName.BOOLEAN;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 17: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 98 "scanner_cs.flex"
     isName = 1; return sym(DOLLAR);
#line default
          }
          break;
        case 14: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 92 "scanner_cs.flex"
     isName = 1 ; return sym(GT);
#line default
          }
          break;
        case 80: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 576 "scanner_cs.flex"
                         	isName = 1;
				at = new AxisType();
				at.i = AxisType.ANCESTOR_OR_SELF;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 69: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 607 "scanner_cs.flex"
                  	isName = 1;
				at = new AxisType();
				at.i = AxisType.FOLLOWING;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 61: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 349 "scanner_cs.flex"
                     	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ENDS_WITH;
				fname = new FuncName();
				fname.i = FuncName.ENDS_WITH;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 15: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 93 "scanner_cs.flex"
     isName = 1 ; return sym(LT);
#line default
          }
          break;
        case 8: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 85 "scanner_cs.flex"
     isName = 1 ; return sym(AT);
#line default
          }
          break;
        case 59: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 261 "scanner_cs.flex"
                     	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.SUBSTRING;
				fname = new FuncName();
				fname.i = FuncName.SUBSTRING;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 71: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 229 "scanner_cs.flex"
                       	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.STARTS_WITH;
				fname = new FuncName();
				fname.i = FuncName.STARTS_WITH;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 9: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 87 "scanner_cs.flex"
     isName = 1 ; return sym(COMMA);
#line default
          }
          break;
        case 39: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 534 "scanner_cs.flex"
                      
				isName = 0;
				ntest = new Ntest();
				ntest.i = Ntest.NODE;
				ntest.arg = null;
				return sym(NTEST,ntest);
			
#line default
          }
          break;
        case 37: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 170 "scanner_cs.flex"
                 	isName = 1; 
			 	yypushback(1);
				fname = new FuncName();
				fname.i = FuncName.LAST;
				return sym(FNAME,fname);				 
			
#line default
          }
          break;
        case 16: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 96 "scanner_cs.flex"
     isName = 1 ; return sym(EQ);
#line default
          }
          break;
        case 90: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 373 "scanner_cs.flex"
                                    	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.NAMESPACE_URI_FROM_QNAME;
				fname = new FuncName();
				fname.i = FuncName.NAMESPACE_URI_FROM_QNAME;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 86: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 365 "scanner_cs.flex"
                                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.LOCAL_NAME_FROM_QNAME;
				fname = new FuncName();
				fname.i = FuncName.LOCAL_NAME_FROM_QNAME;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 45: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 478 "scanner_cs.flex"
                  	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.FLOOR;
				fname = new FuncName();
				fname.i = FuncName.FLOOR;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 25: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 118 "scanner_cs.flex"
      isName = 1 ; 
	 //System.out.println("DSLASH returned "); 
	 return sym(DSLASH);
	
#line default
          }
          break;
        case 40: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 494 "scanner_cs.flex"
                  	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ROUND;
				fname = new FuncName();
				fname.i = FuncName.ROUND;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 28: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 650 "scanner_cs.flex"
                  	isName = 0;
				len = yytext().Length;
				name = new NameType();
                               if (!XMLChar.isNCNameStartChar(yytext()[0]))
					throw new XPathParseException("Invalid char in name token:  "+yytext()+ "@position 0");
				
				for(int i=1;i<len-2;i++){
					if (!XMLChar.isNCNameChar(yytext()[i]))
						throw new XPathParseException("Invalid char in name token:  "+yytext()+ "@position "+i);
				}

				name.prefix = yytext().Substring(0,len-2);
				name.localname = "*";
                name.qname = String.Copy(yytext());
				//System.out.println("NAME "+name+ " returned");
				return sym(NAME,name);
			
#line default
          }
          break;
        case 36: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 454 "scanner_cs.flex"
                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.LANG;
				fname = new FuncName();
				fname.i = FuncName.LANG;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 84: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 613 "scanner_cs.flex"
                           	isName = 1;
				at = new AxisType();
				at.i = AxisType.FOLLOWING_SIBLING;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 2: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 79 "scanner_cs.flex"
        /* eat white space */
#line default
          }
          break;
        case 43: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 183 "scanner_cs.flex"
                  	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.COUNT;
				fname = new FuncName();
				fname.i = FuncName.COUNT;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 33: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 430 "scanner_cs.flex"
                	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.NOT;
				fname = new FuncName();
				fname.i = FuncName.NOT;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 72: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 197 "scanner_cs.flex"
                         	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.NAMESPACE_URI;
				fname = new FuncName();
				fname.i = FuncName.NAMESPACE_URI;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 68: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 333 "scanner_cs.flex"
                      	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.UPPER_CASE;
				fname = new FuncName();
				fname.i = FuncName.UPPER_CASE;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 49: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 221 "scanner_cs.flex"
                   	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.CONCAT;
				fname = new FuncName();
				fname.i = FuncName.CONCAT;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 26: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 157 "scanner_cs.flex"
         if (isName == 0) {	
		 isName = 1 ;
		 return sym(OR);
	      } else {
		 isName = 0;
		 name = new NameType();
		 name.qname = "or";
		 return sym(NAME,name);
	      }
	
#line default
          }
          break;
        case 76: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 277 "scanner_cs.flex"
                           	isName =1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.NORMALIZE_SPACE;
				fname = new FuncName();
				fname.i = FuncName.NORMALIZE_SPACE;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 30: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 134 "scanner_cs.flex"
          if (isName == 0) {
		  isName = 1 ;
		 return sym(MOD);
	      } else {
		 isName = 0;
		 name = new NameType();
		 name.qname = "mod";
		 //System.out.println("returned a NAME "+yytext());
		 return sym(NAME,name);
	      }
	
#line default
          }
          break;
        case 51: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 625 "scanner_cs.flex"
                	isName = 1;
				at = new AxisType();
				at.i = AxisType.PARENT;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 73: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 389 "scanner_cs.flex"
                         	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.RESOLVE_QNAME;
				fname = new FuncName();
				fname.i = FuncName.RESOLVE_QNAME;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 52: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 325 "scanner_cs.flex"
                   	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.COMPARE;
				fname = new FuncName();
				fname.i = FuncName.COMPARE;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 1: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 668 "scanner_cs.flex"
             	
				
				isName = 0;
				name = new NameType();
				//name.qname = new String(yytext());
				//System.out.println("returned a NAME ==>" + yytext());
				//if (yytext().charAt(0) =='-'){
				//    throw new XPathParseException("Invalid char in name token:"+yytext());
				//}
				
				name.qname = String.Copy(yytext());
				if (!XMLChar.isNCNameStartChar(name.qname[0]))
					throw new XPathParseException("Invalid char in name token:  "+yytext()+ "@position 0");
				
				for(int i=1;i<name.qname.Length;i++){
					if (!XMLChar.isNCNameChar(name.qname[i]) 
						&& name.qname[i]!=':' )
						throw new XPathParseException("Invalid char in name token:  "+yytext()+ "@position "+i);
					if (name.qname[i]==':'){
						colonPosition = i;
					}
				}
		
				if (colonPosition != -1){
					name.prefix = yytext().Substring(0,colonPosition);
					name.localname = yytext().Substring(colonPosition+1);				
				}
				
				colonPosition = -1;
				return sym(NAME,name);
			
#line default
          }
          break;
        case 21: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 84 "scanner_cs.flex"
       isName = 0 ; return sym(DDOT);
#line default
          }
          break;
        case 60: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 285 "scanner_cs.flex"
                     	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.TRANSLATE;
				fname = new FuncName();
				fname.i = FuncName.TRANSLATE;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 70: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 595 "scanner_cs.flex"
                   	isName = 1;
				at = new AxisType();
				at.i = AxisType.DESCENDANT;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 38: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 438 "scanner_cs.flex"
                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.TRUE;
				fname = new FuncName();
				fname.i = FuncName.TRUE;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 31: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 146 "scanner_cs.flex"
          if (isName == 0) {
		isName = 1 ;
		 return sym(AND);
	      } else {
		 isName = 0;
		 name = new NameType();
		 name.qname = "add";
		 return sym(NAME,name);
	      }
	
#line default
          }
          break;
        case 7: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 81 "scanner_cs.flex"
      isName = 1 ; return sym(ADD);
#line default
          }
          break;
        case 81: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 309 "scanner_cs.flex"
                             	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.ROUND_HALF_TO_ODD;
				fname = new FuncName();
				fname.i = FuncName.ROUND_HALF_TO_ODD;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 77: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 253 "scanner_cs.flex"
                           	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.SUBSTRING_AFTER;
				fname = new FuncName();
				fname.i = FuncName.SUBSTRING_AFTER;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 41: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 643 "scanner_cs.flex"
              	isName = 1;
				at = new AxisType();
				at.i = AxisType.SELF;
				//System.out.println("SELF:: returned");
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 6: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 83 "scanner_cs.flex"
     isName = 0 ; /*System.out.println(". returned ");*/ return sym(DOT);
#line default
          }
          break;
        case 48: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 212 "scanner_cs.flex"
                   	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i =  FuncName.STRING;
				fname = new FuncName();
				fname.i = FuncName.STRING;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 87: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 317 "scanner_cs.flex"
                                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.CODE_POINTS_TO_STRING;
				fname = new FuncName();
				fname.i = FuncName.CODE_POINTS_TO_STRING;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 66: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 341 "scanner_cs.flex"
                      	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.LOWER_CASE;
				fname = new FuncName();
				fname.i = FuncName.LOWER_CASE;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 46: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 357 "scanner_cs.flex"
                 	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.QNAME;
				fname = new FuncName();
				fname.i = FuncName.QNAME;
				return sym(FNAME,fname);
			
#line default
          }
          break;
        case 56: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 526 "scanner_cs.flex"
                         
				isName = 0;
				ntest = new Ntest();
				ntest.i = Ntest.COMMENT;
				ntest.arg =  null;
				return sym(NTEST,ntest);
			
#line default
          }
          break;
        case 20: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 168 "scanner_cs.flex"
     isName = 1 ; return sym(UNION) ; 
#line default
          }
          break;
        case 79: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 245 "scanner_cs.flex"
                             	isName = 1; 
			 	yypushback(1);
				//yyparser.yylval.fname.i = FuncName.SUBSTRING_BEFORE;
				fname = new FuncName();
				fname.i = FuncName.SUBSTRING_BEFORE;
				return sym(FNAME,fname);	
			
#line default
          }
          break;
        case 42: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 518 "scanner_cs.flex"
                      	
				isName = 0;
				ntest = new Ntest();
				ntest.i = Ntest.TEXT;
				ntest.arg = null;
				return sym(NTEST,ntest);
			
#line default
          }
          break;
        case 64: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 619 "scanner_cs.flex"
                  	isName =1;
				at = new AxisType();
				at.i = AxisType.NAMESPACE;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 3: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 511 "scanner_cs.flex"
              
				isName = 0;
				number = double.Parse(yytext());
				//System.out.println("number returned ==> "+ Double.parseDouble(yytext()));
				return sym(NUMBER,number);
			
#line default
          }
          break;
        case 85: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 601 "scanner_cs.flex"
                           	isName = 1;
				at = new AxisType();
				at.i = AxisType.DESCENDANT_OR_SELF;
				return sym(AXISNAME,at);
			
#line default
          }
          break;
        case 12: 
          if (ZZ_SPURIOUS_WARNINGS_SUCK)
          {
#line 90 "scanner_cs.flex"
     isName = 1 ; /*System.out.println( "[ returned");*/ return sym(LB);
#line default
          }
          break;
        default: 
          if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
            zzAtEOF = true;
            zzDoEOF();
              if (ZZ_SPURIOUS_WARNINGS_SUCK)
              { return new Symbol(com.ximpleware.xpath.sym.EOF); }
              break;
          } 
          else {
            zzScanError(ZZ_NO_MATCH);
          }
          break;
      }
    }
  }
Example #2
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");

            }
        }