}
protected SQLExpr dotRest(SQLExpr expr) {
if (lexer.token() == Token.STAR) {
lexer.nextToken();
expr = new SQLPropertyExpr(expr, "*");
} else {
String name;
if (lexer.token() == Token.IDENTIFIER || lexer.token() == Token.LITERAL_CHARS
|| lexer.token() == Token.LITERAL_ALIAS) {
name = lexer.stringVal();
lexer.nextToken();
} else if (lexer.getKeywods().containsValue(lexer.token())) {
name = lexer.stringVal();
lexer.nextToken();
} else {
throw new ParserException("error : " + lexer.stringVal());
}
if (lexer.token() == Token.LPAREN) {
lexer.nextToken();
SQLMethodInvokeExpr methodInvokeExpr = new SQLMethodInvokeExpr(name);
methodInvokeExpr.setOwner(expr);
if (lexer.token() == Token.RPAREN) {
lexer.nextToken();
} else {
if (lexer.token() == Token.PLUS) {
methodInvokeExpr.getParameters().add(new SQLIdentifierExpr("+"));
lexer.nextToken();
} else {
exprList(methodInvokeExpr.getParameters());
}
accept(Token.RPAREN);
}
expr = methodInvokeExpr;
} else {
expr = new SQLPropertyExpr(expr, name);
}
}
expr = primaryRest(expr);
return expr;