-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor AccumuloSyntaxParserConstants so it is not an interface
Refactor AccumuloSyntaxParserConstants so that it is not an interface that consists solely of constants, but is rather a final, uninstantiable class with constants. While not strictly an issue, it is odd for AccumuloSyntaxParser and AccumuloSyntaxParserTokenManager to both be considered implementations of AccumuloSyntaxParserConstants. Closes #2739
- Loading branch information
Showing
5 changed files
with
120 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
...re/src/main/java/datawave/query/language/parser/lucene/AccumuloSyntaxParserConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* Generated By:JavaCC: Do not edit this line. AccumuloSyntaxParserConstants.java */ | ||
package datawave.query.language.parser.lucene; | ||
|
||
import java.util.List; | ||
|
||
public final class AccumuloSyntaxParserConstants { | ||
|
||
public static final int EOF = 0; | ||
public static final int _NUM_CHAR = 1; | ||
public static final int _ESCAPED_CHAR = 2; | ||
public static final int _TERM_START_CHAR = 3; | ||
public static final int _TERM_CHAR = 4; | ||
public static final int _FUNCTION_ARG_CHAR = 5; | ||
public static final int _FUNCTION_ARG_BEGINEND_CHAR = 6; | ||
public static final int _FUNCTION_ARG_ALL_CHAR1 = 7; | ||
public static final int _FUNCTION_ARG_ALL_CHAR2 = 8; | ||
public static final int _FUNCTION_ARG = 9; | ||
public static final int _WHITESPACE = 10; | ||
public static final int _QUOTED_CHAR = 11; | ||
public static final int AND = 13; | ||
public static final int OR = 14; | ||
public static final int NOT = 15; | ||
public static final int FUNCTION = 16; | ||
public static final int LPAREN = 17; | ||
public static final int RPAREN = 18; | ||
public static final int OP_COLON = 19; | ||
public static final int CARAT = 20; | ||
public static final int QUOTED = 21; | ||
public static final int TERM = 22; | ||
public static final int FUZZY_SLOP = 23; | ||
public static final int REGEXPTERM = 24; | ||
public static final int RANGEIN_START = 25; | ||
public static final int RANGEEX_START = 26; | ||
public static final int NUMBER = 27; | ||
public static final int RANGE_TO = 28; | ||
public static final int RANGEIN_END = 29; | ||
public static final int RANGEEX_END = 30; | ||
public static final int RANGE_QUOTED = 31; | ||
public static final int RANGE_GOOP = 32; | ||
|
||
public static final int Boost = 0; | ||
public static final int Range = 1; | ||
public static final int DEFAULT = 2; | ||
|
||
// @formatter:off | ||
public static final List<String> tokenImage = List.of( | ||
"<EOF>", | ||
"<_NUM_CHAR>", | ||
"<_ESCAPED_CHAR>", | ||
"<_TERM_START_CHAR>", | ||
"<_TERM_CHAR>", | ||
"<_FUNCTION_ARG_CHAR>", | ||
"<_FUNCTION_ARG_BEGINEND_CHAR>", | ||
"<_FUNCTION_ARG_ALL_CHAR1>", | ||
"<_FUNCTION_ARG_ALL_CHAR2>", | ||
"<_FUNCTION_ARG>", | ||
"<_WHITESPACE>", | ||
"<_QUOTED_CHAR>", | ||
"<token of kind 12>", | ||
"\"AND\"", | ||
"\"OR\"", | ||
"\"NOT\"", | ||
"<FUNCTION>", | ||
"\"(\"", | ||
"\")\"", | ||
"\":\"", | ||
"\"^\"", | ||
"<QUOTED>", | ||
"<TERM>", | ||
"<FUZZY_SLOP>", | ||
"<REGEXPTERM>", | ||
"\"[\"", | ||
"\"{\"", | ||
"<NUMBER>", | ||
"\"TO\"", | ||
"\"]\"", | ||
"\"}\"", | ||
"<RANGE_QUOTED>", | ||
"<RANGE_GOOP>"); | ||
// @formatter:on | ||
|
||
/** | ||
* Do not allow this class to be instantiated. | ||
*/ | ||
private AccumuloSyntaxParserConstants() { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
...ore/src/main/java/datawave/query/language/parser/lucene/AcumuloSyntaxParserConstants.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters