Class Parser
java.lang.Object
com.yahoo.search.query.textserialize.parser.Parser
- All Implemented Interfaces:
ParserConstants
-
Field Summary
Modifier 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
ConstructorDescriptionConstructor with generated Token Manager.Parser
(InputStream stream) Constructor with InputStream.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 Boolean
bool()
final void
Disable tracing.final Object
final void
Enable tracing.final Object
form()
forms()
Generate ParseException.final Token
final Token
getToken
(int index) final Object
literal()
map()
final Object
null_()
final Double
number()
void
Reinitialisevoid
ReInit
(InputStream stream) Reinitialisevoid
ReInit
(InputStream stream, String encoding) Reinitialisevoid
Reinitialisefinal Object
start()
final String
string()
final boolean
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
Parser
-
Parser
Constructor with InputStream.- Parameters:
stream
- input stream
-
Parser
Constructor with InputStream and supplied encoding- Parameters:
stream
- input streamencoding
- charset to be used
-
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 stream
-
ReInit
Reinitialise- Parameters:
stream
- input streamencoding
- charset to be used
-
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.
-