java词法分析器(13) this.senLength = sentenceChar.length; int i = 0; //分析单词 while (this.index <= this.senLength) { //state0: this.TOKEN = ""; this.CHAR = GETBC(sentenceChar); if (this.CHAR == ';') { break; //';'表示这一行结束 } //进入状态判断 switch (this.CHAR) { //judge lettercase 'a':case 'b':case 'c':case 'd':case 'e':case 'f':case 'g':case 'h':case 'i':case 'j':case 'k':case 'l':case 'm':case 'n':case 'o':case 'p':case 'q':case 'r':case 's':case 't':case 'u':case 'v':case 'w':case 'x':case 'y':case 'z':case 'A':case 'B':case 'C':case 'D':case 'E':case 'F':case 'G':case 'H':case 'I':case 'J':case 'K':case 'L':case 'M':case 'N':case 'O':case 'P':case 'Q':case 'R':case 'S':case 'T':case 'U':case 'V':case 'W':case 'X':case 'Y':case 'Z':
//do this.TOKEN = this.CONTACT(TOKEN, CHAR);
//state1 CHAR = this.GETCHAR(sentenceChar); while (this.ISLETTER(CHAR) this.ISDIGIT(CHAR)) { this.TOKEN = this.CONTACT(this.TOKEN, CHAR); CHAR = this.GETCHAR(sentenceChar); } this.RETRACT();
//state2