public class CommonTokenFactory extends Object implements TokenFactory<CommonToken>
Modifier and Type | Field and Description |
---|---|
protected boolean |
copyText
Copy text for token out of input char stream.
|
static TokenFactory<CommonToken> |
DEFAULT |
Constructor and Description |
---|
CommonTokenFactory() |
CommonTokenFactory(boolean copyText)
Create factory and indicate whether or not the factory copy
text out of the char stream.
|
Modifier and Type | Method and Description |
---|---|
CommonToken |
create(int type,
String text)
Generically useful
|
CommonToken |
create(Pair<TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine)
This is the method used to create tokens in the lexer and in the
error handling strategy.
|
public static final TokenFactory<CommonToken> DEFAULT
protected final boolean copyText
UnbufferedCharStream
public CommonTokenFactory(boolean copyText)
public CommonTokenFactory()
public CommonToken create(Pair<TokenSource,CharStream> source, int type, String text, int channel, int start, int stop, int line, int charPositionInLine)
TokenFactory
create
in interface TokenFactory<CommonToken>
public CommonToken create(int type, String text)
TokenFactory
create
in interface TokenFactory<CommonToken>
Copyright © 1992-2013 ANTLR. All Rights Reserved.