abstract class YaccLexer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
YaccLexer.cc_lexer |
private static class |
YaccLexer.cc_parser |
private static class |
YaccLexer.YYParserState |
Modifier and Type | Field and Description |
---|---|
private int |
_yyArgStart |
private int |
_yyBaseState |
private boolean |
_yyBOL |
private byte[] |
_yyBuffer |
private int |
_yyBufferEnd |
private int |
_yyBufferSize |
private boolean |
_yyInError |
private java.io.InputStream |
_yyIs |
private boolean |
_yyIsNextBOL |
private int |
_yyLength |
private java.util.Stack |
_yyLexerStack |
private java.util.LinkedList |
_yyLookaheadStack |
private int |
_yyMatchStart |
private java.util.Vector |
_yyStateStack |
private int |
_yyTextStart |
private java.lang.Object |
_yyValue |
protected static int |
ACTION |
protected static int |
ACTION_CODE |
protected static int |
BLOCKCOMMENT |
protected static int |
CODEINCLUDE |
protected static int |
INITIAL |
private YaccParser |
m_this |
protected static int |
PARTIAL_ACTION |
protected static int |
PREC |
protected static int |
SECTION2 |
protected static int |
SECTION3 |
protected static int |
SEPARATOR |
protected static int |
START |
protected static int |
TOKEN |
protected static int |
TOKENTYPE |
protected static int |
TYPE |
protected static int |
TYPEINFO |
Constructor and Description |
---|
YaccLexer() |
Modifier and Type | Method and Description |
---|---|
protected void |
begin(int baseState)
Set the lexer's current state.
|
protected void |
begin(java.lang.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.
|
java.io.InputStream |
getInput() |
boolean |
isBOL()
Check whether or not the current token at the beginning of the line.
|
void |
setBufferSize(int bufferSize)
Set the internal buffer size.
|
void |
setInput(java.io.InputStream is) |
protected void |
yyClearError()
Clear the error flag.
|
protected java.lang.Object |
yyGetValue(int arg)
Gets the object value associated with the symbol at the argument's position.
|
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 YaccLexer.YYParserState |
yyPeekLookahead()
This function is used by the error handling grammars to check the immediate
lookahead token on the 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.
|
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(java.lang.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(java.lang.Object value)
Set the object value for the current non-terminal being reduced.
|
java.lang.String |
yyText()
Get the current token text.
|
protected static final int TOKENTYPE
protected static final int TYPE
protected static final int TYPEINFO
protected static final int TOKEN
protected static final int START
protected static final int SEPARATOR
protected static final int PREC
protected static final int PARTIAL_ACTION
protected static final int ACTION_CODE
protected static final int INITIAL
protected static final int SECTION2
protected static final int ACTION
protected static final int BLOCKCOMMENT
protected static final int CODEINCLUDE
protected static final int SECTION3
private final java.util.LinkedList _yyLookaheadStack
private final java.util.Vector _yyStateStack
private boolean _yyInError
private int _yyArgStart
private java.lang.Object _yyValue
private java.io.InputStream _yyIs
private byte[] _yyBuffer
private int _yyBufferSize
private int _yyMatchStart
private int _yyBufferEnd
private int _yyBaseState
private int _yyTextStart
private int _yyLength
private java.util.Stack _yyLexerStack
private boolean _yyIsNextBOL
private boolean _yyBOL
private final YaccParser m_this
public void setInput(java.io.InputStream is)
public java.io.InputStream getInput()
public boolean isBOL()
public java.lang.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 java.io.IOException
java.io.IOException
public void yyResetBuffer()
public void setBufferSize(int bufferSize)
bufferSize
- the new buffer size.protected int yyLex() throws java.io.IOException
java.io.IOException
- in case of I/O error.public int yyParse() throws java.io.IOException
java.io.IOException
- in case of errorprotected YaccLexer.YYParserState yyPeekLookahead()
protected void yyPopLookahead()
protected void yyClearError()
This function is used in error recovery.
protected boolean yyParseError(int terminal) throws java.io.IOException
terminal
- the terminal that caused the error.java.io.IOException
- in case of error.protected java.lang.Object yyGetValue(int arg)
arg
- the symbol position starting from 1.protected void yySetValue(java.lang.Object value)
value
- the object value for the current non-terminal.protected void begin(java.lang.String state)
state
- the name of the stateprotected void yyPushLexerState(java.lang.String state)
state
- the new state.