|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.parcinj.Token
public final class Token
Immutable class representing a parsed chunk of text.
| Constructor Summary | |
|---|---|
Token(TerminalSymbolType terminalSymbol,
int lineNumber,
int columnNumber)
Creates an instance for the specified terminal symbol which provides the token text and TokenType. |
|
Token(TokenType type,
java.lang.String text,
int lineNumber,
int columnNumber)
Creates an instance for the specified chunk of text. |
|
| Method Summary | |
|---|---|
int |
getColumnNumber()
Returns the column number where the token text starts. |
int |
getLineNumber()
Returns the line number where the token text starts. |
java.lang.String |
getText()
Returns the token text. |
TokenType |
getType()
Returns the type of this token. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Token(TerminalSymbolType terminalSymbol,
int lineNumber,
int columnNumber)
TokenType.
lineNumber - Line number in the text where this token starts.columnNumber - Column number in the text where this token starts.
public Token(TokenType type,
java.lang.String text,
int lineNumber,
int columnNumber)
type - Type of this token.lineNumber - Line number in the text where this token starts.columnNumber - Column number in the text where this token starts.| Method Detail |
|---|
public final TokenType getType()
public final java.lang.String getText()
public final int getLineNumber()
public final int getColumnNumber()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||