public abstract class AbstractLexicalAnalyzer extends java.lang.Object implements LexicalAnalyzer
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractLexicalAnalyzer.Buffer |
protected class |
AbstractLexicalAnalyzer.DefaultToken |
static class |
AbstractLexicalAnalyzer.RowCol |
LexicalAnalyzer.Token
Modifier and Type | Field and Description |
---|---|
protected AbstractLexicalAnalyzer.Buffer |
buffer |
protected static char |
EOF |
protected LexicalAnalyzer.Token |
token |
protected java.util.Map<java.lang.String,java.lang.Integer> |
tokens |
protected boolean |
useBracketsForIdentifiers |
Constructor and Description |
---|
AbstractLexicalAnalyzer() |
AbstractLexicalAnalyzer(java.lang.String source) |
Modifier and Type | Method and Description |
---|---|
LexicalAnalyzer |
clone()
Creates a copy of the object.
|
protected LexicalAnalyzer.Token |
createToken() |
void |
drop_state() |
protected char |
getch() |
int |
getColumn() |
int |
getLine() |
int |
getMaxColumn() |
int |
getMaxLine() |
int |
getMaxPosition() |
int |
getPosition() |
java.lang.String |
getSource() |
java.lang.String |
getSourceContext() |
protected abstract LexicalAnalyzer.Token |
getToken() |
boolean |
getUseBracketsForIdentifiers() |
boolean |
isEOF() |
LexicalAnalyzer.Token |
look() |
protected char |
lookch() |
LexicalAnalyzer.Token |
next() |
protected void |
parseDMSNumber() |
protected void |
parseNumber() |
protected void |
parseString() |
void |
restore_state() |
void |
save_state() |
void |
setSource(java.lang.String source) |
void |
setUseBracketsForIdentifiers(boolean useBracketsForIdentifiers) |
protected void |
skipblanks() |
protected void |
ungetch() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cloneQuietly, cloneQuietly
protected static final char EOF
protected AbstractLexicalAnalyzer.Buffer buffer
protected LexicalAnalyzer.Token token
protected java.util.Map<java.lang.String,java.lang.Integer> tokens
protected boolean useBracketsForIdentifiers
public AbstractLexicalAnalyzer(java.lang.String source)
public AbstractLexicalAnalyzer()
protected LexicalAnalyzer.Token createToken()
public LexicalAnalyzer clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in interface LexicalAnalyzer
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public void setSource(java.lang.String source)
setSource
in interface LexicalAnalyzer
public java.lang.String getSource()
getSource
in interface LexicalAnalyzer
public LexicalAnalyzer.Token next()
next
in interface LexicalAnalyzer
public LexicalAnalyzer.Token look()
look
in interface LexicalAnalyzer
protected abstract LexicalAnalyzer.Token getToken()
public void save_state()
save_state
in interface LexicalAnalyzer
public void restore_state()
restore_state
in interface LexicalAnalyzer
public void drop_state()
drop_state
in interface LexicalAnalyzer
public int getPosition()
getPosition
in interface LexicalAnalyzer
public int getMaxPosition()
getMaxPosition
in interface LexicalAnalyzer
public int getLine()
getLine
in interface LexicalAnalyzer
public int getMaxLine()
getMaxLine
in interface LexicalAnalyzer
public int getColumn()
getColumn
in interface LexicalAnalyzer
public int getMaxColumn()
getMaxColumn
in interface LexicalAnalyzer
public boolean isEOF()
isEOF
in interface LexicalAnalyzer
protected void skipblanks()
protected char lookch()
protected char getch()
protected void ungetch()
protected void parseString()
protected void parseDMSNumber()
protected void parseNumber()
public void setUseBracketsForIdentifiers(boolean useBracketsForIdentifiers)
setUseBracketsForIdentifiers
in interface LexicalAnalyzer
public boolean getUseBracketsForIdentifiers()
getUseBracketsForIdentifiers
in interface LexicalAnalyzer
public java.lang.String getSourceContext()
getSourceContext
in interface LexicalAnalyzer