1 NOTE: often, if you are making a small change to the .jj file, you can
2 simply run "ant javacc" and skip the steps below. JavaCC will print
5 Warning: ParseException.java: File is obsolete. Please rename or delete this file so that a new one can be generated for you.
7 which you should ignore (ie, simply keep the ParseException.java class
8 that's already present).
10 If, instead, you'd like to fully rebuild the StandardQueryParser,
15 StandardQueryParser.java
16 StandardQueryParserConstants.java
17 StandardQueryParserTokenManager.java
22 * Run "ant javacc". That will generate the all the classes
24 * To avoid lots of warnings in the generated code:
26 add @SupressWarnings("all"), immediately preceding the class declaration to:
28 QueryParserTokenManager.java
34 * Remove all imports from TokenMgrError.java
36 * Fix the ParseException class:
38 - Change it to extend from QueryNodeParseException:
40 "public class ParseException extends QueryNodeParseException".
42 - Recreate the all the constructors like this:
44 public ParseException(Token currentTokenVal,
45 int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
46 super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, initialise(
47 currentTokenVal, expectedTokenSequencesVal, tokenImageVal)));
48 this.currentToken = currentTokenVal;
49 this.expectedTokenSequences = expectedTokenSequencesVal;
50 this.tokenImage = tokenImageVal;
53 public ParseException(Message message) {
57 public ParseException() {
58 super(new MessageImpl(QueryParserMessages.INVALID_SYNTAX, "Error"));