public final class Lexan
extends java.lang.Object
Constructor and Description |
---|
Lexan(java.lang.Class<?> tokensClass)
Initialize a lexical analyzer to a set of Token objects.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TokLex> |
getTokLexes()
Get this lexical analyzer's list of toklexes.
|
void |
lex(java.lang.String str)
Lex an input string into a list of toklexes.
|
public Lexan(java.lang.Class<?> tokensClass) throws LexanException
tokensClass
- the Class object of a class containing a set of Token
objectsLexanException
- unable to construct a Lexan object, possibly
because there are no Token objects in the classpublic java.util.List<TokLex> getTokLexes()
public void lex(java.lang.String str) throws LexException
str
- the string being lexedLexException
- unexpected character found in input