//---------------------------------------------------- // The following code was generated by CUP v0.11a beta 20060608 // Tue Oct 06 11:56:27 CEST 2009 //---------------------------------------------------- import java_cup.runtime.*; import java.io.*; /** CUP v0.11a beta 20060608 generated parser. * @version Tue Oct 06 11:56:27 CEST 2009 */ public class rlac extends java_cup.runtime.lr_parser { /** Default constructor. */ public rlac() {super();} /** Constructor which sets the default scanner. */ public rlac(java_cup.runtime.Scanner s) {super(s);} /** Constructor which sets the default scanner. */ public rlac(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);} /** Production table. */ protected static final short _production_table[][] = unpackFromStrings(new String[] { "\000\047\000\002\002\004\000\002\002\005\000\002\003" + "\005\000\002\005\003\000\002\005\005\000\002\004\002" + "\000\002\004\005\000\002\006\002\000\002\006\004\000" + "\002\007\005\000\002\010\002\000\002\010\004\000\002" + "\011\005\000\002\011\005\000\002\011\007\000\002\011" + "\006\000\002\012\003\000\002\012\004\000\002\012\003" + "\000\002\013\003\000\002\013\005\000\002\013\005\000" + "\002\014\003\000\002\014\005\000\002\015\005\000\002" + "\015\005\000\002\015\004\000\002\017\003\000\002\017" + "\005\000\002\017\005\000\002\020\003\000\002\020\004" + "\000\002\021\003\000\002\021\003\000\002\021\004\000" + "\002\021\004\000\002\016\003\000\002\016\003\000\002" + "\022\005" }); /** Access to production table. */ public short[][] production_table() {return _production_table;} /** Parse-action table. */ protected static final short[][] _action_table = unpackFromStrings(new String[] { "\000\104\000\004\004\004\001\002\000\004\031\102\001" + "\002\000\004\002\101\001\002\000\012\002\ufffc\006\010" + "\010\ufffc\030\ufffc\001\002\000\010\002\ufff7\010\ufff7\030" + "\ufff7\001\002\000\006\007\ufffa\030\ufffa\001\002\000\006" + "\007\012\030\014\001\002\000\010\002\ufffb\010\ufffb\030" + "\ufffb\001\002\000\006\007\ufff9\030\ufff9\001\002\000\004" + "\024\015\001\002\000\006\012\020\016\016\001\002\000" + "\006\012\020\016\016\001\002\000\016\007\uffee\013\uffee" + "\017\026\020\uffee\021\uffee\030\uffee\001\002\000\016\010" + "\042\012\020\015\032\016\016\030\037\031\031\001\002" + "\000\016\007\uffeb\013\uffeb\017\uffeb\020\uffeb\021\uffeb\030" + "\uffeb\001\002\000\012\007\ufff8\020\023\021\024\030\ufff8" + "\001\002\000\006\012\020\016\016\001\002\000\006\012" + "\020\016\016\001\002\000\016\007\uffec\013\uffec\017\026" + "\020\uffec\021\uffec\030\uffec\001\002\000\006\012\020\016" + "\016\001\002\000\016\007\uffea\013\uffea\017\uffea\020\uffea" + "\021\uffea\030\uffea\001\002\000\016\007\uffed\013\uffed\017" + "\026\020\uffed\021\uffed\030\uffed\001\002\000\020\010\uffdd" + "\011\uffdd\013\uffdd\022\uffdd\023\uffdd\030\uffdd\031\uffdd\001" + "\002\000\004\022\054\001\002\000\020\010\uffe1\011\uffe1" + "\013\uffe1\022\uffe1\023\053\030\uffe1\031\uffe1\001\002\000" + "\016\010\042\011\uffe6\013\uffe6\022\uffe6\030\037\031\031" + "\001\002\000\020\010\uffe0\011\uffe0\013\uffe0\022\uffe0\023" + "\052\030\uffe0\031\uffe0\001\002\000\010\013\051\020\023" + "\021\024\001\002\000\020\010\uffdc\011\uffdc\013\uffdc\022" + "\uffdc\023\uffdc\030\uffdc\031\uffdc\001\002\000\006\013\050" + "\022\045\001\002\000\016\010\uffe3\011\uffe3\013\uffe3\022" + "\uffe3\030\uffe3\031\uffe3\001\002\000\012\010\042\015\032" + "\030\037\031\031\001\002\000\006\011\044\022\045\001" + "\002\000\020\010\uffdb\011\uffdb\013\uffdb\022\uffdb\023\uffdb" + "\030\uffdb\031\uffdb\001\002\000\010\010\042\030\037\031" + "\031\001\002\000\016\010\042\011\uffe4\013\uffe4\022\uffe4" + "\030\037\031\031\001\002\000\016\010\uffe2\011\uffe2\013" + "\uffe2\022\uffe2\030\uffe2\031\uffe2\001\002\000\016\007\uffe9" + "\013\uffe9\017\uffe9\020\uffe9\021\uffe9\030\uffe9\001\002\000" + "\016\007\uffe8\013\uffe8\017\uffe8\020\uffe8\021\uffe8\030\uffe8" + "\001\002\000\016\010\uffde\011\uffde\013\uffde\022\uffde\030" + "\uffde\031\uffde\001\002\000\016\010\uffdf\011\uffdf\013\uffdf" + "\022\uffdf\030\uffdf\031\uffdf\001\002\000\010\010\042\030" + "\037\031\031\001\002\000\016\010\042\011\uffe5\013\uffe5" + "\022\uffe5\030\037\031\031\001\002\000\016\007\uffe7\013" + "\uffe7\017\uffe7\020\uffe7\021\uffe7\030\uffe7\001\002\000\010" + "\002\000\010\062\030\061\001\002\000\010\002\ufff6\010" + "\ufff6\030\ufff6\001\002\000\006\025\076\026\075\001\002" + "\000\010\011\064\015\066\031\063\001\002\000\006\011" + "\ufff1\031\ufff1\001\002\000\004\026\073\001\002\000\006" + "\011\070\031\067\001\002\000\006\011\uffef\031\uffef\001" + "\002\000\006\011\ufff0\031\ufff0\001\002\000\004\026\071" + "\001\002\000\004\030\072\001\002\000\010\002\ufff3\010" + "\ufff3\030\ufff3\001\002\000\004\030\074\001\002\000\010" + "\002\ufff2\010\ufff2\030\ufff2\001\002\000\004\030\100\001" + "\002\000\004\030\077\001\002\000\010\002\ufff5\010\ufff5" + "\030\ufff5\001\002\000\010\002\ufff4\010\ufff4\030\ufff4\001" + "\002\000\004\002\001\001\002\000\006\005\ufffe\014\ufffe" + "\001\002\000\006\005\105\014\104\001\002\000\004\031" + "\106\001\002\000\012\002\uffff\006\uffff\010\uffff\030\uffff" + "\001\002\000\006\005\ufffd\014\ufffd\001\002" }); /** Access to parse-action table. */ public short[][] action_table() {return _action_table;} /** reduce_goto table. */ protected static final short[][] _reduce_table = unpackFromStrings(new String[] { "\000\104\000\006\002\004\003\005\001\001\000\004\005" + "\102\001\001\000\002\001\001\000\004\004\006\001\001" + "\000\004\010\056\001\001\000\004\006\010\001\001\000" + "\004\007\012\001\001\000\002\001\001\000\002\001\001" + "\000\002\001\001\000\010\013\021\014\016\015\020\001" + "\001\000\004\015\055\001\001\000\002\001\001\000\022" + "\013\035\014\016\015\020\016\032\017\037\020\033\021" + "\040\022\034\001\001\000\002\001\001\000\002\001\001" + "\000\006\014\027\015\020\001\001\000\006\014\024\015" + "\020\001\001\000\002\001\001\000\004\015\026\001\001" + "\000\002\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\010\016\032\021\046" + "\022\034\001\001\000\002\001\001\000\002\001\001\000" + "\002\001\001\000\002\001\001\000\002\001\001\000\014" + "\016\032\017\042\020\033\021\040\022\034\001\001\000" + "\002\001\001\000\002\001\001\000\012\016\032\020\045" + "\021\040\022\034\001\001\000\010\016\032\021\046\022" + "\034\001\001\000\002\001\001\000\002\001\001\000\002" + "\001\001\000\002\001\001\000\002\001\001\000\012\016" + "\032\020\054\021\040\022\034\001\001\000\010\016\032" + "\021\046\022\034\001\001\000\002\001\001\000\004\011" + "\057\001\001\000\002\001\001\000\002\001\001\000\004" + "\012\064\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\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 reduce_goto table. */ public short[][] reduce_table() {return _reduce_table;} /** Instance of action encapsulation class. */ protected CUP$rlac$actions action_obj; /** Action encapsulation object initializer. */ protected void init_actions() { action_obj = new CUP$rlac$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$rlac$do_action(act_num, parser, stack, top); } /** Indicates start state. */ public int start_state() {return 0;} /** Indicates start production. */ public int start_production() {return 0;} /** EOF Symbol index. */ public int EOF_sym() {return 0;} /** error Symbol index. */ public int error_sym() {return 1;} public static void main(String argv[]) { for (int i = 0; i < argv.length; i++) { try { System.out.println("Parsing ["+argv[i]+"]"); Scanner s = new Scanner(new FileReader(argv[i])); rlac p = new rlac(s); p.parse(); System.out.println("No errors."); } catch (Exception e) { e.printStackTrace(System.out); System.exit(1); } } } public void report_error(String message, Object info) { StringBuffer m = new StringBuffer("Error "); if (info instanceof java_cup.runtime.Symbol) m.append( "("+info.toString()+")" ); m.append(" : "+message); System.err.println(m); } public void report_fatal_error(String message, Object info) { report_error(message, info); throw new RuntimeException("Fatal Syntax Error"); } } /** Cup generated class to encapsulate user supplied action code.*/ class CUP$rlac$actions { private final rlac parser; /** Constructor */ CUP$rlac$actions(rlac parser) { this.parser = parser; } /** Method with the actual generated action code. */ public final java_cup.runtime.Symbol CUP$rlac$do_action( int CUP$rlac$act_num, java_cup.runtime.lr_parser CUP$rlac$parser, java.util.Stack CUP$rlac$stack, int CUP$rlac$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$rlac$result; /* select the action based on the action number */ switch (CUP$rlac$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // paren_expression ::= LPAREN regular_expression RPAREN { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("paren_expression",16, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // symbol ::= IDENTIFIER { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("symbol",12, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // symbol ::= INPUTSYMBOL { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("symbol",12, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // closure_expression ::= paren_expression STAR { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("closure_expression",15, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // closure_expression ::= symbol STAR { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("closure_expression",15, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // closure_expression ::= paren_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("closure_expression",15, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // closure_expression ::= symbol { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("closure_expression",15, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // conc_expression ::= conc_expression closure_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("conc_expression",14, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // conc_expression ::= closure_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("conc_expression",14, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // regular_expression ::= regular_expression UNION conc_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_expression",13, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // regular_expression ::= EMPTY UNION conc_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_expression",13, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // regular_expression ::= conc_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_expression",13, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // unary_expression ::= NOT unary_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("unary_expression",11, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // unary_expression ::= LBRACK expression RBRACK { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("unary_expression",11, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // unary_expression ::= LBRACK regular_expression RBRACK { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("unary_expression",11, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // prod_expression ::= prod_expression PROD unary_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("prod_expression",10, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // prod_expression ::= unary_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("prod_expression",10, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // expression ::= expression MINUS prod_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("expression",9, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // expression ::= expression PLUS prod_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("expression",9, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // expression ::= prod_expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("expression",9, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // string ::= EMPTY { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("string",8, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // string ::= string INPUTSYMBOL { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("string",8, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // string ::= INPUTSYMBOL { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("string",8, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // evaluation ::= LPAREN RPAREN INQUESTION IDENTIFIER { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluation",7, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-3)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // evaluation ::= LPAREN string RPAREN INQUESTION IDENTIFIER { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluation",7, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-4)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // evaluation ::= IDENTIFIER INQUESTION IDENTIFIER { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluation",7, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // evaluation ::= IDENTIFIER EQUESTION IDENTIFIER { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluation",7, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // evaluations ::= evaluations evaluation { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluations",6, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // evaluations ::= { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("evaluations",6, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // regular_definition ::= IDENTIFIER EQ expression { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_definition",5, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // regular_definitions ::= regular_definitions regular_definition { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_definitions",4, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // regular_definitions ::= { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("regular_definitions",4, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // expression_declaration ::= LDEF regular_definitions RDEF { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("expression_declaration",2, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // expression_declaration ::= { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("expression_declaration",2, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // input_symbols ::= input_symbols COMMA INPUTSYMBOL { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("input_symbols",3, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // input_symbols ::= INPUTSYMBOL { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("input_symbols",3, ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // alphabet_declaration ::= LALPHA input_symbols RALPHA { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("alphabet_declaration",1, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // goal ::= alphabet_declaration expression_declaration evaluations { Object RESULT =null; CUP$rlac$result = parser.getSymbolFactory().newSymbol("goal",0, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-2)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } return CUP$rlac$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // $START ::= goal EOF { Object RESULT =null; int start_valleft = ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)).right; Object start_val = (Object)((java_cup.runtime.Symbol) CUP$rlac$stack.elementAt(CUP$rlac$top-1)).value; RESULT = start_val; CUP$rlac$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$rlac$stack.elementAt(CUP$rlac$top-1)), ((java_cup.runtime.Symbol)CUP$rlac$stack.peek()), RESULT); } /* ACCEPT */ CUP$rlac$parser.done_parsing(); return CUP$rlac$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } }