示例#1
0
文件: Parser.java 项目: westl/cs142
 private boolean accept(NonTerminal nt) throws IOException {
   if (have(nt)) {
     currentToken = scanner.next();
     return true;
   }
   return false;
 }
示例#2
0
文件: Parser.java 项目: westl/cs142
 private boolean accept(Token.Kind kind) throws IOException {
   if (have(kind)) {
     currentToken = scanner.next();
     return true;
   }
   return false;
 }
示例#3
0
文件: Parser.java 项目: westl/cs142
 public Parser(Scanner scanner) throws IOException {
   this.scanner = scanner;
   this.currentToken = scanner.next();
 }