}
setMarker(e);
errorMessage = null;
- if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
+ // if (PHPeclipsePlugin.DEBUG) PHPeclipsePlugin.log(e);
}
/**
- * Create marker for the parse error
+ * Create marker for the parse error.
* @param e the ParseException
*/
private static void setMarker(final ParseException e) {
final int indx,
final int brIndx) throws CoreException {
String current;
- StringBuffer lineNumberBuffer = new StringBuffer(10);
+ final StringBuffer lineNumberBuffer = new StringBuffer(10);
char ch;
current = output.substring(indx, brIndx);
if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) {
- int onLine = current.indexOf("on line <b>");
+ final int onLine = current.indexOf("on line <b>");
if (onLine != -1) {
lineNumberBuffer.delete(0, lineNumberBuffer.length());
for (int i = onLine; i < current.length(); i++) {
}
}
- int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
+ final int lineNumber = Integer.parseInt(lineNumberBuffer.toString());
- Hashtable attributes = new Hashtable();
+ final Hashtable attributes = new Hashtable();
current = current.replaceAll("\n", "");
current = current.replaceAll("<b>", "");
pushOnAstNodes(new HTMLCode(chars, htmlStart,currentPosition));
}
- /**
- * Create a new task.
- */
+ /** Create a new task. */
public static final void createNewTask() {
final int currentPosition = SimpleCharStream.getPosition();
- final String todo = SimpleCharStream.currentBuffer.substring(currentPosition+1,
+ final String todo = SimpleCharStream.currentBuffer.substring(currentPosition-3,
SimpleCharStream.currentBuffer.indexOf("\n",
currentPosition)-1);
+ PHPeclipsePlugin.log(1,SimpleCharStream.currentBuffer.toString());
try {
setMarker(fileToParse,
- "todo : " + todo,
+ todo,
SimpleCharStream.getBeginLine(),
TASK,
"Line "+SimpleCharStream.getBeginLine());
try {
jj_consume_token(LBRACE);
} catch (ParseException e) {
- errorMessage = "unexpected token : '"+ e.currentToken.next.image + "', '{' expected";
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image + "'. '{' expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- {if (true) throw e;}
+ processParseException(e);
}
label_3:
while (true) {
try {
jj_consume_token(RBRACE);
} catch (ParseException e) {
- errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', 'var', 'function' or '}' expected";
+ errorMessage = "unexpected token : '"+ e.currentToken.next.image +"'. 'var', 'function' or '}' expected";
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- {if (true) throw e;}
+ processParseException(e);
}
}
errorLevel = ERROR;
errorStart = SimpleCharStream.getPosition() - e.currentToken.next.image.length() + 1;
errorEnd = SimpleCharStream.getPosition() + 1;
- {if (true) throw e;}
+ processParseException(e);
}
break;
default:
case RSIGNEDSHIFTASSIGN:
assignOperator = AssignmentOperator();
try {
- final int errorStart = SimpleCharStream.getPosition();
initializer = Expression();
} catch (ParseException e) {
if (errorMessage != null) {
}
static final public Expression PrimaryExpression() throws ParseException {
- final Token identifier;
Expression expr;
- final int pos = SimpleCharStream.getPosition();
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case NEW:
case DOLLAR:
return retval;
}
- static final private boolean jj_3R_183() {
- if (jj_3R_185()) return true;
+ static final private boolean jj_3R_203() {
+ if (jj_scan_token(MINUS_MINUS)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
+ static final private boolean jj_3R_202() {
+ if (jj_scan_token(PLUS_PLUS)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
+ static final private boolean jj_3R_198() {
Token xsp;
xsp = jj_scanpos;
- if (jj_3R_198()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_202()) {
+ jj_scanpos = xsp;
+ if (jj_3R_203()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
+ static final private boolean jj_3R_183() {
+ if (jj_3R_185()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_198()) jj_scanpos = xsp;
+ else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_44() {
Token xsp;
xsp = jj_scanpos;
return false;
}
- static final private boolean jj_3_5() {
- if (jj_3R_44()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(SEMICOLON)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_153() {
if (jj_scan_token(RSIGNEDSHIFT)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_152() {
- if (jj_scan_token(LSHIFT)) return true;
+ static final private boolean jj_3_5() {
+ if (jj_3R_44()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(SEMICOLON)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
+ static final private boolean jj_3R_152() {
+ if (jj_scan_token(LSHIFT)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_145() {
Token xsp;
xsp = jj_scanpos;
return false;
}
+ static final private boolean jj_3R_208() {
+ if (jj_scan_token(ARRAYASSIGN)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_44()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_131() {
if (jj_3R_136()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_208() {
- if (jj_scan_token(ARRAYASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ static final private boolean jj_3R_40() {
if (jj_3R_44()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_208()) jj_scanpos = xsp;
+ else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3R_40() {
- if (jj_3R_44()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_208()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3_7() {
if (jj_3R_46()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_80() {
- if (jj_3R_49()) return true;
+ static final private boolean jj_3R_138() {
+ if (jj_scan_token(EQUAL_EQUAL)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_138() {
- if (jj_scan_token(EQUAL_EQUAL)) return true;
+ static final private boolean jj_3R_80() {
+ if (jj_3R_49()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3R_191() {
- if (jj_scan_token(NULL)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_118() {
if (jj_scan_token(LBRACE)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_190() {
- if (jj_scan_token(FALSE)) return true;
+ static final private boolean jj_3R_191() {
+ if (jj_scan_token(NULL)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_189() {
- if (jj_scan_token(TRUE)) return true;
+ static final private boolean jj_3R_190() {
+ if (jj_scan_token(FALSE)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
+ static final private boolean jj_3R_189() {
+ if (jj_scan_token(TRUE)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_130() {
if (jj_scan_token(BIT_AND)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
+ static final private boolean jj_3R_77() {
+ if (jj_scan_token(DOLLAR)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_57()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_186() {
if (jj_scan_token(INTEGER_LITERAL)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_77() {
- if (jj_scan_token(DOLLAR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_57()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_79() {
if (jj_3R_44()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
+ static final private boolean jj_3R_76() {
+ if (jj_scan_token(IDENTIFIER)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_118()) jj_scanpos = xsp;
+ else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_125() {
if (jj_3R_127()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_76() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_118()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_75() {
if (jj_scan_token(LBRACE)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
+ static final private boolean jj_3R_109() {
+ if (jj_scan_token(DOLLAR)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_57()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_47() {
if (jj_scan_token(CLASSACCESS)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_109() {
- if (jj_scan_token(DOLLAR)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_57()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_111() {
if (jj_3R_119()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_84() {
- if (jj_3R_73()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
- static final private boolean jj_3R_121() {
- if (jj_scan_token(AND_AND)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
- static final private boolean jj_3R_83() {
- if (jj_3R_49()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_90() {
Token xsp;
xsp = jj_scanpos;
return false;
}
+ static final private boolean jj_3R_121() {
+ if (jj_scan_token(AND_AND)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
+ static final private boolean jj_3R_84() {
+ if (jj_3R_73()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
+ static final private boolean jj_3R_83() {
+ if (jj_3R_49()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_112() {
Token xsp;
xsp = jj_scanpos;
return false;
}
+ static final private boolean jj_3R_86() {
+ if (jj_scan_token(HOOK)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_44()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_scan_token(COLON)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_70()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_82() {
if (jj_scan_token(IDENTIFIER)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_86() {
- if (jj_scan_token(HOOK)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_44()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_scan_token(COLON)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_70()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_92() {
if (jj_3R_111()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_143() {
- if (jj_3R_73()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3_1() {
if (jj_3R_39()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_195() {
- if (jj_scan_token(ARRAY)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_205()) return true;
+ static final private boolean jj_3R_143() {
+ if (jj_3R_73()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3R_134() {
- if (jj_scan_token(COMMA)) return true;
+ static final private boolean jj_3R_195() {
+ if (jj_scan_token(ARRAY)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_205()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_143()) jj_scanpos = xsp;
- else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
+ static final private boolean jj_3R_134() {
+ if (jj_scan_token(COMMA)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ Token xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_143()) jj_scanpos = xsp;
+ else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_133() {
if (jj_3R_73()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
+ static final private boolean jj_3R_100() {
+ if (jj_scan_token(LSHIFTASSIGN)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_52() {
if (jj_scan_token(STATICCLASSACCESS)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_100() {
- if (jj_scan_token(LSHIFTASSIGN)) return true;
+ static final private boolean jj_3R_99() {
+ if (jj_scan_token(MINUSASSIGN)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3R_99() {
- if (jj_scan_token(MINUSASSIGN)) return true;
+ static final private boolean jj_3R_98() {
+ if (jj_scan_token(PLUSASSIGN)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3R_98() {
- if (jj_scan_token(PLUSASSIGN)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_97() {
if (jj_scan_token(REMASSIGN)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_200() {
- if (jj_scan_token(NEW)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- if (jj_3R_69()) return true;
+ static final private boolean jj_3R_116() {
+ if (jj_3R_124()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_116() {
- if (jj_3R_124()) return true;
+ static final private boolean jj_3R_200() {
+ if (jj_scan_token(NEW)) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ if (jj_3R_69()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
- static final private boolean jj_3_4() {
- if (jj_3R_43()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static final private boolean jj_3R_88() {
if (jj_scan_token(BANG)) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_193() {
- if (jj_3R_195()) return true;
+ static final private boolean jj_3_4() {
+ if (jj_3R_43()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_204() {
- if (jj_3R_43()) return true;
+ static final private boolean jj_3R_193() {
+ if (jj_3R_195()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
return false;
}
+ static final private boolean jj_3R_204() {
+ if (jj_3R_43()) return true;
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+ return false;
+ }
+
static final private boolean jj_3R_192() {
if (jj_3R_194()) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
return false;
}
- static final private boolean jj_3R_203() {
- if (jj_scan_token(MINUS_MINUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
- static final private boolean jj_3R_202() {
- if (jj_scan_token(PLUS_PLUS)) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
- static final private boolean jj_3R_198() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_202()) {
- jj_scanpos = xsp;
- if (jj_3R_203()) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
- return false;
- }
-
static private boolean jj_initialized_once = false;
static public PHPParserTokenManager token_source;
static SimpleCharStream jj_input_stream;