final public Theory parseTheory() throws ParseException {
 theory=new Theory();
 tempRulesSet.clear();
    label_1:
    while (true) {
      if (jj_2_1(7)) {
        ;
      } else {
        break label_1;
      }
      theoryExpression();
    }
    jj_consume_token(0);
  if (tempRulesSet.size()>0){
  try{
   for (Rule rule:tempRulesSet){
     String ruleLabel=theory.getUniqueRuleLabel();
     rule.setLabel(ruleLabel);
     theory.addRule(rule);
    }
   } catch (TheoryException e){
    {if (true) throw new Error(e);}
   }
  }
   {if (true) return theory;}
    throw new Error("Missing return statement in function");
  }