src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java
Print this page
*** 31,52 ****
import java.util.List;
import java.util.ArrayList;
public class ExpressionParser implements ExpressionParserConstants {
! Stack stack = new Stack();
VirtualMachine vm = null;
GetFrame frameGetter = null;
private static GetFrame lastFrameGetter;
private static LValue lastLValue;
LValue peek() {
! return (LValue)stack.peek();
}
LValue pop() {
! return (LValue)stack.pop();
}
void push(LValue lval) {
stack.push(lval);
}
--- 31,52 ----
import java.util.List;
import java.util.ArrayList;
public class ExpressionParser implements ExpressionParserConstants {
! Stack<LValue> stack = new Stack<>();
VirtualMachine vm = null;
GetFrame frameGetter = null;
private static GetFrame lastFrameGetter;
private static LValue lastLValue;
LValue peek() {
! return stack.peek();
}
LValue pop() {
! return stack.pop();
}
void push(LValue lval) {
stack.push(lval);
}
*** 913,923 ****
throw new ParseException();
}
}
final public void PrimarySuffix() throws ParseException {
! List argList;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
jj_consume_token(LBRACKET);
Expression();
jj_consume_token(RBRACKET);
--- 913,923 ----
throw new ParseException();
}
}
final public void PrimarySuffix() throws ParseException {
! List<Value> argList;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET:
jj_consume_token(LBRACKET);
Expression();
jj_consume_token(RBRACKET);
*** 991,1002 ****
final public void NullLiteral() throws ParseException {
jj_consume_token(NULL);
}
! final public List Arguments() throws ParseException {
! List argList = new ArrayList();
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE:
case NEW:
case NULL:
--- 991,1002 ----
final public void NullLiteral() throws ParseException {
jj_consume_token(NULL);
}
! final public List<Value> Arguments() throws ParseException {
! List<Value> argList = new ArrayList<>();
jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE:
case NEW:
case NULL:
*** 1024,1034 ****
jj_consume_token(RPAREN);
{if (true) return argList;}
throw new Error("Missing return statement in function");
}
! final public void ArgumentList(List argList) throws ParseException {
Expression();
argList.add(pop().interiorGetValue());
label_17:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
--- 1024,1034 ----
jj_consume_token(RPAREN);
{if (true) return argList;}
throw new Error("Missing return statement in function");
}
! final public void ArgumentList(List<Value> argList) throws ParseException {
Expression();
argList.add(pop().interiorGetValue());
label_17:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
*** 1044,1054 ****
argList.add(pop().interiorGetValue());
}
}
final public void AllocationExpression() throws ParseException {
! List argList; String className;
if (jj_2_7(2)) {
jj_consume_token(NEW);
PrimitiveType();
ArrayDimensions();
} else {
--- 1044,1054 ----
argList.add(pop().interiorGetValue());
}
}
final public void AllocationExpression() throws ParseException {
! List<Value> argList; String className;
if (jj_2_7(2)) {
jj_consume_token(NEW);
PrimitiveType();
ArrayDimensions();
} else {