public abstract class AbstractLexicalAnalyzer extends Object implements LexicalAnalyzer
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractLexicalAnalyzer.Buffer |
LexicalAnalyzer.Token
Modifier and Type | Field and Description |
---|---|
protected AbstractLexicalAnalyzer.Buffer |
buffer |
protected static char |
EOF |
protected DefaultToken |
token |
protected Map<String,Integer> |
tokens |
Constructor and Description |
---|
AbstractLexicalAnalyzer() |
AbstractLexicalAnalyzer(String source) |
Modifier and Type | Method and Description |
---|---|
protected char |
getch() |
protected int |
getPosition() |
protected abstract LexicalAnalyzer.Token |
getToken() |
protected boolean |
isEOF() |
LexicalAnalyzer.Token |
look() |
LexicalAnalyzer.Token |
next() |
protected void |
parseNumber() |
protected void |
parseString() |
protected void |
pop_state() |
protected void |
push_state() |
void |
setSource(String source) |
protected void |
skipblanks() |
protected void |
ungetch() |
protected static final char EOF
protected final AbstractLexicalAnalyzer.Buffer buffer
protected final DefaultToken token
public AbstractLexicalAnalyzer(String source)
public AbstractLexicalAnalyzer()
public void setSource(String source)
setSource
in interface LexicalAnalyzer
public LexicalAnalyzer.Token next()
next
in interface LexicalAnalyzer
public LexicalAnalyzer.Token look()
look
in interface LexicalAnalyzer
protected abstract LexicalAnalyzer.Token getToken()
protected void push_state()
protected void pop_state()
protected int getPosition()
protected boolean isEOF()
protected void skipblanks()
protected char getch()
protected void ungetch()
protected void parseString()
protected void parseNumber()