while (!rpn.isEmpty()) {
if (!(rpn.getFirst() instanceof Elobj)) {
dest.add(rpn.removeFirst());
continue;
}
Elobj obj = (Elobj) rpn.removeFirst();
// 方法对象
if (!rpn.isEmpty() && rpn.getFirst() instanceof MethodOpt) {
dest.add(new MethodObj(obj.getVal()));
continue;
}
// 属性对象
if (dest.size() > 0
&& dest.getLast() instanceof AccessOpt
&& rpn.size() > 0
&& rpn.getFirst() instanceof AccessOpt) {
dest.add(new FieldObj(obj.getVal()));
continue;
}
// //普通的对象
// if(!(dest.getLast() instanceof AccessOpt) && !(rpn.peekFirst()
// instanceof MethodOpt)){
// continue;
// }
dest.add(new IdentifierObj(obj.getVal()));
}
return dest;
}