TokenFactory creates
CommonToken objects.
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | copyText
Indicates whether |
| public static final TokenFactory | DEFAULT
The default |
| Access | Constructor and Description |
|---|---|
| public | CommonTokenFactory(boolean
The value for copyText)copyText.Constructs a |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public CommonToken | create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine)
Implements org. |
| public CommonToken | create(int type, String text)
Implements org. |
| copyText | back to summary |
|---|---|
| protected final boolean copyText Indicates whether
The default value is | |
| DEFAULT | back to summary |
|---|---|
| public static final TokenFactory<CommonToken> DEFAULT The default This token factory does not explicitly copy token text when constructing tokens. | |
| CommonTokenFactory | back to summary |
|---|---|
| public CommonTokenFactory(boolean copyText) Constructs a
When
| |
| CommonTokenFactory | back to summary |
|---|---|
| public CommonTokenFactory() Constructs a
The | |
| create | back to summary |
|---|---|
| public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine) Implements org. Doc from org. This is the method used to create tokens in the lexer and in the error handling strategy. If text!=null, than the start and stop positions are wiped to -1 in the text override is set in the CommonToken.
| |
| create | back to summary |
|---|---|
| public CommonToken create(int type, String text) Implements org. Doc from org. Generically useful
| |