case '%':
exp.poll();
return new ModOpt();
case '(':
exp.poll();
return new LBracketOpt();
case ')':
exp.poll();
return new RBracketOpt();
case '>':
exp.poll();
switch(exp.peek()){
case '=':
exp.poll();
return new GTEOpt();
case '>':
exp.poll();
if(exp.peek() == '>'){
exp.poll();
return new UnsignedLeftShift();
}
return new RightShift();
}
return new GTOpt();
case '<':
exp.poll();
switch(exp.peek()){
case '=':
exp.poll();
return new LTEOpt();
case '<':
exp.poll();
return new LeftShift();
}
return new LTOpt();
case '=':
exp.poll();
switch(exp.peek()){
case '=':
exp.poll();
return new EQOpt();
}
throw new ElException("表达式错误,请检查'='后是否有非法字符!");
case '!':
exp.poll();
switch(exp.peek()){
case '=':
exp.poll();
return new NEQOpt();
}
return new NotOpt();
case '|':
exp.poll();
switch(exp.peek()){
case '|':
exp.poll();
return new OrOpt();
}
return new BitOr();
case '&':
exp.poll();
switch(exp.peek()){
case '&':
exp.poll();
return new AndOpt();
}
return new BitAnd();
case '~':
exp.poll();
return new BitNot();
case '^':
exp.poll();
return new BitXro();
case '?':
exp.poll();
return new QuestionOpt();
case ':':
exp.poll();
return new QuestionSelectOpt();
case '.':
if(!Character.isJavaIdentifierStart(exp.peek(1))){
return null;
}
exp.poll();
return new AccessOpt();
case ',':
exp.poll();
return new CommaOpt();
case '[':
exp.poll();
return new Object[]{new ArrayOpt(),new LBracketOpt()};
case ']':
exp.poll();
return new Object[]{new RBracketOpt(), new FetchArrayOpt()};
}
return null;