Class IndexingParser
java.lang.Object
com.yahoo.vespa.indexinglanguage.parser.IndexingParser
- All Implemented Interfaces:
IndexingParserConstants
- Author:
- Simon Thoresen Hult
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface com.yahoo.vespa.indexinglanguage.parser.IndexingParserConstants
ADD, ATTRIBUTE, BASE64_DECODE, BASE64_ENCODE, BINARIZE, BUSY_WAIT, CASE, CASE_DEFAULT, CHOICE, CHUNK, CLEAR_STATE, COLON, COMMA, COMMENT, CREATE_IF_NON_EXISTENT, DEFAULT, DIV, DOT, DOUBLE, ECHO, ELSE, EMBED, EOF, EQ, EXACT, FALSE, FLATTEN, FLOAT, FOR_EACH, GE, GENERATE, GET_FIELD, GET_VAR, GT, GUARD, HASH, HEX_DECODE, HEX_ENCODE, HOST_NAME, IDENTIFIER, IF, INDEX, INPUT, INTEGER, JOIN, KEEP_CASE, LCURLY, LE, LONG, LOWER_CASE, LPAREN, LT, MAX_LENGTH, MAX_OCCURRENCES, MAX_TOKEN_LENGTH, MOD, MUL, NE, NGRAM, NL, NORMALIZE, NOW, OPTIMIZE_PREDICATE, PACK_BITS, PASSTHROUGH, PIPE, RANDOM, RCURLY, REMOVE_IF_ZERO, RPAREN, SCOLON, SELECT_INPUT, SET_LANGUAGE, SET_VAR, SLEEP, SPLIT, STEM, STRING, SUB, SUBSTRING, SUMMARY, SWITCH, THIS, TO_ARRAY, TO_BOOL, TO_BYTE, TO_DOUBLE, TO_EPOCH_SECOND, TO_FLOAT, TO_INT, TO_LONG, TO_POS, TO_STRING, TO_URI, TO_WSET, tokenImage, TOKENIZE, TRIM, TRUE, UNDERSCORE, ZCURVE -
Constructor Summary
ConstructorsConstructorDescriptionIndexingParser(CharStream stream) Constructor with user supplied CharStream.Constructor with generated Token Manager.IndexingParser(String str) -
Method Summary
Modifier and TypeMethodDescriptionfinal AnnotatorConfigA possibly empty list of arguments that can be strings or numbers.final Expressionfinal Expressionfinal Expressionfinal Expressionfinal Expressionfinal ExpressionchunkExp()final Expressionfinal voidDisable tracing.final ExpressionechoExp()final ExpressionembedExp()final voidEnable tracing.final ExpressionexactExp()final Expressionfinal Expressionfinal Stringfinal com.yahoo.document.datatypes.FieldValuefinal Expressionfinal Expressionfinal ExpressionGenerate ParseException.final Expressionfinal Tokenfinal TokengetToken(int index) final Expressionfinal ExpressionguardExp()final ExpressionhashExp()final Expressionfinal Expressionfinal Expressionfinal Stringfinal Expressionfinal ExpressionindexExp()final ExpressioninputExp()final intinteger()final ExpressionjoinExp()final Expressionfinal Expressionfinal Expressionmath()final ExpressionngramExp()final voidnl()final Expressionfinal Expressionfinal ExpressionnowExp()final com.yahoo.document.datatypes.NumericFieldValuefinal Expressionfinal Expressionfinal Expressionfinal ExpressionvoidReInit(CharStream stream) Reinitialise.voidReinitialisefinal Expressionroot()final ScriptExpressionscript()final ExpressionsetChunkers(Map<String, com.yahoo.language.process.Chunker> chunkers) setDefaultFieldName(String fieldName) setEmbedders(Map<String, com.yahoo.language.process.Embedder> embedders) setGenerators(Map<String, com.yahoo.language.process.FieldGenerator> generators) final ExpressionsetLinguistics(com.yahoo.language.Linguistics linguistics) final Expressionfinal Expressionfinal ExpressionsleepExp()final ExpressionsplitExp()final StatementExpressionfinal Stringstring()final com.yahoo.document.datatypes.FieldValuefinal Expressionfinal Expressionfinal Expressionfinal ExpressionthisExp()final Expressionfinal Expressionfinal Expressionfinal Expressionfinal Expressionfinal Expressionfinal ExpressiontoIntExp()final Expressionfinal Expressionfinal ExpressiontoPosExp()final Expressionfinal ExpressiontoUriExp()final Expressionfinal booleanfinal ExpressiontrimExp()final Expressionvalue()final Expression
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
IndexingParser
-
IndexingParser
Constructor with user supplied CharStream.- Parameters:
stream- stream to init with
-
IndexingParser
Constructor with generated Token Manager.- Parameters:
tm- Token manager to use
-
-
Method Details
-
setDefaultFieldName
-
setLinguistics
-
setChunkers
-
setEmbedders
-
setGenerators
public IndexingParser setGenerators(Map<String, com.yahoo.language.process.FieldGenerator> generators) -
setGlobalAnnotatorConfig
-
root
- Throws:
ParseException
-
script
- Throws:
ParseException
-
statement
- Throws:
ParseException
-
expression
- Throws:
ParseException
-
nonChoiceExpression
- Throws:
ParseException
-
math
- Throws:
ParseException
-
value
- Throws:
ParseException
-
attributeExp
- Throws:
ParseException
-
base64DecodeExp
- Throws:
ParseException
-
base64EncodeExp
- Throws:
ParseException
-
busy_waitExp
- Throws:
ParseException
-
chunkExp
- Throws:
ParseException
-
clearStateExp
- Throws:
ParseException
-
echoExp
- Throws:
ParseException
-
embedExp
- Throws:
ParseException
-
generateExp
- Throws:
ParseException
-
exactExp
- Throws:
ParseException
-
flattenExp
- Throws:
ParseException
-
forEachExp
- Throws:
ParseException
-
getFieldExp
- Throws:
ParseException
-
getVarExp
- Throws:
ParseException
-
guardExp
- Throws:
ParseException
-
hashExp
- Throws:
ParseException
-
hexDecodeExp
- Throws:
ParseException
-
hexEncodeExp
- Throws:
ParseException
-
hostNameExp
- Throws:
ParseException
-
ifThenExp
- Throws:
ParseException
-
ifThenCmp
- Throws:
ParseException
-
indexExp
- Throws:
ParseException
-
inputExp
- Throws:
ParseException
-
joinExp
- Throws:
ParseException
-
lowerCaseExp
- Throws:
ParseException
-
ngramExp
- Throws:
ParseException
-
normalizeExp
- Throws:
ParseException
-
nowExp
- Throws:
ParseException
-
optimizePredicateExp
- Throws:
ParseException
-
packBitsExp
- Throws:
ParseException
-
passthroughExp
- Throws:
ParseException
-
randomExp
- Throws:
ParseException
-
selectInputExp
- Throws:
ParseException
-
setLanguageExp
- Throws:
ParseException
-
setValueExp
- Throws:
ParseException
-
setVarExp
- Throws:
ParseException
-
sleepExp
- Throws:
ParseException
-
splitExp
- Throws:
ParseException
-
substringExp
- Throws:
ParseException
-
summaryExp
- Throws:
ParseException
-
switchExp
- Throws:
ParseException
-
thisExp
- Throws:
ParseException
-
tokenizeExp
- Throws:
ParseException
-
annotatorConfig
- Throws:
ParseException
-
toArrayExp
- Throws:
ParseException
-
toBoolExp
- Throws:
ParseException
-
toByteExp
- Throws:
ParseException
-
toDoubleExp
- Throws:
ParseException
-
toEpochSecondExp
- Throws:
ParseException
-
toFloatExp
- Throws:
ParseException
-
toIntExp
- Throws:
ParseException
-
toLongExp
- Throws:
ParseException
-
toPosExp
- Throws:
ParseException
-
toStringExp
- Throws:
ParseException
-
toUriExp
- Throws:
ParseException
-
toWsetExp
- Throws:
ParseException
-
trimExp
- Throws:
ParseException
-
literalBoolExp
- Throws:
ParseException
-
zcurveExp
- Throws:
ParseException
-
binarizeExp
- Throws:
ParseException
-
executionValueExp
- Throws:
ParseException
-
arguments
A possibly empty list of arguments that can be strings or numbers.- Throws:
ParseException
-
identifier
- Throws:
ParseException
-
fieldName
- Throws:
ParseException
-
fieldValue
- Throws:
ParseException
-
numericValue
- Throws:
ParseException
-
stringValue
- Throws:
ParseException
-
string
- Throws:
ParseException
-
integer
- Throws:
ParseException
-
nl
- Throws:
ParseException
-
ReInit
Reinitialise.- Parameters:
stream- stream to init with
-
ReInit
Reinitialise- Parameters:
tm- Token manager to use
-
getNextToken
- Returns:
- the next Token.
-
getToken
- Parameters:
index- index to be retrieved- Returns:
- the specific Token.
-
generateParseException
Generate ParseException.- Returns:
- new Exception object. Never
null
-
trace_enabled
public final boolean trace_enabled()- Returns:
- Always
false.
-
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-