Class Parser
java.lang.Object
com.yahoo.search.query.textserialize.parser.Parser
- All Implemented Interfaces:
ParserConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface com.yahoo.search.query.textserialize.parser.ParserConstants
BOOLEAN, CLOSE_CURLY, CLOSE_PAREN, CLOSE_SQUARE, DEFAULT, DIGIT, EOF, EXPONENT, NULL, NUMBER, OPEN_CURLY, OPEN_PAREN, OPEN_SQUARE, QUOTE, SIGN, STRING, STRING_CHARACTER, SYMBOL, SYMBOL_FIRST, SYMBOL_REST, tokenImage -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with generated Token Manager.Parser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingConstructor with InputStream.Parser(Reader stream, DispatchFormHandler dispatchFormHandler, Object dispatchContext) -
Method Summary
Modifier and TypeMethodDescriptionarray()final Booleanbool()final voidDisable tracing.final Objectfinal voidEnable tracing.final Objectform()forms()Generate ParseException.final Tokenfinal TokengetToken(int index) final Objectliteral()map()final Objectnull_()final Doublenumber()voidReinitialisevoidReInit(InputStream stream, String encoding) ReinitialisevoidReinitialisefinal Objectstart()final Stringstring()final boolean
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
Parser
-
Parser
Constructor with InputStream and supplied encoding- Parameters:
stream- input streamencoding- charset to be used. May not benull.
-
Parser
Constructor with InputStream.- Parameters:
stream- char stream
-
Parser
Constructor with generated Token Manager.- Parameters:
tm- Token manager to use
-
-
Method Details
-
start
- Throws:
ParseException
-
form
- Throws:
ParseException
-
literal
- Throws:
ParseException
-
string
- Throws:
ParseException
-
number
- Throws:
ParseException
-
bool
- Throws:
ParseException
-
null_
- Throws:
ParseException
-
map
- Throws:
ParseException
-
dispatchForm
- Throws:
ParseException
-
forms
- Throws:
ParseException
-
array
- Throws:
ParseException
-
ReInit
Reinitialise- Parameters:
stream- input streamencoding- charset to be used. May not benull.
-
ReInit
Reinitialise- Parameters:
stream- char stream
-
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.
-