boolean scanId() {
		if (state != 0) {
			return false;
		}
		
		if (!CharTable.isLetter(peek())) {
			return fail();
		}
		
		while (CharTable.isLetterOrDigit(next())) {
			;
		}
		String id = subBuf(lexemeBegin, forward - 1).toString();
		if ("true".equals(id)) {
			addToken(new Tok(Sym.TRUE, id, beginRow));
		} else if ("false".equals(id)) {
			addToken(new Tok(Sym.FALSE, id, beginRow));
		} else if ("null".equals(id)) {
			addToken(new Tok(Sym.NULL, id, beginRow));
		} else if (CharTable.isBlankOrLineFeed(peek()) && javaKeyword.contains(id)) {
			throw new ParseException("Identifier can not be java keyword : " + id, location);
		} else {
			addToken(new Tok(Sym.ID, id, beginRow));
		}
		return prepareNextScan();
	}
boolean scanId ( ) { if ( state != 0 ) { return false ; } if ( ! CharTable . isLetter ( peek ( ) ) ) { return fail ( ) ; } while ( CharTable . isLetterOrDigit ( next ( ) ) ) { ; } String id = subBuf ( lexemeBegin , forward - 1 ) . toString ( ) ; if ( "true" . equals ( id ) ) { addToken ( new Tok ( Sym . TRUE , id , beginRow ) ) ; } else if ( "false" . equals ( id ) ) { addToken ( new Tok ( Sym . FALSE , id , beginRow ) ) ; } else if ( "null" . equals ( id ) ) { addToken ( new Tok ( Sym . NULL , id , beginRow ) ) ; } else if ( CharTable . isBlankOrLineFeed ( peek ( ) ) && javaKeyword . contains ( id ) ) { throw new ParseException ( "Identifier can not be java keyword : " + id , location ) ; } else { addToken ( new Tok ( Sym . ID , id , beginRow ) ) ; } return prepareNextScan ( ) ; }
扫描 ID true false null