
//----------------------------------------------------
// The following code was generated by CUP v0.10k
// Mon Nov 03 09:31:12 CET 2003
//----------------------------------------------------

package eworks.eRQL.parser;

import eworks.eRQL.model.*;

/** CUP v0.10k generated parser.
  * @version Mon Nov 03 09:31:12 CET 2003
  */
public class parser extends java_cup.runtime.lr_parser {

  /** Default constructor. */
  public parser() {super();}

  /** Constructor which sets the default scanner. */
  public parser(java_cup.runtime.Scanner s) {super(s);}

  /** Production table. */
  protected static final short _production_table[][] = 
    unpackFromStrings(new String[] {
    "\000\022\000\002\003\003\000\002\002\004\000\002\005" +
    "\003\000\002\005\005\000\002\004\003\000\002\004\005" +
    "\000\002\004\004\000\002\006\003\000\002\006\005\000" +
    "\002\006\004\000\002\006\005\000\002\006\005\000\002" +
    "\006\005\000\002\006\005\000\002\006\005\000\002\006" +
    "\005\000\002\007\003\000\002\007\003" });

  /** Access to production table. */
  public short[][] production_table() {return _production_table;}

  /** Parse-action table. */
  protected static final short[][] _action_table = 
    unpackFromStrings(new String[] {
    "\000\042\000\020\004\010\005\017\007\012\011\005\013" +
    "\016\017\007\020\014\001\002\000\036\002\uffff\004\010" +
    "\005\017\006\uffff\007\012\010\uffff\011\005\012\uffff\013" +
    "\016\014\uffff\015\uffff\016\027\017\007\020\014\001\002" +
    "\000\020\004\010\005\017\007\012\011\005\013\016\017" +
    "\007\020\014\001\002\000\006\002\001\015\023\001\002" +
    "\000\036\002\ufff1\004\ufff1\005\ufff1\006\ufff1\007\ufff1\010" +
    "\ufff1\011\ufff1\012\ufff1\013\ufff1\014\ufff1\015\ufff1\016\ufff1" +
    "\017\ufff1\020\ufff1\001\002\000\020\004\010\005\017\007" +
    "\012\011\005\013\016\017\007\020\014\001\002\000\036" +
    "\002\ufffd\004\ufffd\005\ufffd\006\ufffd\007\ufffd\010\ufffd\011" +
    "\ufffd\012\ufffd\013\ufffd\014\ufffd\015\ufffd\016\ufffd\017\ufffd" +
    "\020\ufffd\001\002\000\020\004\010\005\017\007\012\011" +
    "\005\013\016\017\007\020\014\001\002\000\004\002\033" +
    "\001\002\000\036\002\ufff0\004\ufff0\005\ufff0\006\ufff0\007" +
    "\ufff0\010\ufff0\011\ufff0\012\ufff0\013\ufff0\014\ufff0\015\ufff0" +
    "\016\ufff0\017\ufff0\020\ufff0\001\002\000\036\002\ufffa\004" +
    "\ufffa\005\ufffa\006\ufffa\007\ufffa\010\ufffa\011\ufffa\012\ufffa" +
    "\013\ufffa\014\ufffa\015\ufffa\016\ufffa\017\ufffa\020\ufffa\001" +
    "\002\000\020\004\010\005\017\007\012\011\005\013\016" +
    "\017\007\020\014\001\002\000\020\004\010\005\017\007" +
    "\012\011\005\013\016\017\007\020\014\001\002\000\006" +
    "\006\024\015\023\001\002\000\026\004\ufffa\005\ufffa\006" +
    "\022\007\ufffa\011\ufffa\013\ufffa\015\ufffa\016\ufffa\017\ufffa" +
    "\020\ufffa\001\002\000\036\002\ufff5\004\ufff5\005\ufff5\006" +
    "\ufff5\007\ufff5\010\ufff5\011\ufff5\012\ufff5\013\ufff5\014\ufff5" +
    "\015\ufff5\016\ufff5\017\ufff5\020\ufff5\001\002\000\020\004" +
    "\010\005\017\007\012\011\005\013\016\017\007\020\014" +
    "\001\002\000\036\002\ufff6\004\ufff6\005\ufff6\006\ufff6\007" +
    "\ufff6\010\ufff6\011\ufff6\012\ufff6\013\ufff6\014\ufff6\015\ufff6" +
    "\016\ufff6\017\ufff6\020\ufff6\001\002\000\036\002\ufffe\004" +
    "\010\005\017\006\ufffe\007\012\010\ufffe\011\005\012\ufffe" +
    "\013\016\014\ufffe\015\ufffe\016\027\017\007\020\014\001" +
    "\002\000\036\002\ufffb\004\ufffb\005\ufffb\006\ufffb\007\ufffb" +
    "\010\ufffb\011\ufffb\012\ufffb\013\ufffb\014\ufffb\015\ufffb\016" +
    "\ufffb\017\ufffb\020\ufffb\001\002\000\020\004\010\005\017" +
    "\007\012\011\005\013\016\017\007\020\014\001\002\000" +
    "\036\002\ufffc\004\ufffc\005\ufffc\006\ufffc\007\ufffc\010\ufffc" +
    "\011\ufffc\012\ufffc\013\ufffc\014\ufffc\015\ufffc\016\ufffc\017" +
    "\ufffc\020\ufffc\001\002\000\006\014\032\015\023\001\002" +
    "\000\036\002\ufff2\004\ufff2\005\ufff2\006\ufff2\007\ufff2\010" +
    "\ufff2\011\ufff2\012\ufff2\013\ufff2\014\ufff2\015\ufff2\016\ufff2" +
    "\017\ufff2\020\ufff2\001\002\000\004\002\000\001\002\000" +
    "\006\010\037\015\023\001\002\000\026\004\ufffa\005\ufffa" +
    "\007\ufffa\010\036\011\ufffa\013\ufffa\015\ufffa\016\ufffa\017" +
    "\ufffa\020\ufffa\001\002\000\036\002\ufff7\004\ufff7\005\ufff7" +
    "\006\ufff7\007\ufff7\010\ufff7\011\ufff7\012\ufff7\013\ufff7\014" +
    "\ufff7\015\ufff7\016\ufff7\017\ufff7\020\ufff7\001\002\000\036" +
    "\002\ufff9\004\ufff9\005\ufff9\006\ufff9\007\ufff9\010\ufff9\011" +
    "\ufff9\012\ufff9\013\ufff9\014\ufff9\015\ufff9\016\ufff9\017\ufff9" +
    "\020\ufff9\001\002\000\036\002\ufff8\004\ufff8\005\ufff8\006" +
    "\ufff8\007\ufff8\010\ufff8\011\ufff8\012\ufff8\013\ufff8\014\ufff8" +
    "\015\ufff8\016\ufff8\017\ufff8\020\ufff8\001\002\000\006\012" +
    "\044\015\023\001\002\000\026\004\ufffa\005\ufffa\007\ufffa" +
    "\011\ufffa\012\043\013\ufffa\015\ufffa\016\ufffa\017\ufffa\020" +
    "\ufffa\001\002\000\036\002\ufff3\004\ufff3\005\ufff3\006\ufff3" +
    "\007\ufff3\010\ufff3\011\ufff3\012\ufff3\013\ufff3\014\ufff3\015" +
    "\ufff3\016\ufff3\017\ufff3\020\ufff3\001\002\000\036\002\ufff4" +
    "\004\ufff4\005\ufff4\006\ufff4\007\ufff4\010\ufff4\011\ufff4\012" +
    "\ufff4\013\ufff4\014\ufff4\015\ufff4\016\ufff4\017\ufff4\020\ufff4" +
    "\001\002" });

