
//----------------------------------------------------
// The following code was generated by CUP v0.11b beta 20140226
// Tue Jun 10 09:55:34 EDT 2014
//----------------------------------------------------

package polyglot.pth;

import java.io.*;
import java.util.*;

/** CUP v0.11b beta 20140226 generated parser.
  * @version Tue Jun 10 09:55:34 EDT 2014
  */
public class Grm
 extends java_cup.runtime.lr_parser {

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

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

  /** Constructor which sets the default scanner and a SymbolFactory. */
  public Grm(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\041\000\002\002\004\000\002\002\003\000\002\003" +
    "\002\000\002\003\003\000\002\004\003\000\002\004\004" +
    "\000\002\005\010\000\002\006\005\000\002\006\002\000" +
    "\002\007\003\000\002\007\002\000\002\010\002\000\002" +
    "\010\003\000\002\011\003\000\002\011\004\000\002\011" +
    "\005\000\002\012\005\000\002\013\003\000\002\013\005" +
    "\000\002\014\003\000\002\014\004\000\002\015\002\000" +
    "\002\015\003\000\002\020\003\000\002\020\005\000\002" +
    "\016\002\000\002\016\003\000\002\017\003\000\002\017" +
    "\005\000\002\021\005\000\002\021\004\000\002\021\007" +
    "\000\002\021\005" });

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

  /** Parse-action table. */
  protected static final short[][] _action_table = 
    unpackFromStrings(new String[] {
    "\000\056\000\006\002\uffff\004\004\001\002\000\010\005" +
    "\ufff9\010\013\012\ufff9\001\002\000\004\002\000\001\002" +
    "\000\006\002\ufffd\004\004\001\002\000\004\002\ufffe\001" +
    "\002\000\004\002\011\001\002\000\004\002\001\001\002" +
    "\000\004\002\ufffc\001\002\000\004\005\015\001\002\000" +
    "\006\005\015\012\ufff7\001\002\000\016\006\uffea\011\uffea" +
    "\012\uffea\013\uffea\014\uffea\016\uffea\001\002\000\006\012" +
    "\ufff8\016\035\001\002\000\004\012\020\001\002\000\006" +
    "\004\021\013\ufff6\001\002\000\016\004\uffee\005\uffee\006" +
    "\uffee\013\uffee\014\uffee\015\uffee\001\002\000\016\004\040" +
    "\005\ufff0\006\ufff0\013\ufff0\014\ufff0\015\ufff0\001\002\000" +
    "\014\005\015\006\uffec\013\uffec\014\uffec\015\033\001\002" +
    "\000\006\013\ufff4\014\030\001\002\000\004\013\027\001" +
    "\002\000\004\013\ufff5\001\002\000\006\002\ufffb\004\ufffb" +
    "\001\002\000\006\004\021\013\ufff3\001\002\000\004\013" +
    "\ufff2\001\002\000\010\006\044\013\uffe8\014\uffe8\001\002" +
    "\000\004\004\021\001\002\000\012\006\uffeb\013\uffeb\014" +
    "\uffeb\016\035\001\002\000\004\005\036\001\002\000\016" +
    "\006\uffe9\011\uffe9\012\uffe9\013\uffe9\014\uffe9\016\uffe9\001" +
    "\002\000\016\004\040\005\uffef\006\uffef\013\uffef\014\uffef" +
    "\015\uffef\001\002\000\016\004\uffed\005\uffed\006\uffed\013" +
    "\uffed\014\uffed\015\uffed\001\002\000\010\013\uffe6\014\uffe6" +
    "\015\uffe6\001\002\000\010\013\uffe7\014\uffe7\015\055\001" +
    "\002\000\006\013\ufff1\014\ufff1\001\002\000\010\004\046" +
    "\005\047\007\045\001\002\000\010\013\uffe3\014\uffe3\015" +
    "\uffe3\001\002\000\006\007\051\015\052\001\002\000\004" +
    "\007\050\001\002\000\010\013\uffe1\014\uffe1\015\uffe1\001" +
    "\002\000\010\013\uffe4\014\uffe4\015\uffe4\001\002\000\004" +
    "\005\053\001\002\000\004\007\054\001\002\000\010\013" +
    "\uffe2\014\uffe2\015\uffe2\001\002\000\004\006\044\001\002" +
    "\000\010\013\uffe5\014\uffe5\015\uffe5\001\002\000\006\011" +
    "\060\016\035\001\002\000\006\005\ufffa\012\ufffa\001\002" +
    "" });

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

  /** {@code reduce_goto} table. */
  protected static final short[][] _reduce_table = 
    unpackFromStrings(new String[] {
    "\000\056\000\012\002\007\003\004\004\006\005\005\001" +
    "\001\000\004\006\013\001\001\000\002\001\001\000\006" +
    "\004\011\005\005\001\001\000\002\001\001\000\002\001" +
    "\001\000\002\001\001\000\002\001\001\000\004\020\056" +
    "\001\001\000\006\007\016\020\015\001\001\000\002\001" +
    "\001\000\002\001\001\000\002\001\001\000\014\010\024" +
    "\011\025\012\023\013\022\014\021\001\001\000\002\001" +
    "\001\000\002\001\001\000\006\015\031\020\033\001\001" +
    "\000\002\001\001\000\002\001\001\000\002\001\001\000" +
    "\002\001\001\000\012\011\030\012\023\013\022\014\021" +
    "\001\001\000\002\001\001\000\010\016\042\017\041\021" +
    "\040\001\001\000\004\014\036\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" +
    "\004\021\055\001\001\000\002\001\001\000\002\001\001" +
    "\000\002\001\001" });

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

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

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

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

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

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

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


  /** Scan to get the next Symbol. */
  @Override
  public java_cup.runtime.Symbol scan()
    throws java.lang.Exception
    {

    return lexer.next_token();

    }


    Lexer_c lexer;
    public Grm(String filename) {
        this(new File(filename));
    }
    public Grm(File file) {
        this();
        try {
            lexer = new Lexer_c(new FileReader(file));
        }
        catch (Exception e) {
            System.out.println("open script file (" + file.getName() +") error: " + e);
            lexer = new Lexer_c(new InputStreamReader(System.in));
        }
    }

    public Grm(Lexer_c l) {
        this();
        lexer = l;
    }
    
    public static int findErrorKind(String s) {
      s = s.toLowerCase();
      for (int i = 0; i < 10; i++) {
          String t = polyglot.util.ErrorInfo.getErrorString(i);
          if (t.toLowerCase().startsWith(s))
            return i;
      }
      return -1;      
    }

}

