/* Generated By:JavaCC: Do not edit this line. TheParser.java */
package gen;

import java.io.FileInputStream;
import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.control.Fields;
import edu.neu.ccs.demeterf.lib.ident;
import edu.neu.ccs.demeterf.lib.verbatim;

  class TheParser implements TheParserConstants {

   public static String unescape(String str){
      String retval = "";
      int index = 0;
      char ch, ch1;
      int ordinal = 0;
      while (index < str.length()) {
         if(str.charAt(index) != '\\') { retval += str.charAt(index++); continue; }
         ch = str.charAt(++index);
         if(ch == 'b') { retval += '\b'; index++; continue; }
         if(ch == 't') { retval += '\t'; index++; continue; }
         if(ch == 'n') { retval += '\n'; index++; continue; }
         if(ch == 'f') { retval += '\f'; index++; continue; }
         if(ch == 'r') { retval += '\r'; index++; continue; }
         if(ch == '"') { retval += '\"'; index++; continue; }
         if(ch == '\'') { retval += '\''; index++; continue; }
         if(ch == '\\') { retval += '\\'; index++; continue; }
         if(ch >= '0' && ch <= '7'){
            ordinal = ((int)ch) - ((int)'0'); index++;
            ch1 = str.charAt(index);
            if(ch1 >= '0' && ch1 <= '7'){
               ordinal = ordinal*8 + ((int)ch1) - ((int)'0'); index++;
               ch1 = str.charAt(index);
               if(ch <= '3' && ch1 >= '0' && ch1 <= '7'){
                  ordinal = ordinal*8 + ((int)ch1) - ((int)'0'); index++;
               }
            }
            retval += (char)ordinal;
            continue;
         }
         if(ch == 'u'){
            ordinal = 0;
            for(int i = 0; i < 4; i++){
               index++; ch = str.charAt(index);
               ordinal = ordinal*16+hexval(ch);
            }
            index++;
            retval += (char)ordinal;
            continue;
         }
      }
      return retval;
   }
   static int hexval(char c){
      int r = "0123456789ABCDEF".indexOf(Character.toUpperCase(c));
      if(r >= 0)return r;
      throw new RuntimeException(" ** Bad Escaped Character");
   }

  final public byte parse_byte() throws ParseException {
                    int i;
    i = parse_int();
                      {if (true) return (byte)i;}
    throw new Error("Missing return statement in function");
  }

  final public Byte parse_Byte() throws ParseException {
                    byte b;
    b = parse_byte();
                       {if (true) return b;}
    throw new Error("Missing return statement in function");
  }

  final public short parse_short() throws ParseException {
                      int i;
    i = parse_int();
                      {if (true) return (short)i;}
    throw new Error("Missing return statement in function");
  }

  final public Short parse_Short() throws ParseException {
                      short s;
    s = parse_short();
                        {if (true) return s;}
    throw new Error("Missing return statement in function");
  }

  final public int parse_int() throws ParseException {
                  Token t;
    t = jj_consume_token(INT);
      if(t.image.length() > 1 && Character.toLowerCase(t.image.charAt(1)) == 'x')
          {if (true) return Integer.parseInt(t.image.substring(2), 16);}
      {if (true) return Integer.parseInt(t.image);}
    throw new Error("Missing return statement in function");
  }

  final public Integer parse_Integer() throws ParseException {
                          int i;
    i = parse_int();
                      {if (true) return i;}
    throw new Error("Missing return statement in function");
  }

  final public long parse_long() throws ParseException {
                    Token t;
    t = jj_consume_token(INT);
      if(t.image.length() > 1 && Character.toLowerCase(t.image.charAt(1)) == 'x')
          {if (true) return Long.parseLong(t.image.substring(2), 16);}
    {if (true) return Long.parseLong(t.image);}
    throw new Error("Missing return statement in function");
  }

  final public Long parse_Long() throws ParseException {
                    long l;
    l = parse_long();
                       {if (true) return l;}
    throw new Error("Missing return statement in function");
  }

  final public double parse_double() throws ParseException {
                        Token t;
    t = jj_consume_token(DOUBLE);
      {if (true) return Double.parseDouble(t.image);}
    throw new Error("Missing return statement in function");
  }

  final public Double parse_Double() throws ParseException {
                        double d;
    d = parse_double();
                         {if (true) return d;}
    throw new Error("Missing return statement in function");
  }

  final public float parse_float() throws ParseException {
                      Token t;
    t = jj_consume_token(DOUBLE);
      {if (true) return Float.parseFloat(t.image);}
    throw new Error("Missing return statement in function");
  }

  final public Float parse_Float() throws ParseException {
                      float f;
    f = parse_float();
                        {if (true) return f;}
    throw new Error("Missing return statement in function");
  }

  final public String parse_String() throws ParseException {
                        Token t;
    t = jj_consume_token(STRING);
      {if (true) return unescape(t.image.substring(1,t.image.length()-1));}
    throw new Error("Missing return statement in function");
  }

  final public boolean parse_boolean() throws ParseException {
                          Token t;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case TRUE:
      t = jj_consume_token(TRUE);
                 {if (true) return true;}
      break;
    case FALSE:
      t = jj_consume_token(FALSE);
                  {if (true) return false;}
      break;
    default:
      jj_la1[0] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    throw new Error("Missing return statement in function");
  }

  final public Boolean parse_Boolean() throws ParseException {
                          boolean b;
    b = parse_boolean();
                          {if (true) return b;}
    throw new Error("Missing return statement in function");
  }

  final public char parse_char() throws ParseException {
                    Token t;
    t = jj_consume_token(CHAR);
      {if (true) return unescape(t.image.substring(1,t.image.length()-1)).charAt(0);}
    throw new Error("Missing return statement in function");
  }

  final public Character parse_Character() throws ParseException {
                              char c;
    c = parse_char();
                       {if (true) return c;}
    throw new Error("Missing return statement in function");
  }

  final public ident parse_ident() throws ParseException {
                      Token t;
    t = jj_consume_token(IDENT);
      {if (true) return new ident(t.image);}
    throw new Error("Missing return statement in function");
  }

  final public verbatim parse_verbatim() throws ParseException {
                            Token t;
    t = jj_consume_token(TEXT);
      {if (true) return new verbatim(t.image.substring(2,t.image.length()-2));}
    throw new Error("Missing return statement in function");
  }

  final public Outcome parse_Outcome() throws ParseException {
     String string;
    string = parse_String();
      {if (true) return new Outcome(string);}
    throw new Error("Missing return statement in function");
  }

  final public Value parse_Value() throws ParseException {
    jj_consume_token(1);
      {if (true) return new Value();}
    throw new Error("Missing return statement in function");
  }

  final public Predicate parse_Predicate() throws ParseException {
     String pred;
    jj_consume_token(2);
    pred = parse_String();
      {if (true) return new Predicate(pred);}
    throw new Error("Missing return statement in function");
  }

  final public Belief parse_Belief() throws ParseException {
     Predicate predicate;
     float fraction;
    jj_consume_token(3);
    predicate = parse_Predicate();
    fraction = parse_float();
      {if (true) return new Belief(predicate,fraction);}
    throw new Error("Missing return statement in function");
  }

  final public Challenge parse_Challenge() throws ParseException {
     String name;
     Price price;
     Belief belief;
    jj_consume_token(4);
    jj_consume_token(5);
    name = parse_String();
    price = parse_Price();
    belief = parse_Belief();
    jj_consume_token(6);
      {if (true) return new Challenge(name,price,belief);}
    throw new Error("Missing return statement in function");
  }

  final public QualifiedProblem parse_QualifiedProblem() throws ParseException {
     Predicate predicate;
     Problem instance;
    jj_consume_token(7);
    jj_consume_token(5);
    predicate = parse_Predicate();
    instance = parse_Problem();
    jj_consume_token(6);
      {if (true) return new QualifiedProblem(predicate,instance);}
    throw new Error("Missing return statement in function");
  }

  final public Problem parse_Problem() throws ParseException {
     String string;
    string = parse_String();
      {if (true) return new Problem(string);}
    throw new Error("Missing return statement in function");
  }

  final public SolvedProblem parse_SolvedProblem() throws ParseException {
     QualifiedProblem rm;
     Outcome ip;
     Quality quality;
    jj_consume_token(8);
    jj_consume_token(5);
    rm = parse_QualifiedProblem();
    ip = parse_Outcome();
    quality = parse_Quality();
    jj_consume_token(6);
      {if (true) return new SolvedProblem(rm,ip,quality);}
    throw new Error("Missing return statement in function");
  }

  final public Price parse_Price() throws ParseException {
     double val;
    val = parse_double();
      {if (true) return new Price(val);}
    throw new Error("Missing return statement in function");
  }

  final public Quality parse_Quality() throws ParseException {
     double val;
    val = parse_double();
      {if (true) return new Quality(val);}
    throw new Error("Missing return statement in function");
  }

  final public History parse_History() throws ParseException {
     List<Round> rounds;
    jj_consume_token(9);
    jj_consume_token(5);
    rounds = parse_List$Round$();
    jj_consume_token(6);
      {if (true) return new History(rounds);}
    throw new Error("Missing return statement in function");
  }

  final public Round parse_Round() throws ParseException {
     List<PlayerTransaction> ptransactions;
    jj_consume_token(10);
    jj_consume_token(5);
    ptransactions = parse_List$PlayerTransaction$();
    jj_consume_token(6);
      {if (true) return new Round(ptransactions);}
    throw new Error("Missing return statement in function");
  }

  final public PlayerTransaction parse_PlayerTransaction() throws ParseException {
     String playerName;
     List<Transaction> transactions;
    playerName = parse_String();
    transactions = parse_List$Transaction$();
      {if (true) return new PlayerTransaction(playerName,transactions);}
    throw new Error("Missing return statement in function");
  }

  final public Transaction parse_Transaction() throws ParseException {
     TransactionType ttype;
     Challenge challenge;
    ttype = parse_TransactionType();
    challenge = parse_Challenge();
      {if (true) return new Transaction(ttype,challenge);}
    throw new Error("Missing return statement in function");
  }

  final public TransactionType parse_TransactionType() throws ParseException {
    TransactionType sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 11:
      sup = parse_Buy();
                        {if (true) return sup;}
      break;
    case 12:
      sup = parse_Create();
                           {if (true) return sup;}
      break;
    case 13:
      sup = parse_Reoffer();
                            {if (true) return sup;}
      break;
    case 14:
      sup = parse_Deliver();
                            {if (true) return sup;}
      break;
    case 15:
      sup = parse_Finish();
                           {if (true) return sup;}
      break;
    default:
      jj_la1[1] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    throw new Error("Missing return statement in function");
  }

  final public Buy parse_Buy() throws ParseException {
    jj_consume_token(11);
      {if (true) return new Buy();}
    throw new Error("Missing return statement in function");
  }

  final public Create parse_Create() throws ParseException {
    jj_consume_token(12);
      {if (true) return new Create();}
    throw new Error("Missing return statement in function");
  }

  final public Reoffer parse_Reoffer() throws ParseException {
    jj_consume_token(13);
      {if (true) return new Reoffer();}
    throw new Error("Missing return statement in function");
  }

  final public Deliver parse_Deliver() throws ParseException {
    jj_consume_token(14);
      {if (true) return new Deliver();}
    throw new Error("Missing return statement in function");
  }

  final public Finish parse_Finish() throws ParseException {
    jj_consume_token(15);
      {if (true) return new Finish();}
    throw new Error("Missing return statement in function");
  }

  final public SCG parse_SCG() throws ParseException {
     List<Player> players;
     List<Pair<PlayerID,Double>> account;
     List<Pair<PlayerID,PlayerStore>> store;
     Config config;
    jj_consume_token(16);
    jj_consume_token(17);
    players = parse_List$Player$();
    jj_consume_token(18);
    account = parse_List$Pair$PlayerID$Double$$();
    jj_consume_token(19);
    store = parse_List$Pair$PlayerID$PlayerStore$$();
    jj_consume_token(20);
    config = parse_Config();
      {if (true) return new SCG(players,account,store,config);}
    throw new Error("Missing return statement in function");
  }

  final public Player parse_Player() throws ParseException {
     PlayerID id;
     String name;
    jj_consume_token(21);
    id = parse_PlayerID();
    name = parse_String();
      {if (true) return new Player(id,name);}
    throw new Error("Missing return statement in function");
  }

  final public PlayerStore parse_PlayerStore() throws ParseException {
     List<Challenge> forSale;
     List<BoughtDeriv> bought;
    jj_consume_token(22);
    forSale = parse_List$Challenge$();
    bought = parse_List$BoughtDeriv$();
      {if (true) return new PlayerStore(forSale,bought);}
    throw new Error("Missing return statement in function");
  }

  final public BoughtDeriv parse_BoughtDeriv() throws ParseException {
     Challenge d;
     PlayerID seller;
     Option<QualifiedProblem> r;
     Option<SolvedProblem> f;
    jj_consume_token(23);
    d = parse_Challenge();
    seller = parse_PlayerID();
    r = parse_Option$QualifiedProblem$();
    f = parse_Option$SolvedProblem$();
      {if (true) return new BoughtDeriv(d,seller,r,f);}
    throw new Error("Missing return statement in function");
  }

  final public Config parse_Config() throws ParseException {
     double init;
     int maxTurns;
     int timeslot;
     double mindec;
    init = parse_double();
    maxTurns = parse_int();
    timeslot = parse_int();
    mindec = parse_double();
      {if (true) return new Config(init,maxTurns,timeslot,mindec);}
    throw new Error("Missing return statement in function");
  }

  final public PlayerID parse_PlayerID() throws ParseException {
     int id;
    id = parse_int();
      {if (true) return new PlayerID(id);}
    throw new Error("Missing return statement in function");
  }

  final public Option<SolvedProblem> parse_Option$SolvedProblem$() throws ParseException {
    Option<SolvedProblem> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 8:
      sup = parse_Some$SolvedProblem$();
                                        {if (true) return sup;}
      break;
    default:
      jj_la1[2] = jj_gen;
      sup = parse_None$SolvedProblem$();
                                        {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public None<SolvedProblem> parse_None$SolvedProblem$() throws ParseException {
      {if (true) return new None<SolvedProblem>();}
    throw new Error("Missing return statement in function");
  }

  final public Some<SolvedProblem> parse_Some$SolvedProblem$() throws ParseException {
     SolvedProblem just;
    just = parse_SolvedProblem();
      {if (true) return new Some<SolvedProblem>(just);}
    throw new Error("Missing return statement in function");
  }

  final public Option<QualifiedProblem> parse_Option$QualifiedProblem$() throws ParseException {
    Option<QualifiedProblem> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 7:
      sup = parse_Some$QualifiedProblem$();
                                           {if (true) return sup;}
      break;
    default:
      jj_la1[3] = jj_gen;
      sup = parse_None$QualifiedProblem$();
                                           {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public None<QualifiedProblem> parse_None$QualifiedProblem$() throws ParseException {
      {if (true) return new None<QualifiedProblem>();}
    throw new Error("Missing return statement in function");
  }

  final public Some<QualifiedProblem> parse_Some$QualifiedProblem$() throws ParseException {
     QualifiedProblem just;
    just = parse_QualifiedProblem();
      {if (true) return new Some<QualifiedProblem>(just);}
    throw new Error("Missing return statement in function");
  }

  final public List<BoughtDeriv> parse_List$BoughtDeriv$() throws ParseException {
    List<BoughtDeriv> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 23:
      sup = parse_Cons$BoughtDeriv$();
                                      {if (true) return sup;}
      break;
    default:
      jj_la1[4] = jj_gen;
      sup = parse_Empty$BoughtDeriv$();
                                       {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<BoughtDeriv> parse_Empty$BoughtDeriv$() throws ParseException {
      {if (true) return new Empty<BoughtDeriv>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<BoughtDeriv> parse_Cons$BoughtDeriv$() throws ParseException {
     BoughtDeriv first;
     List<BoughtDeriv> rest;
    first = parse_BoughtDeriv();
    rest = parse_List$BoughtDeriv$();
      {if (true) return new Cons<BoughtDeriv>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public List<Challenge> parse_List$Challenge$() throws ParseException {
    List<Challenge> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 4:
      sup = parse_Cons$Challenge$();
                                    {if (true) return sup;}
      break;
    default:
      jj_la1[5] = jj_gen;
      sup = parse_Empty$Challenge$();
                                     {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Challenge> parse_Empty$Challenge$() throws ParseException {
      {if (true) return new Empty<Challenge>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Challenge> parse_Cons$Challenge$() throws ParseException {
     Challenge first;
     List<Challenge> rest;
    first = parse_Challenge();
    rest = parse_List$Challenge$();
      {if (true) return new Cons<Challenge>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public List<Pair<PlayerID,PlayerStore>> parse_List$Pair$PlayerID$PlayerStore$$() throws ParseException {
    List<Pair<PlayerID,PlayerStore>> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case INT:
      sup = parse_Cons$Pair$PlayerID$PlayerStore$$();
                                                     {if (true) return sup;}
      break;
    default:
      jj_la1[6] = jj_gen;
      sup = parse_Empty$Pair$PlayerID$PlayerStore$$();
                                                      {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Pair<PlayerID,PlayerStore>> parse_Empty$Pair$PlayerID$PlayerStore$$() throws ParseException {
      {if (true) return new Empty<Pair<PlayerID,PlayerStore>>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Pair<PlayerID,PlayerStore>> parse_Cons$Pair$PlayerID$PlayerStore$$() throws ParseException {
     Pair<PlayerID,PlayerStore> first;
     List<Pair<PlayerID,PlayerStore>> rest;
    first = parse_Pair$PlayerID$PlayerStore$();
    rest = parse_List$Pair$PlayerID$PlayerStore$$();
      {if (true) return new Cons<Pair<PlayerID,PlayerStore>>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public Pair<PlayerID,PlayerStore> parse_Pair$PlayerID$PlayerStore$() throws ParseException {
     PlayerID a;
     PlayerStore b;
    a = parse_PlayerID();
    b = parse_PlayerStore();
      {if (true) return new Pair<PlayerID,PlayerStore>(a,b);}
    throw new Error("Missing return statement in function");
  }

  final public List<Pair<PlayerID,Double>> parse_List$Pair$PlayerID$Double$$() throws ParseException {
    List<Pair<PlayerID,Double>> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case INT:
      sup = parse_Cons$Pair$PlayerID$Double$$();
                                                {if (true) return sup;}
      break;
    default:
      jj_la1[7] = jj_gen;
      sup = parse_Empty$Pair$PlayerID$Double$$();
                                                 {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Pair<PlayerID,Double>> parse_Empty$Pair$PlayerID$Double$$() throws ParseException {
      {if (true) return new Empty<Pair<PlayerID,Double>>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Pair<PlayerID,Double>> parse_Cons$Pair$PlayerID$Double$$() throws ParseException {
     Pair<PlayerID,Double> first;
     List<Pair<PlayerID,Double>> rest;
    first = parse_Pair$PlayerID$Double$();
    rest = parse_List$Pair$PlayerID$Double$$();
      {if (true) return new Cons<Pair<PlayerID,Double>>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public Pair<PlayerID,Double> parse_Pair$PlayerID$Double$() throws ParseException {
     PlayerID a;
     Double b;
    a = parse_PlayerID();
    b = parse_Double();
      {if (true) return new Pair<PlayerID,Double>(a,b);}
    throw new Error("Missing return statement in function");
  }

  final public List<Player> parse_List$Player$() throws ParseException {
    List<Player> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 21:
      sup = parse_Cons$Player$();
                                 {if (true) return sup;}
      break;
    default:
      jj_la1[8] = jj_gen;
      sup = parse_Empty$Player$();
                                  {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Player> parse_Empty$Player$() throws ParseException {
      {if (true) return new Empty<Player>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Player> parse_Cons$Player$() throws ParseException {
     Player first;
     List<Player> rest;
    first = parse_Player();
    rest = parse_List$Player$();
      {if (true) return new Cons<Player>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public List<Transaction> parse_List$Transaction$() throws ParseException {
    List<Transaction> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
      sup = parse_Cons$Transaction$();
                                      {if (true) return sup;}
      break;
    default:
      jj_la1[9] = jj_gen;
      sup = parse_Empty$Transaction$();
                                       {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Transaction> parse_Empty$Transaction$() throws ParseException {
      {if (true) return new Empty<Transaction>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Transaction> parse_Cons$Transaction$() throws ParseException {
     Transaction first;
     List<Transaction> rest;
    first = parse_Transaction();
    rest = parse_List$Transaction$();
      {if (true) return new Cons<Transaction>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public List<PlayerTransaction> parse_List$PlayerTransaction$() throws ParseException {
    List<PlayerTransaction> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case STRING:
      sup = parse_Cons$PlayerTransaction$();
                                            {if (true) return sup;}
      break;
    default:
      jj_la1[10] = jj_gen;
      sup = parse_Empty$PlayerTransaction$();
                                             {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<PlayerTransaction> parse_Empty$PlayerTransaction$() throws ParseException {
      {if (true) return new Empty<PlayerTransaction>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<PlayerTransaction> parse_Cons$PlayerTransaction$() throws ParseException {
     PlayerTransaction first;
     List<PlayerTransaction> rest;
    first = parse_PlayerTransaction();
    rest = parse_List$PlayerTransaction$();
      {if (true) return new Cons<PlayerTransaction>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  final public List<Round> parse_List$Round$() throws ParseException {
    List<Round> sup = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 10:
      sup = parse_Cons$Round$();
                                {if (true) return sup;}
      break;
    default:
      jj_la1[11] = jj_gen;
      sup = parse_Empty$Round$();
                                 {if (true) return sup;}
    }
    throw new Error("Missing return statement in function");
  }

  final public Empty<Round> parse_Empty$Round$() throws ParseException {
      {if (true) return new Empty<Round>();}
    throw new Error("Missing return statement in function");
  }

  final public Cons<Round> parse_Cons$Round$() throws ParseException {
     Round first;
     List<Round> rest;
    first = parse_Round();
    rest = parse_List$Round$();
      {if (true) return new Cons<Round>(first,rest);}
    throw new Error("Missing return statement in function");
  }

  public TheParserTokenManager token_source;
  SimpleCharStream jj_input_stream;
  public Token token, jj_nt;
  private int jj_ntk;
  private int jj_gen;
  final private int[] jj_la1 = new int[12];
  static private int[] jj_la1_0;
  static private int[] jj_la1_1;
  static {
      jj_la1_0();
      jj_la1_1();
   }
   private static void jj_la1_0() {
      jj_la1_0 = new int[] {0x80000000,0xf800,0x100,0x80,0x800000,0x10,0x0,0x0,0x200000,0xf800,0x0,0x400,};
   }
   private static void jj_la1_1() {
      jj_la1_1 = new int[] {0x1,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x0,0x0,0x20,0x0,};
   }

  public TheParser(java.io.InputStream stream) {
     this(stream, null);
  }
  public TheParser(java.io.InputStream stream, String encoding) {
    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
    token_source = new TheParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.InputStream stream) {
     ReInit(stream, null);
  }
  public void ReInit(java.io.InputStream stream, String encoding) {
    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  public TheParser(java.io.Reader stream) {
    jj_input_stream = new SimpleCharStream(stream, 1, 1);
    token_source = new TheParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.Reader stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  public TheParser(TheParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  public void ReInit(TheParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 12; i++) jj_la1[i] = -1;
  }

  final private Token jj_consume_token(int kind) throws ParseException {
    Token oldToken;
    if ((oldToken = token).next != null) token = token.next;
    else token = token.next = token_source.getNextToken();
    jj_ntk = -1;
    if (token.kind == kind) {
      jj_gen++;
      return token;
    }
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }

  final public Token getNextToken() {
    if (token.next != null) token = token.next;
    else token = token.next = token_source.getNextToken();
    jj_ntk = -1;
    jj_gen++;
    return token;
  }

  final public Token getToken(int index) {
    Token t = token;
    for (int i = 0; i < index; i++) {
      if (t.next != null) t = t.next;
      else t = t.next = token_source.getNextToken();
    }
    return t;
  }

  final private int jj_ntk() {
    if ((jj_nt=token.next) == null)
      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
    else
      return (jj_ntk = jj_nt.kind);
  }

  private java.util.Vector jj_expentries = new java.util.Vector();
  private int[] jj_expentry;
  private int jj_kind = -1;

  public ParseException generateParseException() {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[40];
    for (int i = 0; i < 40; i++) {
      la1tokens[i] = false;
    }
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 12; i++) {
      if (jj_la1[i] == jj_gen) {
        for (int j = 0; j < 32; j++) {
          if ((jj_la1_0[i] & (1<<j)) != 0) {
            la1tokens[j] = true;
          }
          if ((jj_la1_1[i] & (1<<j)) != 0) {
            la1tokens[32+j] = true;
          }
        }
      }
    }
    for (int i = 0; i < 40; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.elementAt(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  final public void enable_tracing() {
  }

  final public void disable_tracing() {
  }

  }