public abstract class Parser extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
ARROW |
protected static int |
BIG |
protected static int |
BYTES |
protected static int |
CLOSE_BRACE |
protected static int |
CLOSE_BRACKET |
protected static int |
CLOSE_PAREN |
protected static int |
COMMA |
protected static int |
DEC_VAL |
protected static int |
DECIMAL |
protected static int |
DOUBLE_SPECIAL_VAL |
protected static int |
EXPRESSION |
protected static int |
FALSE |
protected static int |
INITIAL |
protected static int |
INT_HEX_VAL |
protected static int |
INT_VAL |
protected static int |
INTEGER |
protected static int |
LONG_HEX_VAL |
protected static int |
LONG_VAL |
protected static int |
OPEN_BRACE |
protected static int |
OPEN_BRACKET |
protected static int |
OPEN_PAREN |
protected static int |
STR_VAL |
protected static int |
TRUE |
protected static int |
TYPE_VAL |
protected static int |
UNDEFINED |
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
protected void |
begin(int baseState)
Set the lexer's current state.
|
protected void |
begin(String state)
This function is used to change the initial state for the lexer.
|
void |
echo()
Print the current string token to the standard output.
|
InputStream |
getInput()
Obtain the current input.
|
void |
setBufferSize(int bufferSize)
Set the internal buffer size.
|
void |
setInput(InputStream is)
Set the current input.
|
protected void |
yyClearError()
Clear the error flag.
|
protected Object |
yyGetValue(int arg)
Gets the object value associated with the symbol at the argument's position.
|
int |
yyInputStackSize()
Obtain the number of input objects on the stack.
|
int |
yyLength()
Get the current text token's length.
|
protected void |
yyLess(int n)
Put all but n characters back to the input stream.
|
protected int |
yyLex()
Call this function to start the scanning of the input.
|
int |
yyParse()
Call this function to start parsing.
|
protected boolean |
yyParseError(int terminal)
This function reports error and return true if critical error occurred, or
false if the error has been successfully recovered.
|
protected org.jboss.dmr.Parser.YYParserState |
yyPeekLookahead()
This function is used by the error handling grammars to check the immediate
lookahead token on the stack.
|
void |
yyPopInput()
Switch the current input to the old input on stack.
|
protected void |
yyPopLexerState()
Restore the previous lexer state.
|
protected void |
yyPopLookahead()
This function is used by the error handling grammars to pop an unwantted
token from the lookahead stack.
|
void |
yyPushInput(InputStream is)
Switch the current input to the new input.
|
protected void |
yyPushLexerState(int newState)
Push the current state onto lexer state onto stack and
begin the new state specified by the user.
|
protected void |
yyPushLexerState(String state)
Push the current state onto lexer state onto stack and
begin the new state specified by the user.
|
protected boolean |
yyRefreshBuffer() |
void |
yyResetBuffer()
Reset the internal buffer.
|
protected void |
yySetValue(Object value)
Set the object value for the current non-terminal being reduced.
|
String |
yyText()
Get the current token text.
|
protected boolean |
yyWrap()
Check if there are more inputs.
|
protected static final int OPEN_BRACE
protected static final int CLOSE_BRACE
protected static final int OPEN_BRACKET
protected static final int CLOSE_BRACKET
protected static final int OPEN_PAREN
protected static final int CLOSE_PAREN
protected static final int ARROW
protected static final int COMMA
protected static final int BIG
protected static final int BYTES
protected static final int INTEGER
protected static final int DECIMAL
protected static final int EXPRESSION
protected static final int UNDEFINED
protected static final int TRUE
protected static final int FALSE
protected static final int INT_VAL
protected static final int INT_HEX_VAL
protected static final int LONG_VAL
protected static final int LONG_HEX_VAL
protected static final int DOUBLE_SPECIAL_VAL
protected static final int DEC_VAL
protected static final int STR_VAL
protected static final int TYPE_VAL
protected static final int INITIAL
public void setInput(InputStream is)
is
- the new input.public InputStream getInput()
public void yyPushInput(InputStream is)
is
- the new inputpublic void yyPopInput()
public int yyInputStackSize()
public String yyText()
Avoid calling this function unless it is absolutely necessary since it creates a copy of the token string. The string length can be found by reading _yyLength or calling yyLength () function.
public int yyLength()
public void echo()
protected void yyLess(int n)
n
- The number of characters.protected void begin(int baseState)
baseState
- the base state indexprotected void yyPushLexerState(int newState)
newState
- the new state.protected void yyPopLexerState()
protected boolean yyRefreshBuffer() throws IOException
IOException
public void yyResetBuffer()
public void setBufferSize(int bufferSize)
bufferSize
- the new buffer size.protected int yyLex() throws IOException
IOException
- in case of I/O error.public int yyParse() throws IOException
IOException
- in case of errorprotected org.jboss.dmr.Parser.YYParserState yyPeekLookahead()
protected void yyPopLookahead()
protected void yyClearError()
This function is used in error recovery.
protected boolean yyParseError(int terminal) throws IOException
terminal
- the terminal that caused the error.IOException
- in case of error.protected Object yyGetValue(int arg)
arg
- the symbol position starting from 1.protected void yySetValue(Object value)
value
- the object value for the current non-terminal.protected void begin(String state)
state
- the name of the stateprotected void yyPushLexerState(String state)
state
- the new state.protected boolean yyWrap() throws IOException
IOException
- in case of an IO errorCopyright © 2016 JBoss by Red Hat. All rights reserved.