  /** Access to parse-action table. */
  public short[][] action_table() {return _action_table;}

  /** <code>reduce_goto</code> table. */
  protected static final short[][] _reduce_table = 
    unpackFromStrings(new String[] {
    "\000\042\000\014\003\012\004\003\005\005\006\010\007" +
    "\014\001\001\000\006\006\025\007\014\001\001\000\012" +
    "\004\003\005\040\006\010\007\041\001\001\000\002\001" +
    "\001\000\002\001\001\000\012\004\003\005\037\006\010" +
    "\007\014\001\001\000\002\001\001\000\012\004\003\005" +
    "\033\006\010\007\034\001\001\000\002\001\001\000\002" +
    "\001\001\000\002\001\001\000\012\004\003\005\030\006" +
    "\010\007\014\001\001\000\012\004\003\005\017\006\010" +
    "\007\020\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\010\004\024\006\010\007\014\001\001" +
    "\000\002\001\001\000\006\006\025\007\014\001\001\000" +
    "\002\001\001\000\006\006\027\007\014\001\001\000\002" +
    "\001\001\000\002\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\002\001\001\000\002\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\002\001\001\000\002\001\001" });

  /** Access to <code>reduce_goto</code> table. */
  public short[][] reduce_table() {return _reduce_table;}

  /** Instance of action encapsulation class. */
  protected CUP$parser$actions action_obj;

  /** Action encapsulation object initializer. */
  protected void init_actions()
    {
      action_obj = new CUP$parser$actions(this);
    }

