You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/06/12 23:57:45 UTC
[lucene-solr] branch jira/SOLR-13452_gradle_3 updated: SOLR-13452:
Commit updated generated solr queryparser so that FastCharStream changes
compile.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch jira/SOLR-13452_gradle_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/SOLR-13452_gradle_3 by this push:
new 0601f51 SOLR-13452: Commit updated generated solr queryparser so that FastCharStream changes compile.
0601f51 is described below
commit 0601f5173fb4762ea61b8542c5467246f0337736
Author: markrmiller <ma...@apache.org>
AuthorDate: Wed Jun 12 18:57:38 2019 -0500
SOLR-13452: Commit updated generated solr queryparser so that FastCharStream changes compile.
---
solr/core/build.gradle | 4 +--
.../java/org/apache/solr/parser/CharStream.java | 16 ++++++++++
.../java/org/apache/solr/parser/QueryParser.java | 3 +-
.../solr/parser/QueryParserTokenManager.java | 35 +++++++++++++++-------
4 files changed, 43 insertions(+), 15 deletions(-)
diff --git a/solr/core/build.gradle b/solr/core/build.gradle
index af4a5ab..c6843e5 100644
--- a/solr/core/build.gradle
+++ b/solr/core/build.gradle
@@ -214,7 +214,7 @@ unusedDeps {
jarExclude 'kerby-pkix-.*?\\.jar'
}
-task javacc(type: org.apache.lucene.gradle.JavaCC) {
+task runJavacc(type: org.apache.lucene.gradle.JavaCC) {
inputFile file('src/java/org/apache/solr/parser/QueryParser.jj')
target file('src/java/org/apache/solr/parser')
@@ -244,7 +244,7 @@ task javacc(type: org.apache.lucene.gradle.JavaCC) {
task regenerate {
group = 'Build Regenerate'
description = "Regenerates various generated src files, automoton, packedints, jflex, javacc, etc"
- dependsOn javacc
+ dependsOn runJavacc
}
diff --git a/solr/core/src/java/org/apache/solr/parser/CharStream.java b/solr/core/src/java/org/apache/solr/parser/CharStream.java
index 9bec5a6..0400af4 100644
--- a/solr/core/src/java/org/apache/solr/parser/CharStream.java
+++ b/solr/core/src/java/org/apache/solr/parser/CharStream.java
@@ -27,6 +27,22 @@ interface CharStream {
*/
char readChar() throws java.io.IOException;
+ @Deprecated
+ /**
+ * Returns the column position of the character last read.
+ * @deprecated
+ * @see #getEndColumn
+ */
+ int getColumn();
+
+ @Deprecated
+ /**
+ * Returns the line number of the character last read.
+ * @deprecated
+ * @see #getEndLine
+ */
+ int getLine();
+
/**
* Returns the column number of the last character for current token (being
* matched after the last call to BeginTOken).
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParser.java b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
index 518cdef..52451aa 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParser.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
@@ -52,8 +52,7 @@ public class QueryParser extends SolrQueryParserBase implements QueryParserConst
@Override
protected Query newFieldQuery(Analyzer analyzer, String field, String queryText,
- boolean quoted, boolean fieldAutoGenPhraseQueries, boolean fieldEnableGraphQueries,
- SynonymQueryStyle synonymQueryStyle)
+ boolean quoted, boolean fieldAutoGenPhraseQueries, boolean fieldEnableGraphQueries, SynonymQueryStyle synonymQueryStyle)
throws SyntaxError {
setAutoGenerateMultiTermSynonymsPhraseQuery(fieldAutoGenPhraseQueries || getAutoGeneratePhraseQueries());
// Don't auto-quote graph-aware field queries
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java b/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
index 1667643..2d6d283 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
@@ -1,11 +1,24 @@
/* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */
package org.apache.solr.parser;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.search.BooleanClause;
+import org.apache.lucene.search.Query;
+import org.apache.solr.search.SyntaxError;
+import org.apache.solr.search.QParser;
/** Token Manager. */
+@SuppressWarnings("cast")
public class QueryParserTokenManager implements QueryParserConstants
{
int commentNestingDepth ;
+
private final int jjStopStringLiteralDfa_3(int pos, long active0)
{
switch (pos)
@@ -1328,9 +1341,9 @@ private int jjMoveNfa_1(int startState, int curPos)
}
}
static final int[] jjnextStates = {
- 32, 34, 35, 31, 36, 17, 18, 20, 56, 59, 25, 60, 57, 59, 25, 60,
- 22, 23, 38, 39, 46, 38, 39, 40, 46, 38, 39, 41, 49, 54, 46, 42,
- 43, 45, 50, 51, 53, 38, 39, 54, 46, 58, 61, 29, 2, 4, 5,
+ 32, 34, 35, 31, 36, 17, 18, 20, 56, 59, 25, 60, 57, 59, 25, 60,
+ 22, 23, 38, 39, 46, 38, 39, 40, 46, 38, 39, 41, 49, 54, 46, 42,
+ 43, 45, 50, 51, 53, 38, 39, 54, 46, 58, 61, 29, 2, 4, 5,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@@ -1371,9 +1384,9 @@ private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, lo
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, "\53", "\55", null, "\50", "\51", "\72", "\52", "\136", null, null,
-null, null, null, null, "\133", "\173", null, "\146\151\154\164\145\162\50", null,
+"", null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, "\53", "\55", null, "\50", "\51", "\72", "\52", "\136", null, null,
+null, null, null, null, "\133", "\173", null, "\146\151\154\164\145\162\50", null,
"\124\117", "\135", "\175", null, null, };
/** Lexer state names. */
@@ -1386,14 +1399,14 @@ public static final String[] lexStateNames = {
/** Lex State array. */
public static final int[] jjnewLexState = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
- -1, -1, -1, -1, -1, 1, 1, -1, -1, 3, -1, 3, 3, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
+ -1, -1, -1, -1, -1, 1, 1, -1, -1, 3, -1, 3, 3, -1, -1,
};
static final long[] jjtoToken = {
- 0xffffffe001L,
+ 0xffffffe001L,
};
static final long[] jjtoSkip = {
- 0x1f00L,
+ 0x1f00L,
};
protected CharStream input_stream;
private final int[] jjrounds = new int[63];
@@ -1478,7 +1491,7 @@ int jjmatchedPos;
int jjmatchedKind;
/** Get the next Token. */
-public Token getNextToken()
+public Token getNextToken()
{
Token matchedToken;
int curPos = 0;