示例#1
0
 void match(int t) throws IOException {
   if (look.tag == t && skipFlag == -1) {
     matchExecuted = true;
     move();
   } else if (skipFlag == 1) {
     skipFlag = -1;
   } else {
     error("syntax error");
   }
 }
示例#2
0
 public Parser(Lexer lex, StackMachine stackMachine) throws IOException {
   lexer = lex;
   this.stackMachine = stackMachine;
   threeAddressCodeGenerator = new ThreeAddressCodeGenerator();
   move();
 }