  /** Invoke a user supplied parse action. */
  public java_cup.runtime.Symbol do_action(
    int                        act_num,
    java_cup.runtime.lr_parser parser,
    java.util.Stack            stack,
    int                        top)
    throws java.lang.Exception
  {
    /* call code in generated class */
    return action_obj.CUP$parser$do_action(act_num, parser, stack, top);
  }

  /** Indicates start state. */
  public int start_state() {return 0;}
  /** Indicates start production. */
  public int start_production() {return 1;}

  /** <code>EOF</code> Symbol index. */
  public int EOF_sym() {return 0;}

  /** <code>error</code> Symbol index. */
  public int error_sym() {return 1;}

}

/** Cup generated class to encapsulate user supplied action code.*/
class CUP$parser$actions {
  private final parser parser;

  /** Constructor */
  CUP$parser$actions(parser parser) {
    this.parser = parser;
  }

  /** Method with the actual generated action code. */
  public final java_cup.runtime.Symbol CUP$parser$do_action(
    int                        CUP$parser$act_num,
    java_cup.runtime.lr_parser CUP$parser$parser,
    java.util.Stack            CUP$parser$stack,
    int                        CUP$parser$top)
    throws java.lang.Exception
    {
      /* Symbol object for return from actions */
      java_cup.runtime.Symbol CUP$parser$result;

      /* select the action based on the action number */
      switch (CUP$parser$act_num)
        {
          /*. . . . . . . . . . . . . . . . . . . .*/
          case 17: // literal ::= URI 
            {
              Object RESULT = null;
		int uleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int uright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object u = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new Literal((String) u); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 16: // literal ::= STRING 
            {
              Object RESULT = null;
		int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object s = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new Literal((String) s); 
              CUP$parser$result = new java_cup.runtime.Symbol(5/*literal*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 15: // subquery ::= LBRACKET disjunction RBRACKET 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new Query((Disjunction) d); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 14: // subquery ::= LSQUAREBRACKET literal RSQUAREBRACKET 
            {
              Object RESULT = null;
		int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object l = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new StatementQuery((Literal) l); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 13: // subquery ::= LSQUAREBRACKET disjunction RSQUAREBRACKET 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new StatementQuery((Disjunction) d); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 12: // subquery ::= LANGLEBRACKET literal RANGLEBRACKET 
            {
              Object RESULT = null;
		int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object l = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new DocumentQuery((Literal) l); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 11: // subquery ::= LANGLEBRACKET disjunction RANGLEBRACKET 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new DocumentQuery((Disjunction) d); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 10: // subquery ::= LCURLYBRACKET literal RCURLYBRACKET 
            {
              Object RESULT = null;
		int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object l = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new PoiQuery((Literal) l); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 9: // subquery ::= TILDE disjunction 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new PoiQuery((Disjunction) d); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 8: // subquery ::= LCURLYBRACKET disjunction RCURLYBRACKET 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		 RESULT=new PoiQuery((Disjunction) d); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 7: // subquery ::= literal 
            {
              Object RESULT = null;
		int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object l = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new PoiQuery((Literal) l); 
              CUP$parser$result = new java_cup.runtime.Symbol(4/*subquery*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 6: // conjunction ::= conjunction subquery 
            {
              Object RESULT = null;
		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object c = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object p = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 ((Conjunction) c).add((Query) p); RESULT=c; 
              CUP$parser$result = new java_cup.runtime.Symbol(2/*conjunction*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 5: // conjunction ::= conjunction ANDOPERATOR subquery 
            {
              Object RESULT = null;
		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object c = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object p = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 ((Conjunction) c).add((Query) p); RESULT=c; 
              CUP$parser$result = new java_cup.runtime.Symbol(2/*conjunction*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 4: // conjunction ::= subquery 
            {
              Object RESULT = null;
		int pleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int pright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object p = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new Conjunction((Query) p); 
              CUP$parser$result = new java_cup.runtime.Symbol(2/*conjunction*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 3: // disjunction ::= disjunction OROPERATOR conjunction 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object c = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 ((Disjunction) d).add((Conjunction) c); RESULT=d; 
              CUP$parser$result = new java_cup.runtime.Symbol(3/*disjunction*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 2: // disjunction ::= conjunction 
            {
              Object RESULT = null;
		int cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int cright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object c = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=new Disjunction((Conjunction) c); 
              CUP$parser$result = new java_cup.runtime.Symbol(3/*disjunction*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
          case 1: // $START ::= query EOF 
            {
              Object RESULT = null;
		int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
		int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
		Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
		RESULT = start_val;
              CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_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: // query ::= disjunction 
            {
              Object RESULT = null;
		int dleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
		int dright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
		Object d = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
		 RESULT=d; 
              CUP$parser$result = new java_cup.runtime.Symbol(1/*query*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
            }
          return CUP$parser$result;

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

        }
    }
}

