|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.LexerSharedInputState | +--org.quasiliteral.antlr.AstroLexerSharedInputState
Untamed: Extension of LexerSharedInputState
that is aware of
file names and can annotate ExtentTokens
with them and
with end position information.
Field Summary | |
private String |
mySourceURL
the name of the file this instance refers to |
Fields inherited from class antlr.LexerSharedInputState |
column, filename, guessing, input, line, tokenStartColumn, tokenStartLine |
Constructor Summary | |
AstroLexerSharedInputState(InputStream s)
Enabled: Construct an instance. |
|
AstroLexerSharedInputState(InputStream s,
String url)
Enabled: Construct an instance. |
Method Summary | |
void |
annotate(AstroToken token)
Enabled: Annotate an AstroToken based on this instance. |
int |
getColumn()
Enabled: Get the current column of this instance. |
int |
getLine()
Enabled: Get the current line of this instance. |
String |
getSourceURL()
Enabled: Get the file name of this instance. |
String |
toString()
Suppressed: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private final String mySourceURL
Constructor Detail |
public AstroLexerSharedInputState(InputStream s, String url)
s
- the input stream to useurl
- The file name to associate with this instancepublic AstroLexerSharedInputState(InputStream s)
s
- the input stream to useMethod Detail |
public String toString()
toString
in class Object
public int getLine()
public int getColumn()
public String getSourceURL()
public void annotate(AstroToken token)
AstroToken
based on this instance. It sets
the end position information as well as the file name.
token
- non-null; the token to annotate
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |