public class TokenFactory extends java.lang.Object implements ITokenFactory
Modifier and Type | Field and Description |
---|---|
static TokenFactory |
Singleton
Singleton instance of this class
|
Modifier | Constructor and Description |
---|---|
private |
TokenFactory()
private constructor needed for singleton
|
Modifier and Type | Method and Description |
---|---|
Token |
makeToken(java.lang.String name,
java.lang.String lexeme)
Creates Tokens from the given name and lexeme.
|
public static final TokenFactory Singleton
public Token makeToken(java.lang.String name, java.lang.String lexeme)
makeToken
in interface ITokenFactory
name
- The name of the tokenlexeme
- The lexeme value for the token