示例#1
0
 public final Call Call() throws ParseException {
   NodeToken n0;
   Token n1;
   SimpleExp n2;
   NodeToken n3;
   Token n4;
   NodeListOptional n5 = new NodeListOptional();
   Temp n6;
   NodeToken n7;
   Token n8;
   n1 = jj_consume_token(CALL);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = SimpleExp();
   n4 = jj_consume_token(LPAREN);
   n3 = JTBToolkit.makeNodeToken(n4);
   label_3:
   while (true) {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case TEMP:;
         break;
       default:
         jj_la1[5] = jj_gen;
         break label_3;
     }
     n6 = Temp();
     n5.addNode(n6);
   }
   n5.nodes.trimToSize();
   n8 = jj_consume_token(RPAREN);
   n7 = JTBToolkit.makeNodeToken(n8);
   {
     if (true) return new Call(n0, n2, n3, n5, n7);
   }
   throw new Error("Missing return statement in function");
 }
示例#2
0
 public final Label Label() throws ParseException {
   NodeToken n0;
   Token n1;
   n1 = jj_consume_token(IDENTIFIER);
   n0 = JTBToolkit.makeNodeToken(n1);
   {
     if (true) return new Label(n0);
   }
   throw new Error("Missing return statement in function");
 }
示例#3
0
 public final IntegerLiteral IntegerLiteral() throws ParseException {
   NodeToken n0;
   Token n1;
   n1 = jj_consume_token(INTEGER_LITERAL);
   n0 = JTBToolkit.makeNodeToken(n1);
   {
     if (true) return new IntegerLiteral(n0);
   }
   throw new Error("Missing return statement in function");
 }
示例#4
0
 public final ErrorStmt ErrorStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   n1 = jj_consume_token(ERROR);
   n0 = JTBToolkit.makeNodeToken(n1);
   {
     if (true) return new ErrorStmt(n0);
   }
   throw new Error("Missing return statement in function");
 }
示例#5
0
 public final Procedure Procedure() throws ParseException {
   Label n0;
   NodeToken n1;
   Token n2;
   IntegerLiteral n3;
   NodeToken n4;
   Token n5;
   StmtExp n6;
   n0 = Label();
   n2 = jj_consume_token(LSQPAREN);
   n1 = JTBToolkit.makeNodeToken(n2);
   n3 = IntegerLiteral();
   n5 = jj_consume_token(RSQPAREN);
   n4 = JTBToolkit.makeNodeToken(n5);
   n6 = StmtExp();
   {
     if (true) return new Procedure(n0, n1, n3, n4, n6);
   }
   throw new Error("Missing return statement in function");
 }
示例#6
0
 public final Operator Operator() throws ParseException {
   NodeChoice n0;
   NodeToken n1;
   Token n2;
   NodeToken n3;
   Token n4;
   NodeToken n5;
   Token n6;
   NodeToken n7;
   Token n8;
   switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
     case LT:
       n2 = jj_consume_token(LT);
       n1 = JTBToolkit.makeNodeToken(n2);
       n0 = new NodeChoice(n1, 0);
       break;
     case PLUS:
       n4 = jj_consume_token(PLUS);
       n3 = JTBToolkit.makeNodeToken(n4);
       n0 = new NodeChoice(n3, 1);
       break;
     case MINUS:
       n6 = jj_consume_token(MINUS);
       n5 = JTBToolkit.makeNodeToken(n6);
       n0 = new NodeChoice(n5, 2);
       break;
     case TIMES:
       n8 = jj_consume_token(TIMES);
       n7 = JTBToolkit.makeNodeToken(n8);
       n0 = new NodeChoice(n7, 3);
       break;
     default:
       jj_la1[6] = jj_gen;
       jj_consume_token(-1);
       throw new ParseException();
   }
   {
     if (true) return new Operator(n0);
   }
   throw new Error("Missing return statement in function");
 }
