From 7f2ea1c098f039918e963d9fc1ae4990502e84ca Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Mon, 18 Mar 2013 15:16:09 +0000 Subject: [PATCH] Fix a syntax error in javacc result of surround query parser making new clover fail (and its invalid java code that was created)! git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457801 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/queryparser/classic/CharStream.java | 2 +- .../org/apache/lucene/queryparser/classic/ParseException.java | 2 +- .../org/apache/lucene/queryparser/classic/QueryParser.java | 2 -- .../src/java/org/apache/lucene/queryparser/classic/Token.java | 3 +-- .../org/apache/lucene/queryparser/classic/TokenMgrError.java | 3 +-- .../queryparser/flexible/standard/parser/CharStream.java | 2 +- .../queryparser/flexible/standard/parser/ParseException.java | 2 +- .../flexible/standard/parser/StandardSyntaxParser.java | 1 - .../lucene/queryparser/flexible/standard/parser/Token.java | 3 +-- .../queryparser/flexible/standard/parser/TokenMgrError.java | 3 +-- .../apache/lucene/queryparser/surround/parser/CharStream.java | 2 +- .../lucene/queryparser/surround/parser/ParseException.java | 2 +- .../apache/lucene/queryparser/surround/parser/QueryParser.java | 2 +- .../apache/lucene/queryparser/surround/parser/QueryParser.jj | 2 +- .../org/apache/lucene/queryparser/surround/parser/Token.java | 3 +-- .../lucene/queryparser/surround/parser/TokenMgrError.java | 3 +-- 16 files changed, 14 insertions(+), 23 deletions(-) diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java index 2c5fcbabde5..85b14614435 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/CharStream.java @@ -112,4 +112,4 @@ interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=30b94cad7b10d0d81e3a59a1083939d0 (do not edit this line) */ +/* JavaCC - OriginalChecksum=c847dd1920bf7901125a7244125682ad (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java index 7ba0d3c8ece..750f95a3c0b 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/ParseException.java @@ -184,4 +184,4 @@ public class ParseException extends Exception { } } -/* JavaCC - OriginalChecksum=b187d97d5bb75c3fc63d642c1c26ac6e (do not edit this line) */ +/* JavaCC - OriginalChecksum=61602edcb3a15810cbc58f5593eba40d (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java index 09d8f5eb92e..273ed8c0e64 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParser.java @@ -165,7 +165,6 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants } // This makes sure that there is no garbage after the query string - @Override final public Query TopLevelQuery(String field) throws ParseException { Query q; q = Query(field); @@ -538,7 +537,6 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants } /** Reinitialise. */ - @Override public void ReInit(CharStream stream) { token_source.ReInit(stream); token = new Token(); diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java index 889175ccc79..aa57487f4c2 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/Token.java @@ -97,7 +97,6 @@ public class Token implements java.io.Serializable { /** * Returns the image. */ - @Override public String toString() { return image; @@ -129,4 +128,4 @@ public class Token implements java.io.Serializable { } } -/* JavaCC - OriginalChecksum=405bb5d2fcd84e94ac1c8f0b12c1f914 (do not edit this line) */ +/* JavaCC - OriginalChecksum=c1e1418b35aa9e47ef8dc98b87423d70 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java index 84ece911ade..8a2eb7be20d 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/TokenMgrError.java @@ -121,7 +121,6 @@ public class TokenMgrError extends Error * * from this method for such cases in the release version of your parser. */ - @Override public String getMessage() { return super.getMessage(); } @@ -145,4 +144,4 @@ public class TokenMgrError extends Error this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } -/* JavaCC - OriginalChecksum=f433e1a52b8eadbf12f3fbbbf87fd140 (do not edit this line) */ +/* JavaCC - OriginalChecksum=0c275864a1972d9a01601ab81426872d (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java index 15b8245acf3..ab149a69a30 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/CharStream.java @@ -112,4 +112,4 @@ interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=53b2ec7502d50e2290e86187a6c01270 (do not edit this line) */ +/* JavaCC - OriginalChecksum=c95f1720d9b38046dc5d294b741c44cb (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java index 4d87b831d4f..fadb9ebf535 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/ParseException.java @@ -187,4 +187,4 @@ public class ParseException extends QueryNodeParseException { } } -/* JavaCC - OriginalChecksum=4263a02db9988d7a863aa97ad2f6dc67 (do not edit this line) */ +/* JavaCC - OriginalChecksum=81401c29cf6f9909761c636b4778ccc0 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java index 75a6fd61352..4844ec86f10 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParser.java @@ -58,7 +58,6 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC * @param query the query string to be parsed. * @throws ParseException if the parsing fails */ - @Override public QueryNode parse(CharSequence query, CharSequence field) throws QueryNodeParseException { ReInit(new FastCharStream(new StringReader(query.toString()))); try { diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java index ffd7c11ba0e..fd3340208de 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/Token.java @@ -97,7 +97,6 @@ public class Token implements java.io.Serializable { /** * Returns the image. */ - @Override public String toString() { return image; @@ -129,4 +128,4 @@ public class Token implements java.io.Serializable { } } -/* JavaCC - OriginalChecksum=ea8b1e55950603be28e2f63dcd544ab4 (do not edit this line) */ +/* JavaCC - OriginalChecksum=30bbd23e0dec26f141130dc62a4f6e9d (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java index 787aacf948f..c98b0d5dbec 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/TokenMgrError.java @@ -121,7 +121,6 @@ public class TokenMgrError extends Error * * from this method for such cases in the release version of your parser. */ - @Override public String getMessage() { return super.getMessage(); } @@ -145,4 +144,4 @@ public class TokenMgrError extends Error this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } -/* JavaCC - OriginalChecksum=be88283d82a985d82a34dda46bcf42d5 (do not edit this line) */ +/* JavaCC - OriginalChecksum=3ca7fbf7de9f2424b131a5499b0a78d0 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java index 31f3ad7950e..1756f862194 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/CharStream.java @@ -112,4 +112,4 @@ interface CharStream { void Done(); } -/* JavaCC - OriginalChecksum=242ae59b965491e225a44534cbc73b42 (do not edit this line) */ +/* JavaCC - OriginalChecksum=5ca20c9145f29a0f8909470a7f949fe4 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java index a163111401c..9060dc545ac 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/ParseException.java @@ -184,4 +184,4 @@ public class ParseException extends Exception { } } -/* JavaCC - OriginalChecksum=bd8163f41bf2fd1bb00f025fce3dcaaf (do not edit this line) */ +/* JavaCC - OriginalChecksum=be6f55e3bf157e8c96b4c06cca5ec81b (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java index 29ddce5174a..41ed459c903 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java @@ -52,7 +52,7 @@ public class QueryParser implements QueryParserConstants { /* CHECKME: These should be the same as for the tokenizer. How? */ final char truncator = '*'; final char anyChar = '?'; - final char quote = '\u005c"'; + final char quote = '"'; final char fieldOperator = ':'; final char comma = ','; /* prefix list separator */ final char carat = '^'; /* weight operator */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj index f95b54c8734..1b07ffd47f5 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj @@ -81,7 +81,7 @@ public class QueryParser { /* CHECKME: These should be the same as for the tokenizer. How? */ final char truncator = '*'; final char anyChar = '?'; - final char quote = '\"'; + final char quote = '"'; final char fieldOperator = ':'; final char comma = ','; /* prefix list separator */ final char carat = '^'; /* weight operator */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java index 29bb6db1d86..fd715506d26 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/Token.java @@ -97,7 +97,6 @@ public class Token implements java.io.Serializable { /** * Returns the image. */ - @Override public String toString() { return image; @@ -129,4 +128,4 @@ public class Token implements java.io.Serializable { } } -/* JavaCC - OriginalChecksum=f2df701e24da1cf2d025118ce6efdd2f (do not edit this line) */ +/* JavaCC - OriginalChecksum=db38f23b3674db52ff034369707a0ac3 (do not edit this line) */ diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java index fc9d459dc78..6834d2d42ae 100644 --- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java +++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/TokenMgrError.java @@ -121,7 +121,6 @@ public class TokenMgrError extends Error * * from this method for such cases in the release version of your parser. */ - @Override public String getMessage() { return super.getMessage(); } @@ -145,4 +144,4 @@ public class TokenMgrError extends Error this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } -/* JavaCC - OriginalChecksum=8c69a370d9a9893140562c8bb911678c (do not edit this line) */ +/* JavaCC - OriginalChecksum=dcdd5ccde13b91bcd8f76a86ca618852 (do not edit this line) */