/** Cup generated class to encapsulate user supplied action code.*/
class CUP$Grm$actions {



    private final Grm parser;

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

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

        /* select the action based on the action number */
        switch (CUP$Grm$act_num) {
        /*. . . . . . . . . . . . . . . . . . . .*/
        case 0: // $START ::= goal EOF 
            {
                Object RESULT = null;
                List<SourceFileTest> start_val = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<List<SourceFileTest>> value();
                RESULT = start_val;
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("$START",0, RESULT);
            }
            /* ACCEPT */
            CUP$Grm$parser.done_parsing();
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 1: // goal ::= compilertest_list_opt 
            {
                List<SourceFileTest> RESULT = null;
                List<SourceFileTest> a = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("goal",0, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 2: // compilertest_list_opt ::= 
            {
                List<SourceFileTest> RESULT = null;
                 RESULT = Collections.emptyList(); 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilertest_list_opt",1, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 3: // compilertest_list_opt ::= compilertest_list 
            {
                List<SourceFileTest> RESULT = null;
                List<SourceFileTest> a = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilertest_list_opt",1, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 4: // compilertest_list ::= compilertest 
            {
                List<SourceFileTest> RESULT = null;
                List<SourceFileTest> a = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 
               RESULT = a;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilertest_list",2, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 5: // compilertest_list ::= compilertest compilertest_list 
            {
                List<SourceFileTest> RESULT = null;
                List<SourceFileTest> a = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<List<SourceFileTest>> value();
                List<SourceFileTest> b = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 b.addAll(0, a); RESULT = b; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilertest_list",2, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 6: // compilertest ::= IDENT testpath_opt command_line_args_opt LBRACE filetest_list_opt RBRACE 
            {
                List<SourceFileTest> RESULT = null;
                String a = CUP$Grm$stack.elementAt(CUP$Grm$top-5).<String> value();
                String b = CUP$Grm$stack.elementAt(CUP$Grm$top-4).<String> value();
                String c = CUP$Grm$stack.elementAt(CUP$Grm$top-3).<String> value();
                List<SourceFileTest> d = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<List<SourceFileTest>> value();
                 String extClassName = a;
               
		        for (SourceFileTest sft : d) {
		            sft.setTestDir(b);
		            sft.setExtensionClassname(extClassName);
		            sft.setExtraCmdLineArgs(c);
		        }
               RESULT = d; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilertest",3, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 7: // testpath_opt ::= LBRACK sentence RBRACK 
            {
                String RESULT = null;
                String a = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<String> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("testpath_opt",4, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 8: // testpath_opt ::= 
            {
                String RESULT = null;
                 RESULT = null; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("testpath_opt",4, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 9: // command_line_args_opt ::= sentence 
            {
                String RESULT = null;
                String a = CUP$Grm$stack.peek().<String> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("command_line_args_opt",5, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 10: // command_line_args_opt ::= 
            {
                String RESULT = null;
                 RESULT = null; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("command_line_args_opt",5, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 11: // filetest_list_opt ::= 
            {
                List<SourceFileTest> RESULT = null;
                 RESULT = Collections.emptyList(); 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest_list_opt",6, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 12: // filetest_list_opt ::= filetest_list 
            {
                List<SourceFileTest> RESULT = null;
                List<SourceFileTest> a = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest_list_opt",6, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 13: // filetest_list ::= filetest 
            {
                List<SourceFileTest> RESULT = null;
                SourceFileTest a = CUP$Grm$stack.peek().<SourceFileTest> value();
                 List<SourceFileTest> list = new LinkedList<>();
               list.add(a);
               RESULT = list;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest_list",7, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 14: // filetest_list ::= filetest SEMICOLON 
            {
                List<SourceFileTest> RESULT = null;
                SourceFileTest a = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<SourceFileTest> value();
                 List<SourceFileTest> list = new LinkedList<>();
               list.add(a);
               RESULT = list;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest_list",7, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 15: // filetest_list ::= filetest SEMICOLON filetest_list 
            {
                List<SourceFileTest> RESULT = null;
                SourceFileTest a = CUP$Grm$stack.elementAt(CUP$Grm$top-2).<SourceFileTest> value();
                List<SourceFileTest> b = CUP$Grm$stack.peek().<List<SourceFileTest>> value();
                 b.add(0, a); RESULT = b; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest_list",7, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 16: // filetest ::= compilation_unit_list description_opt failure_set_opt 
            {
                SourceFileTest RESULT = null;
                List<List<String>> a = CUP$Grm$stack.elementAt(CUP$Grm$top-2).<List<List<String>>> value();
                String b = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<String> value();
                List<ExpectedFailure> d = CUP$Grm$stack.peek().<List<ExpectedFailure>> value();
                 SourceFileTest sft = new SourceFileTest(a);
               sft.setDescription(b);
               sft.setExpectedFailures(d);
               RESULT = sft; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filetest",8, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 17: // compilation_unit_list ::= filename_list 
            {
                List<List<String>> RESULT = null;
                List<String> a = CUP$Grm$stack.peek().<List<String>> value();
                 List<List<String>> list = new LinkedList<>();
			   list.add(a);
			   RESULT = list;
			
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilation_unit_list",9, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 18: // compilation_unit_list ::= compilation_unit_list COMMA filename_list 
            {
                List<List<String>> RESULT = null;
                List<List<String>> a = CUP$Grm$stack.elementAt(CUP$Grm$top-2).<List<List<String>>> value();
                List<String> b = CUP$Grm$stack.peek().<List<String>> value();
                 a.add(b); RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("compilation_unit_list",9, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 19: // filename_list ::= IDENT 
            {
                List<String> RESULT = null;
                String a = CUP$Grm$stack.peek().<String> value();
                 List<String> list = new LinkedList<>();
               list.add(a);
               RESULT = list;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filename_list",10, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 20: // filename_list ::= filename_list IDENT 
            {
                List<String> RESULT = null;
                List<String> a = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<List<String>> value();
                String b = CUP$Grm$stack.peek().<String> value();
                 a.add(b); RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("filename_list",10, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 21: // description_opt ::= 
            {
                String RESULT = null;
                 RESULT = null; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("description_opt",11, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 22: // description_opt ::= sentence 
            {
                String RESULT = null;
                String a = CUP$Grm$stack.peek().<String> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("description_opt",11, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 23: // sentence ::= STRING_LITERAL 
            {
                String RESULT = null;
                String a = CUP$Grm$stack.peek().<String> value();
                
			RESULT = a;
		
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("sentence",14, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 24: // sentence ::= sentence PLUS STRING_LITERAL 
            {
                String RESULT = null;
                String a = CUP$Grm$stack.elementAt(CUP$Grm$top-2).<String> value();
                String b = CUP$Grm$stack.peek().<String> value();
                
            RESULT = a + b; 
        
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("sentence",14, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 25: // failure_set_opt ::= 
            {
                List<ExpectedFailure> RESULT = null;
                 List<ExpectedFailure> l = new ArrayList<>();
               RESULT = l;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure_set_opt",12, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 26: // failure_set_opt ::= failure_set 
            {
                List<ExpectedFailure> RESULT = null;
                List<ExpectedFailure> a = CUP$Grm$stack.peek().<List<ExpectedFailure>> value();
                 RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure_set_opt",12, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 27: // failure_set ::= failure 
            {
                List<ExpectedFailure> RESULT = null;
                ExpectedFailure a = CUP$Grm$stack.peek().<ExpectedFailure> value();
                 List<ExpectedFailure> l = new ArrayList<>();
               l.add(a);
               RESULT = l;
            
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure_set",13, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 28: // failure_set ::= failure_set COMMA failure 
            {
                List<ExpectedFailure> RESULT = null;
                List<ExpectedFailure> a = CUP$Grm$stack.elementAt(CUP$Grm$top-2).<List<ExpectedFailure>> value();
                ExpectedFailure b = CUP$Grm$stack.peek().<ExpectedFailure> value();
                 a.add(b); RESULT = a; 
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure_set",13, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 29: // failure ::= LPAREN IDENT RPAREN 
            {
                ExpectedFailure RESULT = null;
                String a = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<String> value();
                 
              RESULT = new ExpectedFailure(Grm.findErrorKind(a));
             
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure",15, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 30: // failure ::= LPAREN RPAREN 
            {
                ExpectedFailure RESULT = null;
                 
              RESULT = new AnyExpectedFailure();
             
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure",15, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 31: // failure ::= LPAREN IDENT COMMA STRING_LITERAL RPAREN 
            {
                ExpectedFailure RESULT = null;
                String a = CUP$Grm$stack.elementAt(CUP$Grm$top-3).<String> value();
                String b = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<String> value();
                 
              RESULT = new ExpectedFailure(Grm.findErrorKind(a), b);
             
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure",15, RESULT);
            }
            return CUP$Grm$result;

        /*. . . . . . . . . . . . . . . . . . . .*/
        case 32: // failure ::= LPAREN STRING_LITERAL RPAREN 
            {
                ExpectedFailure RESULT = null;
                String b = CUP$Grm$stack.elementAt(CUP$Grm$top-1).<String> value();
                 
              RESULT = new ExpectedFailure(b);
             
                CUP$Grm$result = parser.getSymbolFactory().newSymbol("failure",15, RESULT);
            }
            return CUP$Grm$result;

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

        }
    } /* end of method */

    /** Method splitting the generated action code into several parts. */
    public final java_cup.runtime.Symbol CUP$Grm$do_action(
            int                        CUP$Grm$act_num,
            java_cup.runtime.lr_parser CUP$Grm$parser,
            java.util.Stack<java_cup.runtime.Symbol> CUP$Grm$stack,
            int                        CUP$Grm$top)
            throws java.lang.Exception {
            return CUP$Grm$do_action_part00000000(
                           CUP$Grm$act_num,
                           CUP$Grm$parser,
                           CUP$Grm$stack,
                           CUP$Grm$top);
    }
}

