/* Generated By:JavaCC: Do not edit this line. JavaFragmentParser.java */
package ptolemy.copernicus.kernel.fragment;
import java.io.Reader;
import java.io.StringReader;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import ptolemy.copernicus.kernel.SootUtilities;
import soot.ArrayType;
import soot.BooleanType;
import soot.ByteType;
import soot.CharType;
import soot.DoubleType;
import soot.FloatType;
import soot.IntType;
import soot.Local;
import soot.LongType;
import soot.NullType;
import soot.RefType;
import soot.Scene;
import soot.ShortType;
import soot.SootClass;
import soot.SootField;
import soot.SootMethod;
import soot.Type;
import soot.Value;
import soot.VoidType;
import soot.jimple.ClassConstant;
import soot.jimple.FieldRef;
import soot.jimple.FloatConstant;
import soot.jimple.IntConstant;
import soot.jimple.InvokeExpr;
import soot.jimple.Jimple;
import soot.jimple.JimpleBody;
import soot.jimple.NullConstant;
import soot.jimple.Stmt;
import soot.jimple.StringConstant;
public class JavaFragmentParser implements JavaFragmentParserConstants {
public JavaFragmentParser(JimpleBody body, Stmt insertPoint) {
this(body, insertPoint, null);
}
public JavaFragmentParser(JimpleBody body, Stmt insertPoint, Map idMap) {
this(System.in);
_body = body;
_insertPoint = insertPoint;
_idMap = idMap;
}
public void parse(String string) throws ParseException {
if (_idMap == null) {
_idMap = new HashMap();
}
ReInit(new StringReader(string));
statementEntry();
}
public void put(String string, Object object) {
if (_idMap == null) {
_idMap = new HashMap();
}
_idMap.put(string, object);
}
public Object get(String string) {
if (_idMap == null) {
_idMap = new HashMap();
}
return _idMap.get(string);
}
public static void insertBefore(JimpleBody body, Stmt insertPoint,
Map nameToLocal, String string) throws ParseException {
Reader reader = new StringReader(string);
JavaFragmentParser parser = new JavaFragmentParser(body, insertPoint,
nameToLocal);
parser.ReInit(reader);
parser.statementEntry();
}
private void _bindNameToLocal(String name, Local local) {
if (_idMap.get(name) != null) {
throw new RuntimeException("multiply bound name = " + name);
} else {
_idMap.put(name, local);
}
}
/** Create a new local in the body being modified with the given
* name, initialized to the given value at the current point in
* the code.
*/
private Local _createLocal(String name, Value value) {
Type type = value.getType();
Local local = Jimple.v().newLocal(name, type);
_body.getLocals().add(local);
_insert(Jimple.v().newAssignStmt(local, value));
return local;
}
private Type _findType(String name) {
if (_idMap.containsKey(name)) {
Object object = _idMap.get(name);
if (object instanceof Type) {
return (Type) object;
} else {
throw new RuntimeException("ID " + name + " is not a type!");
}
}
// FIXME: This needs to be smarter... imports?
Scene.v().loadClassAndSupport(name);
return RefType.v(name);
}
/** Insert the given statement into the body being processed at
* the current point in the code.
*/
private void _insert(Stmt stmt) {
_body.getUnits().insertBefore(stmt, _insertPoint);
}
/**
*/
private Value _processInstanceMethod(Value baseValue, String name,
List argList) {
int lastDotPosition = name.lastIndexOf(".");
if (lastDotPosition == -1) {
SootClass refClass;
if (baseValue == null) {
// No required baseValue.. If method is not static, then
// We can use the thisLocal as the baseValue.
refClass = _body.getMethod().getDeclaringClass();
if (!_body.getMethod().isStatic()) {
baseValue = _body.getThisLocal();
refClass = _body.getMethod().getDeclaringClass();
}
} else {
Type type = baseValue.getType();
if (type instanceof RefType) {
refClass = ((RefType) type).getSootClass();
} else {
throw new RuntimeException(
"Attempt to dereference primitive type " + type);
}
}
SootMethod method = refClass.getMethodByName(name);
if (method.isStatic()) {
return Jimple.v().newStaticInvokeExpr(method, argList);
} else {
if (baseValue == null) {
throw new RuntimeException(
"Attempt to invoke non-static method \"" + name
+ "\" from static context!");
} else {
return Jimple.v().newVirtualInvokeExpr((Local) baseValue,
method, argList);
}
}
} else {
// Drop the last part of the name, process the rest as a
// field, and then deal with the last part recursively.
String firstPart = name.substring(0, lastDotPosition);
String methodName = name.substring(lastDotPosition + 1);
Value value = _createLocal("$deref", _processInstanceField(
baseValue, firstPart));
return _processInstanceMethod(value, methodName, argList);
}
}
/**
*/
private Value _processInstanceField(Value baseValue, String name) {
int lastDotPosition = name.lastIndexOf(".");
if (lastDotPosition == -1) {
// See if there is a local with the right name.
Value value = (Value) _idMap.get(name);
if (value != null) {
return value;
}
SootClass refClass;
if (baseValue == null) {
// No required baseValue.. If method is not static, then
// We can use the thisLocal as the baseValue.
refClass = _body.getMethod().getDeclaringClass();
if (!_body.getMethod().isStatic()) {
baseValue = _body.getThisLocal();
refClass = _body.getMethod().getDeclaringClass();
}
} else {
Type type = baseValue.getType();
if (type instanceof RefType) {
refClass = ((RefType) type).getSootClass();
} else {
throw new RuntimeException(
"Attempt to dereference primitive type " + type);
}
}
SootField field = refClass.getFieldByName(name);
if (field.isStatic()) {
return Jimple.v().newStaticFieldRef(field);
} else {
if (baseValue == null) {
throw new RuntimeException(
"Attempt to reference non-static field \"" + name
+ "\" from static context!");
} else {
return Jimple.v().newInstanceFieldRef(baseValue, field);
}
}
} else {
// Drop the last part of the name, process the rest as a
// field, and then deal with the last part recursively.
String firstPart = name.substring(0, lastDotPosition);
String fieldName = name.substring(lastDotPosition + 1);
Value value = _createLocal("$deref", _processInstanceField(
baseValue, firstPart));
return _processInstanceField(value, fieldName);
}
}
// The current body being manipulated.
JimpleBody _body;
// The insertion point in the current body. Statements are
// inserted *before* this statement.
Stmt _insertPoint;
// A map of local variable bindings for names. Bindings
Map _idMap;
// List of Stmts corresponding to continue and break points for
// loops. The first element in the list is the innermost binding
// for continues and breaks. Bindings are added to these lists
// when loops are entered
LinkedList _continueStack;
LinkedList _breakStack;
/*****************************************
* THE JAVA LANGUAGE GRAMMAR STARTS HERE *
*****************************************/
/*
* Program structuring syntax follows.
*/
final public void ExpressionEntry() throws ParseException {
Expression();
jj_consume_token(0);
}
final public void statementEntry() throws ParseException {
_continueStack = new LinkedList();
_breakStack = new LinkedList();
StatementOrBlock();
jj_consume_token(0);
}
final public void CompilationUnit() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PACKAGE:
PackageDeclaration();
break;
default:
jj_la1[0] = jj_gen;
;
}
label_1: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IMPORT:
;
break;
default:
jj_la1[1] = jj_gen;
break label_1;
}
ImportDeclaration();
}
label_2: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case CLASS:
case FINAL:
case INTERFACE:
case PUBLIC:
case SEMICOLON:
;
break;
default:
jj_la1[2] = jj_gen;
break label_2;
}
TypeDeclaration();
}
jj_consume_token(0);
}
final public void PackageDeclaration() throws ParseException {
jj_consume_token(PACKAGE);
Name();
jj_consume_token(SEMICOLON);
}
final public void ImportDeclaration() throws ParseException {
jj_consume_token(IMPORT);
Name();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case DOT:
jj_consume_token(DOT);
jj_consume_token(STAR);
break;
default:
jj_la1[3] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
}
final public void TypeDeclaration() throws ParseException {
if (jj_2_1(2147483647)) {
ClassDeclaration();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case INTERFACE:
case PUBLIC:
InterfaceDeclaration();
break;
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
default:
jj_la1[4] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
/*
* Declaration syntax follows.
*/
final public void ClassDeclaration() throws ParseException {
label_3: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case FINAL:
case PUBLIC:
;
break;
default:
jj_la1[5] = jj_gen;
break label_3;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case PUBLIC:
jj_consume_token(PUBLIC);
break;
default:
jj_la1[6] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
UnmodifiedClassDeclaration();
}
final public void UnmodifiedClassDeclaration() throws ParseException {
jj_consume_token(CLASS);
jj_consume_token(IDENTIFIER);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case EXTENDS:
jj_consume_token(EXTENDS);
Name();
break;
default:
jj_la1[7] = jj_gen;
;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IMPLEMENTS:
jj_consume_token(IMPLEMENTS);
NameList();
break;
default:
jj_la1[8] = jj_gen;
;
}
ClassBody();
}
final public void ClassBody() throws ParseException {
jj_consume_token(LBRACE);
label_4: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case SYNCHRONIZED:
case TRANSIENT:
case VOID:
case VOLATILE:
case IDENTIFIER:
case LBRACE:
;
break;
default:
jj_la1[9] = jj_gen;
break label_4;
}
ClassBodyDeclaration();
}
jj_consume_token(RBRACE);
}
final public void NestedClassDeclaration() throws ParseException {
label_5: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case FINAL:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
;
break;
default:
jj_la1[10] = jj_gen;
break label_5;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case STATIC:
jj_consume_token(STATIC);
break;
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
default:
jj_la1[11] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
UnmodifiedClassDeclaration();
}
final public void ClassBodyDeclaration() throws ParseException {
if (jj_2_2(2)) {
Initializer();
} else if (jj_2_3(2147483647)) {
NestedClassDeclaration();
} else if (jj_2_4(2147483647)) {
NestedInterfaceDeclaration();
} else if (jj_2_5(2147483647)) {
ConstructorDeclaration();
} else if (jj_2_6(2147483647)) {
MethodDeclaration();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case TRANSIENT:
case VOLATILE:
case IDENTIFIER:
FieldDeclaration();
break;
default:
jj_la1[12] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
// This production is to determine lookahead only.
final public void MethodDeclarationLookahead() throws ParseException {
label_6: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case FINAL:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case SYNCHRONIZED:
;
break;
default:
jj_la1[13] = jj_gen;
break label_6;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
case STATIC:
jj_consume_token(STATIC);
break;
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case NATIVE:
jj_consume_token(NATIVE);
break;
case SYNCHRONIZED:
jj_consume_token(SYNCHRONIZED);
break;
default:
jj_la1[14] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
ResultType();
jj_consume_token(IDENTIFIER);
jj_consume_token(LPAREN);
}
final public void InterfaceDeclaration() throws ParseException {
label_7: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case PUBLIC:
;
break;
default:
jj_la1[15] = jj_gen;
break label_7;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case PUBLIC:
jj_consume_token(PUBLIC);
break;
default:
jj_la1[16] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
UnmodifiedInterfaceDeclaration();
}
final public void NestedInterfaceDeclaration() throws ParseException {
label_8: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case FINAL:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
;
break;
default:
jj_la1[17] = jj_gen;
break label_8;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case STATIC:
jj_consume_token(STATIC);
break;
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
default:
jj_la1[18] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
UnmodifiedInterfaceDeclaration();
}
final public void UnmodifiedInterfaceDeclaration() throws ParseException {
jj_consume_token(INTERFACE);
jj_consume_token(IDENTIFIER);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case EXTENDS:
jj_consume_token(EXTENDS);
NameList();
break;
default:
jj_la1[19] = jj_gen;
;
}
jj_consume_token(LBRACE);
label_9: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case BOOLEAN:
case BYTE:
case CHAR:
case CLASS:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case INTERFACE:
case LONG:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case SYNCHRONIZED:
case TRANSIENT:
case VOID:
case VOLATILE:
case IDENTIFIER:
;
break;
default:
jj_la1[20] = jj_gen;
break label_9;
}
InterfaceMemberDeclaration();
}
jj_consume_token(RBRACE);
}
final public void InterfaceMemberDeclaration() throws ParseException {
if (jj_2_7(2147483647)) {
NestedClassDeclaration();
} else if (jj_2_8(2147483647)) {
NestedInterfaceDeclaration();
} else if (jj_2_9(2147483647)) {
MethodDeclaration();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case SHORT:
case STATIC:
case TRANSIENT:
case VOLATILE:
case IDENTIFIER:
FieldDeclaration();
break;
default:
jj_la1[21] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
final public void FieldDeclaration() throws ParseException {
Type type;
label_10: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case FINAL:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case TRANSIENT:
case VOLATILE:
;
break;
default:
jj_la1[22] = jj_gen;
break label_10;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
case STATIC:
jj_consume_token(STATIC);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case TRANSIENT:
jj_consume_token(TRANSIENT);
break;
case VOLATILE:
jj_consume_token(VOLATILE);
break;
default:
jj_la1[23] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
type = Type();
FieldDeclarator(type);
label_11: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[24] = jj_gen;
break label_11;
}
jj_consume_token(COMMA);
FieldDeclarator(type);
}
jj_consume_token(SEMICOLON);
}
final public void FieldDeclarator(Type type) throws ParseException {
FieldDeclaratorId(type);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
VariableInitializer(null);
break;
default:
jj_la1[25] = jj_gen;
;
}
}
final public void FieldDeclaratorId(Type type) throws ParseException {
String name;
jj_consume_token(IDENTIFIER);
name = token.image;
label_12: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[26] = jj_gen;
break label_12;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
type = type.makeArrayType();
}
_body.getLocals().add(Jimple.v().newLocal(name, type));
}
final public void MethodDeclaration() throws ParseException {
label_13: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ABSTRACT:
case FINAL:
case NATIVE:
case PRIVATE:
case PROTECTED:
case PUBLIC:
case STATIC:
case SYNCHRONIZED:
;
break;
default:
jj_la1[27] = jj_gen;
break label_13;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
case STATIC:
jj_consume_token(STATIC);
break;
case ABSTRACT:
jj_consume_token(ABSTRACT);
break;
case FINAL:
jj_consume_token(FINAL);
break;
case NATIVE:
jj_consume_token(NATIVE);
break;
case SYNCHRONIZED:
jj_consume_token(SYNCHRONIZED);
break;
default:
jj_la1[28] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
ResultType();
MethodDeclarator();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case THROWS:
jj_consume_token(THROWS);
NameList();
break;
default:
jj_la1[29] = jj_gen;
;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACE:
Block();
break;
case SEMICOLON:
jj_consume_token(SEMICOLON);
break;
default:
jj_la1[30] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
final public void MethodDeclarator() throws ParseException {
jj_consume_token(IDENTIFIER);
FormalParameters();
label_14: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[31] = jj_gen;
break label_14;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
}
}
final public void FormalParameters() throws ParseException {
jj_consume_token(LPAREN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
FormalParameter();
label_15: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[32] = jj_gen;
break label_15;
}
jj_consume_token(COMMA);
FormalParameter();
}
break;
default:
jj_la1[33] = jj_gen;
;
}
jj_consume_token(RPAREN);
}
final public Type FormalParameter() throws ParseException {
Type type;
String name;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case FINAL:
jj_consume_token(FINAL);
break;
default:
jj_la1[34] = jj_gen;
;
}
type = Type();
jj_consume_token(IDENTIFIER);
name = token.image;
label_16: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[35] = jj_gen;
break label_16;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
type = type.makeArrayType();
}
{
if (true)
return type;
}
throw new Error("Missing return statement in function");
}
final public void ConstructorDeclaration() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PRIVATE:
case PROTECTED:
case PUBLIC:
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PUBLIC:
jj_consume_token(PUBLIC);
break;
case PROTECTED:
jj_consume_token(PROTECTED);
break;
case PRIVATE:
jj_consume_token(PRIVATE);
break;
default:
jj_la1[36] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_la1[37] = jj_gen;
;
}
jj_consume_token(IDENTIFIER);
FormalParameters();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case THROWS:
jj_consume_token(THROWS);
NameList();
break;
default:
jj_la1[38] = jj_gen;
;
}
jj_consume_token(LBRACE);
if (jj_2_10(2147483647)) {
ExplicitConstructorInvocation();
} else {
;
}
label_17: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
jj_la1[39] = jj_gen;
break label_17;
}
BlockStatement();
}
jj_consume_token(RBRACE);
}
final public void ExplicitConstructorInvocation() throws ParseException {
if (jj_2_12(2147483647)) {
jj_consume_token(THIS);
Arguments();
jj_consume_token(SEMICOLON);
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
if (jj_2_11(2)) {
PrimaryExpression();
jj_consume_token(DOT);
} else {
;
}
jj_consume_token(SUPER);
Arguments();
jj_consume_token(SEMICOLON);
break;
default:
jj_la1[40] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
final public void Initializer() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case STATIC:
jj_consume_token(STATIC);
break;
default:
jj_la1[41] = jj_gen;
;
}
Block();
}
final public Type NamedType() throws ParseException {
Type type;
String name;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
type = PrimitiveType();
{
if (true)
return type;
}
break;
case IDENTIFIER:
name = Name();
type = _findType(name);
{
if (true)
return type;
}
break;
default:
jj_la1[42] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
/*
* Type, name and expression syntax follows.
*/
final public Type Type() throws ParseException {
Type type;
type = NamedType();
label_18: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[43] = jj_gen;
break label_18;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
type = type.makeArrayType();
}
{
if (true)
return type;
}
throw new Error("Missing return statement in function");
}
final public Type PrimitiveType() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
jj_consume_token(BOOLEAN);
{
if (true)
return IntType.v();
}
break;
case CHAR:
jj_consume_token(CHAR);
{
if (true)
return IntType.v();
}
break;
case BYTE:
jj_consume_token(BYTE);
{
if (true)
return IntType.v();
}
break;
case SHORT:
jj_consume_token(SHORT);
{
if (true)
return IntType.v();
}
break;
case INT:
jj_consume_token(INT);
{
if (true)
return IntType.v();
}
break;
case LONG:
jj_consume_token(LONG);
{
if (true)
return LongType.v();
}
break;
case FLOAT:
jj_consume_token(FLOAT);
{
if (true)
return FloatType.v();
}
break;
case DOUBLE:
jj_consume_token(DOUBLE);
{
if (true)
return DoubleType.v();
}
break;
default:
jj_la1[44] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
final public Type ResultType() throws ParseException {
Type type;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case VOID:
jj_consume_token(VOID);
{
if (true)
return VoidType.v();
}
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
case IDENTIFIER:
type = Type();
{
if (true)
return type;
}
break;
default:
jj_la1[45] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
final public String Name() throws ParseException {
StringBuffer name;
jj_consume_token(IDENTIFIER);
name = new StringBuffer(token.image);
label_19: while (true) {
if (jj_2_13(2)) {
;
} else {
break label_19;
}
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
name.append(".");
name.append(token.image);
}
{
if (true)
return name.toString();
}
throw new Error("Missing return statement in function");
}
final public void NameList() throws ParseException {
Name();
label_20: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[46] = jj_gen;
break label_20;
}
jj_consume_token(COMMA);
Name();
}
}
/*
* Expression syntax follows.
*/
final public Value Expression() throws ParseException {
Value result, value1, value2;
result = ConditionalExpression();
{
if (true)
return result;
}
throw new Error("Missing return statement in function");
}
final public void AssignmentOperator() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
break;
case STARASSIGN:
jj_consume_token(STARASSIGN);
break;
case SLASHASSIGN:
jj_consume_token(SLASHASSIGN);
break;
case REMASSIGN:
jj_consume_token(REMASSIGN);
break;
case PLUSASSIGN:
jj_consume_token(PLUSASSIGN);
break;
case MINUSASSIGN:
jj_consume_token(MINUSASSIGN);
break;
case LSHIFTASSIGN:
jj_consume_token(LSHIFTASSIGN);
break;
case RSIGNEDSHIFTASSIGN:
jj_consume_token(RSIGNEDSHIFTASSIGN);
break;
case RUNSIGNEDSHIFTASSIGN:
jj_consume_token(RUNSIGNEDSHIFTASSIGN);
break;
case ANDASSIGN:
jj_consume_token(ANDASSIGN);
break;
case XORASSIGN:
jj_consume_token(XORASSIGN);
break;
case ORASSIGN:
jj_consume_token(ORASSIGN);
break;
default:
jj_la1[47] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
final public Value ConditionalExpression() throws ParseException {
Value result, value1, value2;
Stmt stmt = Jimple.v().newNopStmt();
result = ConditionalOrExpression();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case HOOK:
jj_consume_token(HOOK);
// Create the jumpto points
Stmt falseBranch = Jimple.v().newNopStmt();
Stmt continuation = Jimple.v().newNopStmt();
// Negate the condition.
_insert(Jimple.v()
.newIfStmt(Jimple.v().newEqExpr(result, IntConstant.v(0)),
falseBranch));
value1 = Expression();
result = _createLocal("$result", value1);
_insert(Jimple.v().newGotoStmt(continuation));
_insert(falseBranch);
jj_consume_token(COLON);
value2 = Expression();
_insert(Jimple.v().newAssignStmt(result, value2));
_insert(continuation);
break;
default:
jj_la1[48] = jj_gen;
;
}
{
if (true)
return result;
}
throw new Error("Missing return statement in function");
}
final public Value ConditionalOrExpression() throws ParseException {
Value value1, value2;
value1 = ConditionalAndExpression();
label_21: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case SC_OR:
;
break;
default:
jj_la1[49] = jj_gen;
break label_21;
}
jj_consume_token(SC_OR);
value2 = ConditionalAndExpression();
value1 = _createLocal("$booleanOr", Jimple.v().newOrExpr(value1,
value2));
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value ConditionalAndExpression() throws ParseException {
Value value1, value2;
value1 = InclusiveOrExpression();
label_22: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case SC_AND:
;
break;
default:
jj_la1[50] = jj_gen;
break label_22;
}
jj_consume_token(SC_AND);
value2 = InclusiveOrExpression();
value1 = _createLocal("$booleanAnd", Jimple.v().newAndExpr(value1,
value2));
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value InclusiveOrExpression() throws ParseException {
Value value1, value2;
value1 = ExclusiveOrExpression();
label_23: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BIT_OR:
;
break;
default:
jj_la1[51] = jj_gen;
break label_23;
}
jj_consume_token(BIT_OR);
value2 = ExclusiveOrExpression();
value1 = _createLocal("$or", Jimple.v().newOrExpr(value1, value2));
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value ExclusiveOrExpression() throws ParseException {
Value value1, value2;
value1 = AndExpression();
label_24: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case XOR:
;
break;
default:
jj_la1[52] = jj_gen;
break label_24;
}
jj_consume_token(XOR);
value2 = AndExpression();
value1 = _createLocal("$xor", Jimple.v().newXorExpr(value1, value2));
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value AndExpression() throws ParseException {
Value value1, value2;
value1 = EqualityExpression();
label_25: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BIT_AND:
;
break;
default:
jj_la1[53] = jj_gen;
break label_25;
}
jj_consume_token(BIT_AND);
value2 = EqualityExpression();
value1 = _createLocal("$and", Jimple.v().newAndExpr(value1, value2));
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value EqualityExpression() throws ParseException {
Value value1, value2;
value1 = InstanceOfExpression();
label_26: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case EQ:
case NE:
;
break;
default:
jj_la1[54] = jj_gen;
break label_26;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case EQ:
jj_consume_token(EQ);
value2 = InstanceOfExpression();
value1 = _createLocal("$eq", Jimple.v().newEqExpr(value1,
value2));
break;
case NE:
jj_consume_token(NE);
value2 = InstanceOfExpression();
value1 = _createLocal("$ne", Jimple.v().newNeExpr(value1,
value2));
break;
default:
jj_la1[55] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value InstanceOfExpression() throws ParseException {
Value value;
Type type;
value = RelationalExpression();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INSTANCEOF:
jj_consume_token(INSTANCEOF);
type = Type();
value = _createLocal("$instanceof", Jimple.v().newInstanceOfExpr(
value, type));
break;
default:
jj_la1[56] = jj_gen;
;
}
{
if (true)
return value;
}
throw new Error("Missing return statement in function");
}
final public Value RelationalExpression() throws ParseException {
Value value1, value2;
value1 = ShiftExpression();
label_27: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case GT:
case LT:
case LE:
case GE:
;
break;
default:
jj_la1[57] = jj_gen;
break label_27;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LT:
jj_consume_token(LT);
value2 = ShiftExpression();
value1 = _createLocal("$lt", Jimple.v().newLtExpr(value1,
value2));
break;
case GT:
jj_consume_token(GT);
value2 = ShiftExpression();
value1 = _createLocal("$gt", Jimple.v().newGtExpr(value1,
value2));
break;
case LE:
jj_consume_token(LE);
value2 = ShiftExpression();
value1 = _createLocal("$lte", Jimple.v().newLeExpr(value1,
value2));
break;
case GE:
jj_consume_token(GE);
value2 = ShiftExpression();
value1 = _createLocal("$gte", Jimple.v().newGeExpr(value1,
value2));
break;
default:
jj_la1[58] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value ShiftExpression() throws ParseException {
Value value1, value2;
value1 = AdditiveExpression();
label_28: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LSHIFT:
case RSIGNEDSHIFT:
case RUNSIGNEDSHIFT:
;
break;
default:
jj_la1[59] = jj_gen;
break label_28;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LSHIFT:
jj_consume_token(LSHIFT);
value2 = AdditiveExpression();
value1 = _createLocal("$shiftLeft", Jimple.v().newShlExpr(
value1, value2));
break;
case RSIGNEDSHIFT:
jj_consume_token(RSIGNEDSHIFT);
value2 = AdditiveExpression();
value1 = _createLocal("$shiftRight", Jimple.v().newShrExpr(
value1, value2));
break;
case RUNSIGNEDSHIFT:
jj_consume_token(RUNSIGNEDSHIFT);
value2 = AdditiveExpression();
value1 = _createLocal("$unsignedShiftRight", Jimple.v()
.newUshrExpr(value1, value2));
break;
default:
jj_la1[60] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value AdditiveExpression() throws ParseException {
Value value1, value2;
value1 = MultiplicativeExpression();
label_29: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PLUS:
case MINUS:
;
break;
default:
jj_la1[61] = jj_gen;
break label_29;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PLUS:
jj_consume_token(PLUS);
value2 = MultiplicativeExpression();
value1 = _createLocal("$add", Jimple.v().newAddExpr(value1,
value2));
break;
case MINUS:
jj_consume_token(MINUS);
value2 = MultiplicativeExpression();
value1 = _createLocal("$subtract", Jimple.v().newSubExpr(
value1, value2));
break;
default:
jj_la1[62] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value MultiplicativeExpression() throws ParseException {
Value value1, value2;
value1 = UnaryExpression();
label_30: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case STAR:
case SLASH:
case REM:
;
break;
default:
jj_la1[63] = jj_gen;
break label_30;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case STAR:
jj_consume_token(STAR);
value2 = UnaryExpression();
value1 = _createLocal("$multiply", Jimple.v().newMulExpr(
value1, value2));
break;
case SLASH:
jj_consume_token(SLASH);
value2 = UnaryExpression();
value1 = _createLocal("$divide", Jimple.v().newDivExpr(value1,
value2));
break;
case REM:
jj_consume_token(REM);
value2 = UnaryExpression();
value1 = _createLocal("$divide", Jimple.v().newRemExpr(value1,
value2));
break;
default:
jj_la1[64] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
{
if (true)
return value1;
}
throw new Error("Missing return statement in function");
}
final public Value UnaryExpression() throws ParseException {
Value value;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case PLUS:
jj_consume_token(PLUS);
value = UnaryExpression();
{
if (true)
return value;
}
break;
case MINUS:
jj_consume_token(MINUS);
value = UnaryExpression();
{
if (true)
return value;
}
break;
case INCR:
value = PreIncrementExpression();
{
if (true)
return value;
}
break;
case DECR:
value = PreDecrementExpression();
{
if (true)
return value;
}
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
value = UnaryExpressionNotPlusMinus();
{
if (true)
return value;
}
break;
default:
jj_la1[65] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
final public Value PreIncrementExpression() throws ParseException {
Value value;
jj_consume_token(INCR);
value = PrimaryExpression();
Local local = _createLocal("$increment", Jimple.v().newAddExpr(value,
IntConstant.v(1)));
if (value instanceof Local) {
_insert(Jimple.v().newAssignStmt((Local) value, local));
} else if (value instanceof FieldRef) {
_insert(Jimple.v().newAssignStmt((FieldRef) value, local));
} else {
{
if (true)
throw new RuntimeException("Illegal Increment");
}
}
{
if (true)
return value;
}
throw new Error("Missing return statement in function");
}
final public Value PreDecrementExpression() throws ParseException {
Value value;
jj_consume_token(DECR);
value = PrimaryExpression();
Local local = _createLocal("$decrement", Jimple.v().newAddExpr(value,
IntConstant.v(-1)));
if (value instanceof Local) {
_insert(Jimple.v().newAssignStmt((Local) value, local));
} else if (value instanceof FieldRef) {
_insert(Jimple.v().newAssignStmt((FieldRef) value, local));
} else {
{
if (true)
throw new RuntimeException("Illegal Decrement");
}
}
{
if (true)
return value;
}
throw new Error("Missing return statement in function");
}
final public Value UnaryExpressionNotPlusMinus() throws ParseException {
Value value;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case TILDE:
jj_consume_token(TILDE);
value = UnaryExpression();
// FIXME: Not correct?
{
if (true)
return _createLocal("$bitwiseNot", Jimple.v().newNegExpr(
value));
}
break;
case BANG:
jj_consume_token(BANG);
value = UnaryExpression();
{
if (true)
return _createLocal("$booleanNot", Jimple.v().newNegExpr(
value));
}
break;
default:
jj_la1[66] = jj_gen;
if (jj_2_14(2147483647)) {
value = CastExpression();
{
if (true)
return value;
}
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
value = PostfixExpression();
{
if (true)
return value;
}
break;
default:
jj_la1[67] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
throw new Error("Missing return statement in function");
}
// This production is to determine lookahead only. The LOOKAHEAD
// specifications below are not used, but they are there just to
// indicate that we know about this.
final public void CastLookahead() throws ParseException {
if (jj_2_15(2)) {
jj_consume_token(LPAREN);
PrimitiveType();
} else if (jj_2_16(2147483647)) {
jj_consume_token(LPAREN);
Name();
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LPAREN:
jj_consume_token(LPAREN);
Name();
jj_consume_token(RPAREN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case TILDE:
jj_consume_token(TILDE);
break;
case BANG:
jj_consume_token(BANG);
break;
case LPAREN:
jj_consume_token(LPAREN);
break;
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
case THIS:
jj_consume_token(THIS);
break;
case SUPER:
jj_consume_token(SUPER);
break;
case NEW:
jj_consume_token(NEW);
break;
case FALSE:
case NULL:
case TRUE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
Literal();
break;
default:
jj_la1[68] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_la1[69] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
final public Value PostfixExpression() throws ParseException {
Value value;
Local copyLocal;
Local local;
value = PrimaryExpression();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INCR:
case DECR:
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INCR:
jj_consume_token(INCR);
// FIXME: may not be correct if used as lvalue.
copyLocal = _createLocal("$copy", value);
local = _createLocal("$increment", Jimple.v().newAddExpr(value,
IntConstant.v(1)));
if (value instanceof Local) {
_insert(Jimple.v().newAssignStmt((Local) value, local));
} else if (value instanceof FieldRef) {
_insert(Jimple.v().newAssignStmt((FieldRef) value, local));
} else {
{
if (true)
throw new RuntimeException("Illegal Increment");
}
}
value = copyLocal;
break;
case DECR:
jj_consume_token(DECR);
// FIXME: may not be correct if used as lvalue.
copyLocal = _createLocal("$copy", value);
local = _createLocal("$decrement", Jimple.v().newAddExpr(value,
IntConstant.v(-1)));
if (value instanceof Local) {
_insert(Jimple.v().newAssignStmt((Local) value, local));
} else if (value instanceof FieldRef) {
_insert(Jimple.v().newAssignStmt((FieldRef) value, local));
} else {
{
if (true)
throw new RuntimeException("Illegal Decrement");
}
}
value = copyLocal;
break;
default:
jj_la1[70] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_la1[71] = jj_gen;
;
}
{
if (true)
return value;
}
throw new Error("Missing return statement in function");
}
final public Value CastExpression() throws ParseException {
Value value;
Type type;
jj_consume_token(LPAREN);
type = Type();
jj_consume_token(RPAREN);
value = UnaryExpression();
{
if (true)
return _createLocal("$cast", Jimple.v()
.newCastExpr(value, type));
}
throw new Error("Missing return statement in function");
}
final public Value PrimaryExpression() throws ParseException {
Value value;
value = PrimaryPrefix();
label_31: while (true) {
if (jj_2_17(2)) {
;
} else {
break label_31;
}
value = PrimarySuffix(value);
}
{
if (true)
return value;
}
throw new Error("Missing return statement in function");
}
final public Value PrimaryPrefix() throws ParseException {
Value value;
String name;
Type type;
List argList;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case FALSE:
case NULL:
case TRUE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
value = Literal();
{
if (true)
return value;
}
break;
case THIS:
jj_consume_token(THIS);
{
if (true)
return _body.getThisLocal();
}
break;
case SUPER:
jj_consume_token(SUPER);
jj_consume_token(DOT);
jj_consume_token(IDENTIFIER);
{
if (true)
return null;
}
break;
case LPAREN:
jj_consume_token(LPAREN);
value = Expression();
jj_consume_token(RPAREN);
{
if (true)
return value;
}
break;
case NEW:
value = AllocationExpression();
{
if (true)
return value;
}
break;
default:
jj_la1[73] = jj_gen;
if (jj_2_18(2147483647)) {
type = ResultType();
jj_consume_token(DOT);
jj_consume_token(CLASS);
if (type instanceof VoidType) {
{
if (true)
return VoidClassConstant.v();
}
} else if (type instanceof IntType) {
{
if (true)
return IntClassConstant.v();
}
} else if (type instanceof LongType) {
{
if (true)
return LongClassConstant.v();
}
} else if (type instanceof BooleanType) {
{
if (true)
return BooleanClassConstant.v();
}
} else if (type instanceof ByteType) {
{
if (true)
return ByteClassConstant.v();
}
} else if (type instanceof CharType) {
{
if (true)
return CharClassConstant.v();
}
} else if (type instanceof DoubleType) {
{
if (true)
return DoubleClassConstant.v();
}
} else if (type instanceof FloatType) {
{
if (true)
return FloatClassConstant.v();
}
} else if (type instanceof ShortType) {
{
if (true)
return ShortClassConstant.v();
}
} else if (type instanceof NullType) {
{
if (true)
return VoidClassConstant.v();
} // Correct?
} else if (type instanceof ArrayType) {
{
if (true)
throw new RuntimeException(
"array.class not supported.");
}
} else if (type instanceof RefType) {
{
if (true)
return ClassConstant.v(type.toString());
}
}
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IDENTIFIER:
name = Name();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LPAREN:
argList = Arguments();
{
if (true)
return _processInstanceMethod(null, name,
argList);
}
break;
default:
jj_la1[72] = jj_gen;
// FIXME: what about class refs?
{
if (true)
return _processInstanceField(null, name);
}
}
break;
default:
jj_la1[74] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
throw new Error("Missing return statement in function");
}
final public Value PrimarySuffix(Value baseValue) throws ParseException {
Value value;
List argList;
String name;
if (jj_2_19(2)) {
jj_consume_token(DOT);
jj_consume_token(THIS);
} else if (jj_2_20(2)) {
jj_consume_token(DOT);
AllocationExpression();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
jj_consume_token(LBRACKET);
value = Expression();
jj_consume_token(RBRACKET);
{
if (true)
return _createLocal("$index", Jimple.v().newArrayRef(
baseValue, value));
}
break;
case DOT:
jj_consume_token(DOT);
name = Name();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LPAREN:
argList = Arguments();
{
if (true)
return _processInstanceMethod(baseValue, name,
argList);
}
break;
default:
jj_la1[75] = jj_gen;
{
if (true)
return _processInstanceField(baseValue, name);
}
}
break;
default:
jj_la1[76] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
throw new Error("Missing return statement in function");
}
final public Value Literal() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INTEGER_LITERAL:
jj_consume_token(INTEGER_LITERAL);
{
if (true)
return IntConstant.v(Integer.parseInt(token.image));
}
break;
case FLOATING_POINT_LITERAL:
jj_consume_token(FLOATING_POINT_LITERAL);
{
if (true)
return FloatConstant.v(Float.parseFloat(token.image));
}
break;
case CHARACTER_LITERAL:
jj_consume_token(CHARACTER_LITERAL);
// Is this correct?
{
if (true)
return IntConstant.v(Integer.parseInt(token.image));
}
break;
case STRING_LITERAL:
jj_consume_token(STRING_LITERAL);
String string = token.image;
// Snip off the front and back quote.
string = string.trim();
string = string.substring(1, string.length() - 1);
{
if (true)
return StringConstant.v(string);
}
break;
case TRUE:
jj_consume_token(TRUE);
{
if (true)
return IntConstant.v(1);
}
break;
case FALSE:
jj_consume_token(FALSE);
{
if (true)
return IntConstant.v(0);
}
break;
case NULL:
jj_consume_token(NULL);
{
if (true)
return NullConstant.v();
}
break;
default:
jj_la1[77] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
final public List Arguments() throws ParseException {
List list = new LinkedList();
Value value;
jj_consume_token(LPAREN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
Argument(list);
label_32: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[78] = jj_gen;
break label_32;
}
jj_consume_token(COMMA);
Argument(list);
}
break;
default:
jj_la1[79] = jj_gen;
;
}
jj_consume_token(RPAREN);
{
if (true)
return list;
}
throw new Error("Missing return statement in function");
}
final public void Argument(List list) throws ParseException {
Value value;
value = Expression();
list.add(value);
}
final public Value AllocationExpression() throws ParseException {
Value value;
String name;
Type type;
List argList;
jj_consume_token(NEW);
type = NamedType();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
value = ArrayDimsAndInits(type);
{
if (true)
return value;
}
break;
case LPAREN:
argList = Arguments();
SootClass theClass;
if (!(type instanceof RefType)) {
{
if (true)
throw new RuntimeException(
"Cannot instantiate primitive type");
}
}
theClass = ((RefType) type).getSootClass();
SootMethod method = SootUtilities.getMatchingMethod(theClass,
"<init>", argList);
Local local = _createLocal("$new", Jimple.v().newNewExpr(
(RefType) type));
_insert(Jimple.v().newInvokeStmt(
Jimple.v().newSpecialInvokeExpr(local, method, argList)));
{
if (true)
return local;
}
break;
default:
jj_la1[80] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
throw new Error("Missing return statement in function");
}
/*
* The third LOOKAHEAD specification below is to parse to PrimarySuffix
* if there is an expression between the "[...]".
*/
final public Value ArrayDimsAndInits(Type type) throws ParseException {
Value sizeValue;
List sizeValues = new LinkedList();
if (jj_2_23(2)) {
label_33: while (true) {
jj_consume_token(LBRACKET);
sizeValue = Expression();
jj_consume_token(RBRACKET);
sizeValues.add(sizeValue);
if (jj_2_21(2)) {
;
} else {
break label_33;
}
}
label_34: while (true) {
if (jj_2_22(2)) {
;
} else {
break label_34;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
type = type.makeArrayType();
}
if (sizeValues.size() == 1) {
{
if (true)
return Jimple.v().newNewArrayExpr(type, sizeValue);
}
} else {
// FIXME: Is this right?
for (int i = 0; i < sizeValues.size(); i++) {
type = type.makeArrayType();
}
{
if (true)
return Jimple.v().newNewMultiArrayExpr(
(ArrayType) type, sizeValues);
}
}
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
label_35: while (true) {
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[81] = jj_gen;
break label_35;
}
}
ArrayInitializer();
{
if (true)
throw new RuntimeException(
"Array Initializers not supported!");
}
break;
default:
jj_la1[82] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
throw new Error("Missing return statement in function");
}
/*
* Statement syntax follows.
*/
final public void StatementOrBlock() throws ParseException {
if (jj_2_24(2147483647)) {
EmptyStatement();
} else if (jj_2_25(2)) {
LabeledStatement();
} else if (jj_2_26(2147483647)) {
LocalVariableDeclaration();
jj_consume_token(SEMICOLON);
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACE:
Block();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
StatementExpression();
jj_consume_token(SEMICOLON);
break;
case SWITCH:
SwitchStatement();
break;
case IF:
IfStatement();
break;
case WHILE:
WhileStatement();
break;
case DO:
DoStatement();
break;
case FOR:
ForStatement();
break;
case BREAK:
BreakStatement();
break;
case CONTINUE:
ContinueStatement();
break;
case RETURN:
ReturnStatement();
break;
case THROW:
ThrowStatement();
break;
case SYNCHRONIZED:
SynchronizedStatement();
break;
case TRY:
TryStatement();
break;
default:
jj_la1[83] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
final public void LabeledStatement() throws ParseException {
jj_consume_token(IDENTIFIER);
jj_consume_token(COLON);
StatementOrBlock();
}
final public void Block() throws ParseException {
jj_consume_token(LBRACE);
label_36: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
jj_la1[84] = jj_gen;
break label_36;
}
BlockStatement();
}
jj_consume_token(RBRACE);
}
final public void BlockStatement() throws ParseException {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
StatementOrBlock();
break;
case CLASS:
UnmodifiedClassDeclaration();
break;
case INTERFACE:
UnmodifiedInterfaceDeclaration();
break;
default:
jj_la1[85] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
final public void LocalVariableDeclaration() throws ParseException {
Type type;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case FINAL:
jj_consume_token(FINAL);
break;
default:
jj_la1[86] = jj_gen;
;
}
type = Type();
VariableDeclarator(type);
label_37: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[87] = jj_gen;
break label_37;
}
jj_consume_token(COMMA);
VariableDeclarator(type);
}
}
final public void VariableDeclarator(Type type) throws ParseException {
String name;
jj_consume_token(IDENTIFIER);
name = token.image;
label_38: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACKET:
;
break;
default:
jj_la1[88] = jj_gen;
break label_38;
}
jj_consume_token(LBRACKET);
jj_consume_token(RBRACKET);
type = type.makeArrayType();
}
Local local = Jimple.v().newLocal(name, type);
_body.getLocals().add(local);
_bindNameToLocal(name, local);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASSIGN:
jj_consume_token(ASSIGN);
VariableInitializer(local);
break;
default:
jj_la1[89] = jj_gen;
;
}
}
final public void VariableInitializer(Local local) throws ParseException {
Value value;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case LBRACE:
ArrayInitializer();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
value = Expression();
_body.getUnits().insertBefore(
Jimple.v().newAssignStmt(local, value), _insertPoint);
break;
default:
jj_la1[90] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
final public void ArrayInitializer() throws ParseException {
jj_consume_token(LBRACE);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
VariableInitializer(null);
label_39: while (true) {
if (jj_2_27(2)) {
;
} else {
break label_39;
}
jj_consume_token(COMMA);
VariableInitializer(null);
}
break;
default:
jj_la1[91] = jj_gen;
;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
jj_consume_token(COMMA);
break;
default:
jj_la1[92] = jj_gen;
;
}
jj_consume_token(RBRACE);
}
final public void EmptyStatement() throws ParseException {
jj_consume_token(SEMICOLON);
_insert(Jimple.v().newNopStmt());
}
final public void StatementExpression() throws ParseException {
Value lvalue;
Value rvalue;
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INCR:
lvalue = PreIncrementExpression();
break;
case DECR:
lvalue = PreDecrementExpression();
break;
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
lvalue = PrimaryExpression();
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ASSIGN:
case INCR:
case DECR:
case PLUSASSIGN:
case MINUSASSIGN:
case STARASSIGN:
case SLASHASSIGN:
case ANDASSIGN:
case ORASSIGN:
case XORASSIGN:
case REMASSIGN:
case LSHIFTASSIGN:
case RSIGNEDSHIFTASSIGN:
case RUNSIGNEDSHIFTASSIGN:
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case INCR:
jj_consume_token(INCR);
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newAddExpr(lvalue, IntConstant.v(1))));
break;
case DECR:
jj_consume_token(DECR);
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newSubExpr(lvalue, IntConstant.v(1))));
break;
case ASSIGN:
jj_consume_token(ASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue, rvalue));
break;
case STARASSIGN:
jj_consume_token(STARASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newMulExpr(lvalue, rvalue)));
break;
case SLASHASSIGN:
jj_consume_token(SLASHASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newDivExpr(lvalue, rvalue)));
break;
case REMASSIGN:
jj_consume_token(REMASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newRemExpr(lvalue, rvalue)));
break;
case PLUSASSIGN:
jj_consume_token(PLUSASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newAddExpr(lvalue, rvalue)));
break;
case MINUSASSIGN:
jj_consume_token(MINUSASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newSubExpr(lvalue, rvalue)));
break;
case LSHIFTASSIGN:
jj_consume_token(LSHIFTASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newShlExpr(lvalue, rvalue)));
break;
case RSIGNEDSHIFTASSIGN:
jj_consume_token(RSIGNEDSHIFTASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newShrExpr(lvalue, rvalue)));
break;
case RUNSIGNEDSHIFTASSIGN:
jj_consume_token(RUNSIGNEDSHIFTASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newUshrExpr(lvalue, rvalue)));
break;
case ANDASSIGN:
jj_consume_token(ANDASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newAndExpr(lvalue, rvalue)));
break;
case XORASSIGN:
jj_consume_token(XORASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newXorExpr(lvalue, rvalue)));
break;
case ORASSIGN:
jj_consume_token(ORASSIGN);
rvalue = Expression();
_insert(Jimple.v().newAssignStmt((Local) lvalue,
Jimple.v().newOrExpr(lvalue, rvalue)));
break;
default:
jj_la1[93] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
break;
default:
jj_la1[94] = jj_gen;
;
}
// No assignment..
if (lvalue instanceof InvokeExpr) {
_insert(Jimple.v().newInvokeStmt(lvalue));
}
break;
default:
jj_la1[95] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
final public void SwitchStatement() throws ParseException {
Value expression;
Value value;
List valueList = new LinkedList();
List targetList = new LinkedList();
Stmt defaultBranchTarget = null;
// Jump to the switch.
Stmt switchStmt = Jimple.v().newNopStmt();
_insert(Jimple.v().newGotoStmt(switchStmt));
// continuation is the target for breaks:
Stmt continuation = Jimple.v().newNopStmt();
_breakStack.addFirst(continuation);
defaultBranchTarget = continuation;
jj_consume_token(SWITCH);
jj_consume_token(LPAREN);
expression = Expression();
jj_consume_token(RPAREN);
jj_consume_token(LBRACE);
label_40: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case CASE:
case _DEFAULT:
;
break;
default:
jj_la1[96] = jj_gen;
break label_40;
}
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case CASE:
jj_consume_token(CASE);
value = Expression();
jj_consume_token(COLON);
valueList.add(value);
Stmt branchTarget = Jimple.v().newNopStmt();
_insert(branchTarget);
targetList.add(branchTarget);
label_41: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
jj_la1[97] = jj_gen;
break label_41;
}
BlockStatement();
}
break;
case _DEFAULT:
jj_consume_token(_DEFAULT);
jj_consume_token(COLON);
defaultBranchTarget = Jimple.v().newNopStmt();
_insert(defaultBranchTarget);
label_42: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BREAK:
case BYTE:
case CHAR:
case CLASS:
case CONTINUE:
case DO:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case FOR:
case IF:
case INT:
case INTERFACE:
case LONG:
case NEW:
case NULL:
case RETURN:
case SHORT:
case SUPER:
case SWITCH:
case SYNCHRONIZED:
case THIS:
case THROW:
case TRUE:
case TRY:
case VOID:
case WHILE:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case LBRACE:
case SEMICOLON:
case INCR:
case DECR:
;
break;
default:
jj_la1[98] = jj_gen;
break label_42;
}
BlockStatement();
}
break;
default:
jj_la1[99] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
jj_consume_token(RBRACE);
// Clear the break.
_breakStack.removeFirst();
// Default break if we fall through everywhere.
_insert(Jimple.v().newGotoStmt(continuation));
_insert(switchStmt);
// FIXME: What if TableSwitch is better?
_insert(Jimple.v().newLookupSwitchStmt(expression, valueList,
targetList, defaultBranchTarget));
_insert(continuation);
}
final public void IfStatement() throws ParseException {
Value condition;
jj_consume_token(IF);
jj_consume_token(LPAREN);
condition = Expression();
jj_consume_token(RPAREN);
// Create the jumpto points
Stmt falseBranch = Jimple.v().newNopStmt();
Stmt continuation = Jimple.v().newNopStmt();
// Negate the condition.
_insert(Jimple.v().newIfStmt(
Jimple.v().newEqExpr(condition, IntConstant.v(0)), falseBranch));
StatementOrBlock();
_insert(Jimple.v().newGotoStmt(continuation));
_insert(falseBranch);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case ELSE:
jj_consume_token(ELSE);
StatementOrBlock();
break;
default:
jj_la1[100] = jj_gen;
;
}
_insert(continuation);
}
final public void WhileStatement() throws ParseException {
Value condition;
jj_consume_token(WHILE);
jj_consume_token(LPAREN);
Stmt start = Jimple.v().newNopStmt();
Stmt continuation = Jimple.v().newNopStmt();
_insert(start);
condition = Expression();
jj_consume_token(RPAREN);
_insert(Jimple.v()
.newIfStmt(Jimple.v().newEqExpr(condition, IntConstant.v(0)),
continuation));
// start is the target for continues:
_continueStack.addFirst(start);
// continuation is the target for breaks:
_breakStack.addFirst(continuation);
StatementOrBlock();
// remove continue and break bindings.
_continueStack.removeFirst();
_breakStack.removeFirst();
_insert(Jimple.v().newGotoStmt(start));
_insert(continuation);
}
final public void DoStatement() throws ParseException {
Value condition;
jj_consume_token(DO);
Stmt start = Jimple.v().newNopStmt();
Stmt continuation = Jimple.v().newNopStmt();
_insert(start);
// start is the target for continues:
_continueStack.addFirst(start);
// continuation is the target for breaks:
_breakStack.addFirst(continuation);
StatementOrBlock();
// remove continue and break bindings.
_continueStack.removeFirst();
_breakStack.removeFirst();
jj_consume_token(WHILE);
jj_consume_token(LPAREN);
condition = Expression();
_insert(Jimple.v().newIfStmt(
Jimple.v().newNeExpr(condition, IntConstant.v(0)), start));
jj_consume_token(RPAREN);
jj_consume_token(SEMICOLON);
}
final public void ForStatement() throws ParseException {
Value condition;
jj_consume_token(FOR);
jj_consume_token(LPAREN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FINAL:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
ForInit();
break;
default:
jj_la1[101] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
Stmt start = Jimple.v().newNopStmt();
Stmt continuation = Jimple.v().newNopStmt();
Stmt bodyStart = Jimple.v().newNopStmt();
Stmt updateStart = Jimple.v().newNopStmt();
_insert(start);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
condition = Expression();
_insert(Jimple.v().newIfStmt(
Jimple.v().newEqExpr(condition, IntConstant.v(0)),
continuation));
break;
default:
jj_la1[102] = jj_gen;
;
}
_insert(Jimple.v().newGotoStmt(bodyStart));
_insert(updateStart);
jj_consume_token(SEMICOLON);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
ForUpdate();
break;
default:
jj_la1[103] = jj_gen;
;
}
jj_consume_token(RPAREN);
_insert(Jimple.v().newGotoStmt(start));
_insert(bodyStart);
// updateStart is the target for continues:
_continueStack.addFirst(updateStart);
// continuation is the target for breaks:
_breakStack.addFirst(continuation);
StatementOrBlock();
// Get rid of the continue and break bindings.
_continueStack.removeFirst();
_breakStack.removeFirst();
_insert(Jimple.v().newGotoStmt(updateStart));
_insert(continuation);
}
final public void ForInit() throws ParseException {
if (jj_2_28(2147483647)) {
LocalVariableDeclaration();
} else {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case INCR:
case DECR:
StatementExpressionList();
break;
default:
jj_la1[104] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
}
final public void StatementExpressionList() throws ParseException {
StatementExpression();
label_43: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case COMMA:
;
break;
default:
jj_la1[105] = jj_gen;
break label_43;
}
jj_consume_token(COMMA);
StatementExpression();
}
}
final public void ForUpdate() throws ParseException {
StatementExpressionList();
}
final public void BreakStatement() throws ParseException {
jj_consume_token(BREAK);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
default:
jj_la1[106] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
Stmt stmt = (Stmt) _breakStack.getFirst();
_insert(Jimple.v().newGotoStmt(stmt));
}
final public void ContinueStatement() throws ParseException {
jj_consume_token(CONTINUE);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case IDENTIFIER:
jj_consume_token(IDENTIFIER);
break;
default:
jj_la1[107] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
Stmt stmt = (Stmt) _continueStack.getFirst();
_insert(Jimple.v().newGotoStmt(stmt));
}
final public void ReturnStatement() throws ParseException {
Value value = null;
jj_consume_token(RETURN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FALSE:
case FLOAT:
case INT:
case LONG:
case NEW:
case NULL:
case SHORT:
case SUPER:
case THIS:
case TRUE:
case VOID:
case INTEGER_LITERAL:
case FLOATING_POINT_LITERAL:
case CHARACTER_LITERAL:
case STRING_LITERAL:
case IDENTIFIER:
case LPAREN:
case BANG:
case TILDE:
case INCR:
case DECR:
case PLUS:
case MINUS:
value = Expression();
break;
default:
jj_la1[108] = jj_gen;
;
}
jj_consume_token(SEMICOLON);
if (value == null) {
_insert(Jimple.v().newReturnVoidStmt());
} else {
_insert(Jimple.v().newReturnStmt(value));
}
}
final public void ThrowStatement() throws ParseException {
Value value;
jj_consume_token(THROW);
value = Expression();
jj_consume_token(SEMICOLON);
_insert(Jimple.v().newThrowStmt(value));
}
final public void SynchronizedStatement() throws ParseException {
jj_consume_token(SYNCHRONIZED);
jj_consume_token(LPAREN);
Expression();
jj_consume_token(RPAREN);
Block();
}
final public void TryStatement() throws ParseException {
Type type;
jj_consume_token(TRY);
Stmt blockStart = Jimple.v().newNopStmt();
_insert(blockStart);
Block();
Stmt blockEnd = Jimple.v().newNopStmt();
_insert(blockEnd);
Stmt continuation = Jimple.v().newNopStmt();
_insert(Jimple.v().newGotoStmt(continuation));
label_44: while (true) {
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case CATCH:
;
break;
default:
jj_la1[109] = jj_gen;
break label_44;
}
jj_consume_token(CATCH);
jj_consume_token(LPAREN);
Stmt trapStart = Jimple.v().newNopStmt();
_insert(trapStart);
type = FormalParameter();
jj_consume_token(RPAREN);
Block();
if (!(type instanceof RefType)) {
{
if (true)
throw new RuntimeException("Cannot catch " + type);
}
}
RefType refType = (RefType) type;
SootClass exceptionClass = refType.getSootClass();
if (!SootUtilities.derivesFrom(exceptionClass, Scene.v()
.loadClassAndSupport("java.lang.Throwable"))) {
{
if (true)
throw new RuntimeException("Cannot catch " + type);
}
}
Stmt trapEnd = Jimple.v().newNopStmt();
_insert(trapEnd);
_body.getTraps().add(
Jimple.v().newTrap(exceptionClass, blockStart, blockEnd,
trapStart));
}
_insert(continuation);
}
final private boolean jj_2_1(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_1();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(0, xla);
}
}
final private boolean jj_2_2(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_2();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(1, xla);
}
}
final private boolean jj_2_3(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_3();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(2, xla);
}
}
final private boolean jj_2_4(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_4();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(3, xla);
}
}
final private boolean jj_2_5(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_5();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(4, xla);
}
}
final private boolean jj_2_6(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_6();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(5, xla);
}
}
final private boolean jj_2_7(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_7();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(6, xla);
}
}
final private boolean jj_2_8(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_8();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(7, xla);
}
}
final private boolean jj_2_9(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_9();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(8, xla);
}
}
final private boolean jj_2_10(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_10();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(9, xla);
}
}
final private boolean jj_2_11(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_11();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(10, xla);
}
}
final private boolean jj_2_12(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_12();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(11, xla);
}
}
final private boolean jj_2_13(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_13();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(12, xla);
}
}
final private boolean jj_2_14(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_14();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(13, xla);
}
}
final private boolean jj_2_15(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_15();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(14, xla);
}
}
final private boolean jj_2_16(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_16();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(15, xla);
}
}
final private boolean jj_2_17(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_17();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(16, xla);
}
}
final private boolean jj_2_18(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_18();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(17, xla);
}
}
final private boolean jj_2_19(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_19();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(18, xla);
}
}
final private boolean jj_2_20(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_20();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(19, xla);
}
}
final private boolean jj_2_21(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_21();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(20, xla);
}
}
final private boolean jj_2_22(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_22();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(21, xla);
}
}
final private boolean jj_2_23(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_23();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(22, xla);
}
}
final private boolean jj_2_24(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_24();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(23, xla);
}
}
final private boolean jj_2_25(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_25();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(24, xla);
}
}
final private boolean jj_2_26(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_26();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(25, xla);
}
}
final private boolean jj_2_27(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_27();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(26, xla);
}
}
final private boolean jj_2_28(int xla) {
jj_la = xla;
jj_lastpos = jj_scanpos = token;
try {
return !jj_3_28();
} catch (LookaheadSuccess ls) {
return true;
} finally {
jj_save(27, xla);
}
}
final private boolean jj_3R_81() {
if (jj_scan_token(DOUBLE))
return true;
return false;
}
final private boolean jj_3R_80() {
if (jj_scan_token(FLOAT))
return true;
return false;
}
final private boolean jj_3R_79() {
if (jj_scan_token(LONG))
return true;
return false;
}
final private boolean jj_3R_78() {
if (jj_scan_token(INT))
return true;
return false;
}
final private boolean jj_3R_77() {
if (jj_scan_token(SHORT))
return true;
return false;
}
final private boolean jj_3R_76() {
if (jj_scan_token(BYTE))
return true;
return false;
}
final private boolean jj_3R_75() {
if (jj_scan_token(CHAR))
return true;
return false;
}
final private boolean jj_3R_74() {
if (jj_scan_token(BOOLEAN))
return true;
return false;
}
final private boolean jj_3R_58() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_74()) {
jj_scanpos = xsp;
if (jj_3R_75()) {
jj_scanpos = xsp;
if (jj_3R_76()) {
jj_scanpos = xsp;
if (jj_3R_77()) {
jj_scanpos = xsp;
if (jj_3R_78()) {
jj_scanpos = xsp;
if (jj_3R_79()) {
jj_scanpos = xsp;
if (jj_3R_80()) {
jj_scanpos = xsp;
if (jj_3R_81())
return true;
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3_27() {
if (jj_scan_token(COMMA))
return true;
if (jj_3R_65())
return true;
return false;
}
final private boolean jj_3R_215() {
if (jj_scan_token(INCR))
return true;
return false;
}
final private boolean jj_3R_214() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_215()) {
jj_scanpos = xsp;
if (jj_3R_216())
return true;
}
return false;
}
final private boolean jj_3R_88() {
if (jj_scan_token(LBRACKET))
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3R_213() {
if (jj_3R_55())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_214())
jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_64() {
if (jj_3R_87())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_88()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3_16() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_50())
return true;
if (jj_scan_token(LBRACKET))
return true;
return false;
}
final private boolean jj_3R_166() {
if (jj_3R_55())
return true;
return false;
}
final private boolean jj_3R_165() {
if (jj_3R_171())
return true;
return false;
}
final private boolean jj_3R_164() {
if (jj_3R_170())
return true;
return false;
}
final private boolean jj_3R_146() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_164()) {
jj_scanpos = xsp;
if (jj_3R_165()) {
jj_scanpos = xsp;
if (jj_3R_166())
return true;
}
}
return false;
}
final private boolean jj_3R_73() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_50())
return true;
if (jj_scan_token(RPAREN))
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(87)) {
jj_scanpos = xsp;
if (jj_scan_token(86)) {
jj_scanpos = xsp;
if (jj_scan_token(74)) {
jj_scanpos = xsp;
if (jj_scan_token(71)) {
jj_scanpos = xsp;
if (jj_scan_token(54)) {
jj_scanpos = xsp;
if (jj_scan_token(51)) {
jj_scanpos = xsp;
if (jj_scan_token(42)) {
jj_scanpos = xsp;
if (jj_3R_101())
return true;
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_72() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_50())
return true;
if (jj_scan_token(LBRACKET))
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3R_57() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_15()) {
jj_scanpos = xsp;
if (jj_3R_72()) {
jj_scanpos = xsp;
if (jj_3R_73())
return true;
}
}
return false;
}
final private boolean jj_3_15() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_58())
return true;
return false;
}
final private boolean jj_3_14() {
if (jj_3R_57())
return true;
return false;
}
final private boolean jj_3R_104() {
if (jj_3R_50())
return true;
return false;
}
final private boolean jj_3R_178() {
if (jj_3R_65())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_27()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_144() {
if (jj_scan_token(SEMICOLON))
return true;
return false;
}
final private boolean jj_3R_87() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_103()) {
jj_scanpos = xsp;
if (jj_3R_104())
return true;
}
return false;
}
final private boolean jj_3R_103() {
if (jj_3R_58())
return true;
return false;
}
final private boolean jj_3R_208() {
if (jj_3R_213())
return true;
return false;
}
final private boolean jj_3R_105() {
if (jj_scan_token(LBRACE))
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_178())
jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(81))
jj_scanpos = xsp;
if (jj_scan_token(RBRACE))
return true;
return false;
}
final private boolean jj_3R_207() {
if (jj_3R_212())
return true;
return false;
}
final private boolean jj_3_12() {
if (jj_scan_token(THIS))
return true;
if (jj_3R_56())
return true;
if (jj_scan_token(SEMICOLON))
return true;
return false;
}
final private boolean jj_3R_46() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(50))
jj_scanpos = xsp;
if (jj_3R_66())
return true;
return false;
}
final private boolean jj_3R_206() {
if (jj_scan_token(BANG))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3_11() {
if (jj_3R_55())
return true;
if (jj_scan_token(DOT))
return true;
return false;
}
final private boolean jj_3_10() {
if (jj_3R_54())
return true;
return false;
}
final private boolean jj_3R_90() {
if (jj_3R_62())
return true;
return false;
}
final private boolean jj_3R_69() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_11())
jj_scanpos = xsp;
if (jj_scan_token(SUPER))
return true;
if (jj_3R_56())
return true;
if (jj_scan_token(SEMICOLON))
return true;
return false;
}
final private boolean jj_3R_205() {
if (jj_scan_token(TILDE))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_201() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_205()) {
jj_scanpos = xsp;
if (jj_3R_206()) {
jj_scanpos = xsp;
if (jj_3R_207()) {
jj_scanpos = xsp;
if (jj_3R_208())
return true;
}
}
}
return false;
}
final private boolean jj_3R_65() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_89()) {
jj_scanpos = xsp;
if (jj_3R_90())
return true;
}
return false;
}
final private boolean jj_3R_89() {
if (jj_3R_105())
return true;
return false;
}
final private boolean jj_3R_68() {
if (jj_scan_token(THIS))
return true;
if (jj_3R_56())
return true;
if (jj_scan_token(SEMICOLON))
return true;
return false;
}
final private boolean jj_3R_54() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_68()) {
jj_scanpos = xsp;
if (jj_3R_69())
return true;
}
return false;
}
final private boolean jj_3R_157() {
if (jj_scan_token(TRY))
return true;
return false;
}
final private boolean jj_3R_171() {
if (jj_scan_token(DECR))
return true;
if (jj_3R_55())
return true;
return false;
}
final private boolean jj_3R_145() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(29))
jj_scanpos = xsp;
if (jj_3R_64())
return true;
return false;
}
final private boolean jj_3R_156() {
if (jj_scan_token(SYNCHRONIZED))
return true;
return false;
}
final private boolean jj_3R_113() {
if (jj_3R_124())
return true;
return false;
}
final private boolean jj_3R_112() {
if (jj_3R_123())
return true;
return false;
}
final private boolean jj_3R_91() {
if (jj_3R_106())
return true;
return false;
}
final private boolean jj_3R_106() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_111()) {
jj_scanpos = xsp;
if (jj_3R_112()) {
jj_scanpos = xsp;
if (jj_3R_113())
return true;
}
}
return false;
}
final private boolean jj_3R_111() {
if (jj_3R_122())
return true;
return false;
}
final private boolean jj_3R_170() {
if (jj_scan_token(INCR))
return true;
if (jj_3R_55())
return true;
return false;
}
final private boolean jj_3R_155() {
if (jj_scan_token(THROW))
return true;
return false;
}
final private boolean jj_3R_66() {
if (jj_scan_token(LBRACE))
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_91()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(RBRACE))
return true;
return false;
}
final private boolean jj_3R_196() {
if (jj_3R_201())
return true;
return false;
}
final private boolean jj_3R_195() {
if (jj_3R_171())
return true;
return false;
}
final private boolean jj_3R_63() {
if (jj_scan_token(IDENTIFIER))
return true;
if (jj_scan_token(COLON))
return true;
return false;
}
final private boolean jj_3R_194() {
if (jj_3R_170())
return true;
return false;
}
final private boolean jj_3R_193() {
if (jj_scan_token(MINUS))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_192() {
if (jj_scan_token(PLUS))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_186() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_192()) {
jj_scanpos = xsp;
if (jj_3R_193()) {
jj_scanpos = xsp;
if (jj_3R_194()) {
jj_scanpos = xsp;
if (jj_3R_195()) {
jj_scanpos = xsp;
if (jj_3R_196())
return true;
}
}
}
}
return false;
}
final private boolean jj_3R_154() {
if (jj_scan_token(RETURN))
return true;
return false;
}
final private boolean jj_3R_141() {
if (jj_3R_157())
return true;
return false;
}
final private boolean jj_3R_140() {
if (jj_3R_156())
return true;
return false;
}
final private boolean jj_3R_139() {
if (jj_3R_155())
return true;
return false;
}
final private boolean jj_3R_138() {
if (jj_3R_154())
return true;
return false;
}
final private boolean jj_3R_211() {
if (jj_scan_token(REM))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_137() {
if (jj_3R_153())
return true;
return false;
}
final private boolean jj_3R_136() {
if (jj_3R_152())
return true;
return false;
}
final private boolean jj_3R_153() {
if (jj_scan_token(CONTINUE))
return true;
return false;
}
final private boolean jj_3R_210() {
if (jj_scan_token(SLASH))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_135() {
if (jj_3R_151())
return true;
return false;
}
final private boolean jj_3_9() {
if (jj_3R_51())
return true;
return false;
}
final private boolean jj_3R_134() {
if (jj_3R_150())
return true;
return false;
}
final private boolean jj_3R_209() {
if (jj_scan_token(STAR))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3R_202() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_209()) {
jj_scanpos = xsp;
if (jj_3R_210()) {
jj_scanpos = xsp;
if (jj_3R_211())
return true;
}
}
return false;
}
final private boolean jj_3R_53() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(50)) {
jj_scanpos = xsp;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45))
return true;
}
}
}
}
}
return false;
}
final private boolean jj_3R_133() {
if (jj_3R_149())
return true;
return false;
}
final private boolean jj_3_8() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_53()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(INTERFACE))
return true;
return false;
}
final private boolean jj_3_26() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(29))
jj_scanpos = xsp;
if (jj_3R_64())
return true;
if (jj_scan_token(IDENTIFIER))
return true;
return false;
}
final private boolean jj_3R_52() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(50)) {
jj_scanpos = xsp;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45))
return true;
}
}
}
}
}
return false;
}
final private boolean jj_3R_132() {
if (jj_3R_148())
return true;
return false;
}
final private boolean jj_3R_152() {
if (jj_scan_token(BREAK))
return true;
return false;
}
final private boolean jj_3R_184() {
if (jj_3R_186())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_202()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3_7() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_52()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_131() {
if (jj_3R_147())
return true;
return false;
}
final private boolean jj_3R_130() {
if (jj_3R_146())
return true;
return false;
}
final private boolean jj_3_24() {
if (jj_scan_token(SEMICOLON))
return true;
return false;
}
final private boolean jj_3R_129() {
if (jj_3R_66())
return true;
return false;
}
final private boolean jj_3R_128() {
if (jj_3R_145())
return true;
return false;
}
final private boolean jj_3R_204() {
if (jj_scan_token(MINUS))
return true;
if (jj_3R_184())
return true;
return false;
}
final private boolean jj_3_28() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(29))
jj_scanpos = xsp;
if (jj_3R_64())
return true;
if (jj_scan_token(IDENTIFIER))
return true;
return false;
}
final private boolean jj_3_25() {
if (jj_3R_63())
return true;
return false;
}
final private boolean jj_3R_203() {
if (jj_scan_token(PLUS))
return true;
if (jj_3R_184())
return true;
return false;
}
final private boolean jj_3R_197() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_203()) {
jj_scanpos = xsp;
if (jj_3R_204())
return true;
}
return false;
}
final private boolean jj_3R_122() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_127()) {
jj_scanpos = xsp;
if (jj_3_25()) {
jj_scanpos = xsp;
if (jj_3R_128()) {
jj_scanpos = xsp;
if (jj_3R_129()) {
jj_scanpos = xsp;
if (jj_3R_130()) {
jj_scanpos = xsp;
if (jj_3R_131()) {
jj_scanpos = xsp;
if (jj_3R_132()) {
jj_scanpos = xsp;
if (jj_3R_133()) {
jj_scanpos = xsp;
if (jj_3R_134()) {
jj_scanpos = xsp;
if (jj_3R_135()) {
jj_scanpos = xsp;
if (jj_3R_136()) {
jj_scanpos = xsp;
if (jj_3R_137()) {
jj_scanpos = xsp;
if (jj_3R_138()) {
jj_scanpos = xsp;
if (jj_3R_139()) {
jj_scanpos = xsp;
if (jj_3R_140()) {
jj_scanpos = xsp;
if (jj_3R_141())
return true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_127() {
if (jj_3R_144())
return true;
return false;
}
final private boolean jj_3R_180() {
if (jj_3R_184())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_197()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_124() {
if (jj_scan_token(INTERFACE))
return true;
return false;
}
final private boolean jj_3R_200() {
if (jj_scan_token(RUNSIGNEDSHIFT))
return true;
if (jj_3R_180())
return true;
return false;
}
final private boolean jj_3R_175() {
if (jj_scan_token(LBRACKET))
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3R_199() {
if (jj_scan_token(RSIGNEDSHIFT))
return true;
if (jj_3R_180())
return true;
return false;
}
final private boolean jj_3R_172() {
Token xsp;
if (jj_3R_175())
return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_175()) {
jj_scanpos = xsp;
break;
}
}
if (jj_3R_105())
return true;
return false;
}
final private boolean jj_3R_198() {
if (jj_scan_token(LSHIFT))
return true;
if (jj_3R_180())
return true;
return false;
}
final private boolean jj_3R_187() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_198()) {
jj_scanpos = xsp;
if (jj_3R_199()) {
jj_scanpos = xsp;
if (jj_3R_200())
return true;
}
}
return false;
}
final private boolean jj_3_22() {
if (jj_scan_token(LBRACKET))
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3_21() {
if (jj_scan_token(LBRACKET))
return true;
if (jj_3R_62())
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3R_177() {
if (jj_3R_180())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_187()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_67() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45)) {
jj_scanpos = xsp;
if (jj_scan_token(50)) {
jj_scanpos = xsp;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(41)) {
jj_scanpos = xsp;
if (jj_scan_token(53))
return true;
}
}
}
}
}
}
}
return false;
}
final private boolean jj_3_6() {
if (jj_3R_51())
return true;
return false;
}
final private boolean jj_3R_191() {
if (jj_scan_token(GE))
return true;
if (jj_3R_177())
return true;
return false;
}
final private boolean jj_3R_49() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45))
return true;
}
}
return false;
}
final private boolean jj_3R_51() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_67()) {
jj_scanpos = xsp;
break;
}
}
if (jj_3R_60())
return true;
if (jj_scan_token(IDENTIFIER))
return true;
if (jj_scan_token(LPAREN))
return true;
return false;
}
final private boolean jj_3R_181() {
if (jj_scan_token(INSTANCEOF))
return true;
if (jj_3R_64())
return true;
return false;
}
final private boolean jj_3_5() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_49())
jj_scanpos = xsp;
if (jj_3R_50())
return true;
if (jj_scan_token(LPAREN))
return true;
return false;
}
final private boolean jj_3R_167() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_23()) {
jj_scanpos = xsp;
if (jj_3R_172())
return true;
}
return false;
}
final private boolean jj_3R_48() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(50)) {
jj_scanpos = xsp;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45))
return true;
}
}
}
}
}
return false;
}
final private boolean jj_3_23() {
Token xsp;
if (jj_3_21())
return true;
while (true) {
xsp = jj_scanpos;
if (jj_3_21()) {
jj_scanpos = xsp;
break;
}
}
while (true) {
xsp = jj_scanpos;
if (jj_3_22()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_190() {
if (jj_scan_token(LE))
return true;
if (jj_3R_177())
return true;
return false;
}
final private boolean jj_3_4() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_48()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(INTERFACE))
return true;
return false;
}
final private boolean jj_3R_47() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(50)) {
jj_scanpos = xsp;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(47)) {
jj_scanpos = xsp;
if (jj_scan_token(46)) {
jj_scanpos = xsp;
if (jj_scan_token(45))
return true;
}
}
}
}
}
return false;
}
final private boolean jj_3R_189() {
if (jj_scan_token(GT))
return true;
if (jj_3R_177())
return true;
return false;
}
final private boolean jj_3_3() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_47()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_188() {
if (jj_scan_token(LT))
return true;
if (jj_3R_177())
return true;
return false;
}
final private boolean jj_3R_185() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_188()) {
jj_scanpos = xsp;
if (jj_3R_189()) {
jj_scanpos = xsp;
if (jj_3R_190()) {
jj_scanpos = xsp;
if (jj_3R_191())
return true;
}
}
}
return false;
}
final private boolean jj_3R_151() {
if (jj_scan_token(FOR))
return true;
return false;
}
final private boolean jj_3_2() {
if (jj_3R_46())
return true;
return false;
}
final private boolean jj_3R_174() {
if (jj_3R_177())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_185()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_169() {
if (jj_3R_174())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_181())
jj_scanpos = xsp;
return false;
}
final private boolean jj_3R_159() {
if (jj_3R_56())
return true;
return false;
}
final private boolean jj_3R_158() {
if (jj_3R_167())
return true;
return false;
}
final private boolean jj_3R_100() {
if (jj_scan_token(COMMA))
return true;
if (jj_3R_99())
return true;
return false;
}
final private boolean jj_3R_150() {
if (jj_scan_token(DO))
return true;
return false;
}
final private boolean jj_3R_123() {
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_183() {
if (jj_scan_token(NE))
return true;
if (jj_3R_169())
return true;
return false;
}
final private boolean jj_3R_61() {
if (jj_scan_token(NEW))
return true;
if (jj_3R_87())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_158()) {
jj_scanpos = xsp;
if (jj_3R_159())
return true;
}
return false;
}
final private boolean jj_3R_182() {
if (jj_scan_token(EQ))
return true;
if (jj_3R_169())
return true;
return false;
}
final private boolean jj_3R_179() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_182()) {
jj_scanpos = xsp;
if (jj_3R_183())
return true;
}
return false;
}
final private boolean jj_3R_45() {
Token xsp;
xsp = jj_scanpos;
if (jj_scan_token(13)) {
jj_scanpos = xsp;
if (jj_scan_token(29)) {
jj_scanpos = xsp;
if (jj_scan_token(47))
return true;
}
}
return false;
}
final private boolean jj_3R_163() {
if (jj_3R_169())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_179()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3_1() {
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_45()) {
jj_scanpos = xsp;
break;
}
}
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_99() {
if (jj_3R_62())
return true;
return false;
}
final private boolean jj_3R_71() {
if (jj_3R_99())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_100()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_176() {
if (jj_scan_token(BIT_AND))
return true;
if (jj_3R_163())
return true;
return false;
}
final private boolean jj_3R_56() {
if (jj_scan_token(LPAREN))
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_71())
jj_scanpos = xsp;
if (jj_scan_token(RPAREN))
return true;
return false;
}
final private boolean jj_3R_143() {
if (jj_3R_163())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_176()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_149() {
if (jj_scan_token(WHILE))
return true;
return false;
}
final private boolean jj_3R_120() {
if (jj_scan_token(NULL))
return true;
return false;
}
final private boolean jj_3R_173() {
if (jj_scan_token(XOR))
return true;
if (jj_3R_143())
return true;
return false;
}
final private boolean jj_3R_119() {
if (jj_scan_token(FALSE))
return true;
return false;
}
final private boolean jj_3R_118() {
if (jj_scan_token(TRUE))
return true;
return false;
}
final private boolean jj_3R_126() {
if (jj_3R_143())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_173()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_117() {
if (jj_scan_token(STRING_LITERAL))
return true;
return false;
}
final private boolean jj_3R_168() {
if (jj_scan_token(BIT_OR))
return true;
if (jj_3R_126())
return true;
return false;
}
final private boolean jj_3R_116() {
if (jj_scan_token(CHARACTER_LITERAL))
return true;
return false;
}
final private boolean jj_3R_148() {
if (jj_scan_token(IF))
return true;
return false;
}
final private boolean jj_3R_115() {
if (jj_scan_token(FLOATING_POINT_LITERAL))
return true;
return false;
}
final private boolean jj_3R_121() {
if (jj_3R_126())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_168()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_107() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_114()) {
jj_scanpos = xsp;
if (jj_3R_115()) {
jj_scanpos = xsp;
if (jj_3R_116()) {
jj_scanpos = xsp;
if (jj_3R_117()) {
jj_scanpos = xsp;
if (jj_3R_118()) {
jj_scanpos = xsp;
if (jj_3R_119()) {
jj_scanpos = xsp;
if (jj_3R_120())
return true;
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_114() {
if (jj_scan_token(INTEGER_LITERAL))
return true;
return false;
}
final private boolean jj_3R_161() {
return false;
}
final private boolean jj_3R_162() {
if (jj_scan_token(SC_AND))
return true;
if (jj_3R_121())
return true;
return false;
}
final private boolean jj_3R_160() {
if (jj_3R_56())
return true;
return false;
}
final private boolean jj_3R_110() {
if (jj_3R_121())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_162()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_83() {
if (jj_scan_token(DOT))
return true;
if (jj_3R_50())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_160()) {
jj_scanpos = xsp;
if (jj_3R_161())
return true;
}
return false;
}
final private boolean jj_3R_142() {
if (jj_scan_token(SC_OR))
return true;
if (jj_3R_110())
return true;
return false;
}
final private boolean jj_3R_82() {
if (jj_scan_token(LBRACKET))
return true;
if (jj_3R_62())
return true;
if (jj_scan_token(RBRACKET))
return true;
return false;
}
final private boolean jj_3_20() {
if (jj_scan_token(DOT))
return true;
if (jj_3R_61())
return true;
return false;
}
final private boolean jj_3R_59() {
Token xsp;
xsp = jj_scanpos;
if (jj_3_19()) {
jj_scanpos = xsp;
if (jj_3_20()) {
jj_scanpos = xsp;
if (jj_3R_82()) {
jj_scanpos = xsp;
if (jj_3R_83())
return true;
}
}
}
return false;
}
final private boolean jj_3_19() {
if (jj_scan_token(DOT))
return true;
if (jj_scan_token(THIS))
return true;
return false;
}
final private boolean jj_3R_102() {
if (jj_3R_110())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3R_142()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_109() {
return false;
}
final private boolean jj_3R_108() {
if (jj_3R_56())
return true;
return false;
}
final private boolean jj_3R_98() {
if (jj_3R_50())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_108()) {
jj_scanpos = xsp;
if (jj_3R_109())
return true;
}
return false;
}
final private boolean jj_3R_147() {
if (jj_scan_token(SWITCH))
return true;
return false;
}
final private boolean jj_3R_125() {
if (jj_scan_token(HOOK))
return true;
if (jj_3R_62())
return true;
if (jj_scan_token(COLON))
return true;
if (jj_3R_62())
return true;
return false;
}
final private boolean jj_3R_86() {
if (jj_3R_102())
return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_125())
jj_scanpos = xsp;
return false;
}
final private boolean jj_3_18() {
if (jj_3R_60())
return true;
if (jj_scan_token(DOT))
return true;
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_97() {
if (jj_3R_60())
return true;
if (jj_scan_token(DOT))
return true;
if (jj_scan_token(CLASS))
return true;
return false;
}
final private boolean jj_3R_96() {
if (jj_3R_61())
return true;
return false;
}
final private boolean jj_3R_62() {
if (jj_3R_86())
return true;
return false;
}
final private boolean jj_3R_95() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_62())
return true;
if (jj_scan_token(RPAREN))
return true;
return false;
}
final private boolean jj_3R_94() {
if (jj_scan_token(SUPER))
return true;
if (jj_scan_token(DOT))
return true;
if (jj_scan_token(IDENTIFIER))
return true;
return false;
}
final private boolean jj_3R_93() {
if (jj_scan_token(THIS))
return true;
return false;
}
final private boolean jj_3R_101() {
if (jj_3R_107())
return true;
return false;
}
final private boolean jj_3R_70() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_92()) {
jj_scanpos = xsp;
if (jj_3R_93()) {
jj_scanpos = xsp;
if (jj_3R_94()) {
jj_scanpos = xsp;
if (jj_3R_95()) {
jj_scanpos = xsp;
if (jj_3R_96()) {
jj_scanpos = xsp;
if (jj_3R_97()) {
jj_scanpos = xsp;
if (jj_3R_98())
return true;
}
}
}
}
}
}
return false;
}
final private boolean jj_3R_92() {
if (jj_3R_107())
return true;
return false;
}
final private boolean jj_3_17() {
if (jj_3R_59())
return true;
return false;
}
final private boolean jj_3R_55() {
if (jj_3R_70())
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_17()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_212() {
if (jj_scan_token(LPAREN))
return true;
if (jj_3R_64())
return true;
if (jj_scan_token(RPAREN))
return true;
if (jj_3R_186())
return true;
return false;
}
final private boolean jj_3_13() {
if (jj_scan_token(DOT))
return true;
if (jj_scan_token(IDENTIFIER))
return true;
return false;
}
final private boolean jj_3R_50() {
if (jj_scan_token(IDENTIFIER))
return true;
Token xsp;
while (true) {
xsp = jj_scanpos;
if (jj_3_13()) {
jj_scanpos = xsp;
break;
}
}
return false;
}
final private boolean jj_3R_85() {
if (jj_3R_64())
return true;
return false;
}
final private boolean jj_3R_84() {
if (jj_scan_token(VOID))
return true;
return false;
}
final private boolean jj_3R_60() {
Token xsp;
xsp = jj_scanpos;
if (jj_3R_84()) {
jj_scanpos = xsp;
if (jj_3R_85())
return true;
}
return false;
}
final private boolean jj_3R_216() {
if (jj_scan_token(DECR))
return true;
return false;
}
public JavaFragmentParserTokenManager token_source;
JavaCharStream jj_input_stream;
public Token token, jj_nt;
private int jj_ntk;
private Token jj_scanpos, jj_lastpos;
private int jj_la;
public boolean lookingAhead = false;
private boolean jj_semLA;
private int jj_gen;
final private int[] jj_la1 = new int[110];
static private int[] jj_la1_0;
static private int[] jj_la1_1;
static private int[] jj_la1_2;
static private int[] jj_la1_3;
static {
jj_la1_0();
jj_la1_1();
jj_la1_2();
jj_la1_3();
}
private static void jj_la1_0() {
jj_la1_0 = new int[] { 0x0, 0x0, 0x20102000, 0x0, 0x2000, 0x20002000,
0x20002000, 0x8000000, 0x0, 0xa2196000, 0x20002000, 0x20002000,
0xa2094000, 0x20002000, 0x20002000, 0x2000, 0x2000, 0x20002000,
0x20002000, 0x8000000, 0xa2196000, 0xa2094000, 0x20000000,
0x20000000, 0x0, 0x0, 0x0, 0x20002000, 0x20002000, 0x0, 0x0,
0x0, 0x0, 0xa2094000, 0x20000000, 0x0, 0x0, 0x0, 0x0,
0xb359c000, 0x92094000, 0x0, 0x82094000, 0x0, 0x82094000,
0x82094000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x92094000, 0x0,
0x92094000, 0x10000000, 0x0, 0x0, 0x0, 0x0, 0x10000000, 0x0,
0x0, 0x0, 0x10000000, 0x0, 0x92094000, 0x0, 0x0, 0x0,
0x9349c000, 0xb359c000, 0xb359c000, 0x20000000, 0x0, 0x0, 0x0,
0x92094000, 0x92094000, 0x0, 0x0, 0x0, 0x92094000, 0x820000,
0xb359c000, 0xb359c000, 0x820000, 0x4000000, 0xb2094000,
0x92094000, 0x92094000, 0x92094000, 0x0, 0x0, 0x0, 0x92094000,
0x40000, };
}
private static void jj_la1_1() {
jj_la1_1 = new int[] { 0x1000, 0x10, 0x8080, 0x0, 0x8080, 0x8000,
0x8000, 0x0, 0x8, 0x3226e3c0, 0x4e000, 0x4e000, 0x2206e140,
0x24e200, 0x24e200, 0x8000, 0x8000, 0x4e000, 0x4e000, 0x0,
0x3226e3c0, 0x2206e140, 0x2204e000, 0x2204e000, 0x0, 0x0, 0x0,
0x24e200, 0x24e200, 0x1000000, 0x0, 0x0, 0x0, 0x20140, 0x0,
0x0, 0xe000, 0xe000, 0x1000000, 0xdcfb0dc5, 0x944a0d40,
0x40000, 0x20140, 0x0, 0x20140, 0x10020140, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x944a0d40, 0x0, 0x944a0d40, 0x84480c00, 0x0,
0x0, 0x0, 0x0, 0x84480c00, 0x0, 0x0, 0x0, 0x84000800, 0x0,
0x944a0d40, 0x0, 0x0, 0x0, 0xdcfb0d45, 0xdcfb0dc5, 0xdcfb0dc5,
0x0, 0x0, 0x0, 0x0, 0x944a0d40, 0x944a0d40, 0x0, 0x0, 0x0,
0x944a0d40, 0x0, 0xdcfb0dc5, 0xdcfb0dc5, 0x0, 0x0, 0x944a0d40,
0x944a0d40, 0x944a0d40, 0x944a0d40, 0x0, 0x0, 0x0, 0x944a0d40,
0x0, };
}
private static void jj_la1_2() {
jj_la1_2 = new int[] { 0x0, 0x0, 0x10000, 0x40000, 0x10000, 0x0, 0x0,
0x0, 0x0, 0x1080, 0x0, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x80, 0x80, 0x0, 0x0, 0x20000, 0x80000, 0x4000, 0x0, 0x0,
0x0, 0x11000, 0x4000, 0x20000, 0x80, 0x0, 0x4000, 0x0, 0x0,
0x0, 0x114e8, 0x4e8, 0x0, 0x80, 0x4000, 0x0, 0x80, 0x20000,
0x80000, 0x1000000, 0x40000000, 0x80000000, 0x0, 0x0, 0x0,
0x24000000, 0x24000000, 0x0, 0x18300000, 0x18300000, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0xc004e8, 0xc00000, 0x4e8, 0xc004e8, 0x400,
0x0, 0x0, 0x400, 0x468, 0x80, 0x400, 0x44000, 0x68, 0x20000,
0xc004e8, 0x4400, 0x4000, 0x4000, 0x14e8, 0x114e8, 0x114e8,
0x0, 0x20000, 0x4000, 0x80000, 0xc014e8, 0xc014e8, 0x20000,
0x80000, 0x80000, 0x4e8, 0x0, 0x114e8, 0x114e8, 0x0, 0x0,
0x4e8, 0xc004e8, 0x4e8, 0x4e8, 0x20000, 0x80, 0x80, 0xc004e8,
0x0, };
}
private static void jj_la1_3() {
jj_la1_3 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0xffe000, 0x0, 0x0, 0x0, 0x80, 0x100, 0x40, 0x0, 0x0,
0x0, 0x0, 0x0, 0x1c00, 0x1c00, 0xc, 0xc, 0x230, 0x230, 0xf,
0x0, 0x0, 0x0, 0x0, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0xf, 0x0, 0x0, 0x0, 0x3, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0,
0xf, 0xf, 0x0, 0xffe003, 0xffe003, 0x3, 0x0, 0x3, 0x3, 0x0,
0x0, 0x3, 0xf, 0x3, 0x3, 0x0, 0x0, 0x0, 0xf, 0x0, };
}
final private JJCalls[] jj_2_rtns = new JJCalls[28];
private boolean jj_rescan = false;
private int jj_gc = 0;
public JavaFragmentParser(java.io.InputStream stream) {
jj_input_stream = new JavaCharStream(stream, 1, 1);
token_source = new JavaFragmentParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
public void ReInit(java.io.InputStream stream) {
jj_input_stream.ReInit(stream, 1, 1);
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
public JavaFragmentParser(java.io.Reader stream) {
jj_input_stream = new JavaCharStream(stream, 1, 1);
token_source = new JavaFragmentParserTokenManager(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
public void ReInit(java.io.Reader stream) {
jj_input_stream.ReInit(stream, 1, 1);
token_source.ReInit(jj_input_stream);
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
public JavaFragmentParser(JavaFragmentParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
public void ReInit(JavaFragmentParserTokenManager tm) {
token_source = tm;
token = new Token();
jj_ntk = -1;
jj_gen = 0;
for (int i = 0; i < 110; i++)
jj_la1[i] = -1;
for (int i = 0; i < jj_2_rtns.length; i++)
jj_2_rtns[i] = new JJCalls();
}
final private Token jj_consume_token(int kind) throws ParseException {
Token oldToken;
if ((oldToken = token).next != null)
token = token.next;
else
token = token.next = token_source.getNextToken();
jj_ntk = -1;
if (token.kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
for (int i = 0; i < jj_2_rtns.length; i++) {
JJCalls c = jj_2_rtns[i];
while (c != null) {
if (c.gen < jj_gen)
c.first = null;
c = c.next;
}
}
}
return token;
}
token = oldToken;
jj_kind = kind;
throw generateParseException();
}
static private final class LookaheadSuccess extends java.lang.Error {
}
final private LookaheadSuccess jj_ls = new LookaheadSuccess();
final private boolean jj_scan_token(int kind) {
if (jj_scanpos == jj_lastpos) {
jj_la--;
if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source
.getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos.next;
}
} else {
jj_scanpos = jj_scanpos.next;
}
if (jj_rescan) {
int i = 0;
Token tok = token;
while (tok != null && tok != jj_scanpos) {
i++;
tok = tok.next;
}
if (tok != null)
jj_add_error_token(kind, i);
}
if (jj_scanpos.kind != kind)
return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos)
throw jj_ls;
return false;
}
final public Token getNextToken() {
if (token.next != null)
token = token.next;
else
token = token.next = token_source.getNextToken();
jj_ntk = -1;
jj_gen++;
return token;
}
final public Token getToken(int index) {
Token t = lookingAhead ? jj_scanpos : token;
for (int i = 0; i < index; i++) {
if (t.next != null)
t = t.next;
else
t = t.next = token_source.getNextToken();
}
return t;
}
final private int jj_ntk() {
if ((jj_nt = token.next) == null)
return (jj_ntk = (token.next = token_source.getNextToken()).kind);
else
return (jj_ntk = jj_nt.kind);
}
private java.util.Vector jj_expentries = new java.util.Vector();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
private int jj_endpos;
private void jj_add_error_token(int kind, int pos) {
if (pos >= 100)
return;
if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) {
jj_expentry = new int[jj_endpos];
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
boolean exists = false;
for (java.util.Enumeration e = jj_expentries.elements(); e
.hasMoreElements();) {
int[] oldentry = (int[]) (e.nextElement());
if (oldentry.length == jj_expentry.length) {
exists = true;
for (int i = 0; i < jj_expentry.length; i++) {
if (oldentry[i] != jj_expentry[i]) {
exists = false;
break;
}
}
if (exists)
break;
}
}
if (!exists)
jj_expentries.addElement(jj_expentry);
if (pos != 0)
jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
}
public ParseException generateParseException() {
jj_expentries.removeAllElements();
boolean[] la1tokens = new boolean[120];
for (int i = 0; i < 120; i++) {
la1tokens[i] = false;
}
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 110; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1 << j)) != 0) {
la1tokens[j] = true;
}
if ((jj_la1_1[i] & (1 << j)) != 0) {
la1tokens[32 + j] = true;
}
if ((jj_la1_2[i] & (1 << j)) != 0) {
la1tokens[64 + j] = true;
}
if ((jj_la1_3[i] & (1 << j)) != 0) {
la1tokens[96 + j] = true;
}
}
}
}
for (int i = 0; i < 120; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
jj_expentries.addElement(jj_expentry);
}
}
jj_endpos = 0;
jj_rescan_token();
jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
exptokseq[i] = (int[]) jj_expentries.elementAt(i);
}
return new ParseException(token, exptokseq, tokenImage);
}
final public void enable_tracing() {
}
final public void disable_tracing() {
}
final private void jj_rescan_token() {
jj_rescan = true;
for (int i = 0; i < 28; i++) {
JJCalls p = jj_2_rtns[i];
do {
if (p.gen > jj_gen) {
jj_la = p.arg;
jj_lastpos = jj_scanpos = p.first;
switch (i) {
case 0:
jj_3_1();
break;
case 1:
jj_3_2();
break;
case 2:
jj_3_3();
break;
case 3:
jj_3_4();
break;
case 4:
jj_3_5();
break;
case 5:
jj_3_6();
break;
case 6:
jj_3_7();
break;
case 7:
jj_3_8();
break;
case 8:
jj_3_9();
break;
case 9:
jj_3_10();
break;
case 10:
jj_3_11();
break;
case 11:
jj_3_12();
break;
case 12:
jj_3_13();
break;
case 13:
jj_3_14();
break;
case 14:
jj_3_15();
break;
case 15:
jj_3_16();
break;
case 16:
jj_3_17();
break;
case 17:
jj_3_18();
break;
case 18:
jj_3_19();
break;
case 19:
jj_3_20();
break;
case 20:
jj_3_21();
break;
case 21:
jj_3_22();
break;
case 22:
jj_3_23();
break;
case 23:
jj_3_24();
break;
case 24:
jj_3_25();
break;
case 25:
jj_3_26();
break;
case 26:
jj_3_27();
break;
case 27:
jj_3_28();
break;
}
}
p = p.next;
} while (p != null);
}
jj_rescan = false;
}
final private void jj_save(int index, int xla) {
JJCalls p = jj_2_rtns[index];
while (p.gen > jj_gen) {
if (p.next == null) {
p = p.next = new JJCalls();
break;
}
p = p.next;
}
p.gen = jj_gen + xla - jj_la;
p.first = token;
p.arg = xla;
}
static final class JJCalls {
int gen;
Token first;
int arg;
JJCalls next;
}
}