示例#7
0
 public final Temp Temp() throws ParseException {
   NodeToken n0;
   Token n1;
   IntegerLiteral n2;
   n1 = jj_consume_token(TEMP);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = IntegerLiteral();
   {
     if (true) return new Temp(n0, n2);
   }
   throw new Error("Missing return statement in function");
 }
示例#8
0
 public final HAllocate HAllocate() throws ParseException {
   NodeToken n0;
   Token n1;
   SimpleExp n2;
   n1 = jj_consume_token(HALLOCATE);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = SimpleExp();
   {
     if (true) return new HAllocate(n0, n2);
   }
   throw new Error("Missing return statement in function");
 }
示例#9
0
 public final PrintStmt PrintStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   SimpleExp n2;
   n1 = jj_consume_token(PRINT);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = SimpleExp();
   {
     if (true) return new PrintStmt(n0, n2);
   }
   throw new Error("Missing return statement in function");
 }
示例#10
0
 public final JumpStmt JumpStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   Label n2;
   n1 = jj_consume_token(JUMP);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = Label();
   {
     if (true) return new JumpStmt(n0, n2);
   }
   throw new Error("Missing return statement in function");
 }
示例#11
0
 public final StmtExp StmtExp() throws ParseException {
   NodeToken n0;
   Token n1;
   StmtList n2;
   NodeToken n3;
   Token n4;
   SimpleExp n5;
   NodeToken n6;
   Token n7;
   n1 = jj_consume_token(BEGIN);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = StmtList();
   n4 = jj_consume_token(RETURN);
   n3 = JTBToolkit.makeNodeToken(n4);
   n5 = SimpleExp();
   n7 = jj_consume_token(END);
   n6 = JTBToolkit.makeNodeToken(n7);
   {
     if (true) return new StmtExp(n0, n2, n3, n5, n6);
   }
   throw new Error("Missing return statement in function");
 }
示例#12
0
 public final MoveStmt MoveStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   Temp n2;
   Exp n3;
   n1 = jj_consume_token(MOVE);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = Temp();
   n3 = Exp();
   {
     if (true) return new MoveStmt(n0, n2, n3);
   }
   throw new Error("Missing return statement in function");
 }
示例#13
0
 public final CJumpStmt CJumpStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   Temp n2;
   Label n3;
   n1 = jj_consume_token(CJUMP);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = Temp();
   n3 = Label();
   {
     if (true) return new CJumpStmt(n0, n2, n3);
   }
   throw new Error("Missing return statement in function");
 }
示例#14
0
 public final Goal Goal() throws ParseException {
   NodeToken n0;
   Token n1;
   StmtList n2;
   NodeToken n3;
   Token n4;
   NodeListOptional n5 = new NodeListOptional();
   Procedure n6;
   NodeToken n7;
   Token n8;
   n1 = jj_consume_token(MAIN);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = StmtList();
   n4 = jj_consume_token(END);
   n3 = JTBToolkit.makeNodeToken(n4);
   label_1:
   while (true) {
     switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
       case IDENTIFIER:;
         break;
       default:
         jj_la1[0] = jj_gen;
         break label_1;
     }
     n6 = Procedure();
     n5.addNode(n6);
   }
   n5.nodes.trimToSize();
   n8 = jj_consume_token(0);
   n8.beginColumn++;
   n8.endColumn++;
   n7 = JTBToolkit.makeNodeToken(n8);
   {
     if (true) return new Goal(n0, n2, n3, n5, n7);
   }
   throw new Error("Missing return statement in function");
 }
示例#15
0
 public final HLoadStmt HLoadStmt() throws ParseException {
   NodeToken n0;
   Token n1;
   Temp n2;
   Temp n3;
   IntegerLiteral n4;
   n1 = jj_consume_token(HLOAD);
   n0 = JTBToolkit.makeNodeToken(n1);
   n2 = Temp();
   n3 = Temp();
   n4 = IntegerLiteral();
   {
     if (true) return new HLoadStmt(n0, n2, n3, n4);
   }
   throw new Error("Missing return statement in function");
 }