Package eu.bandm.tools.lexic
Class TokenRule<T>
java.lang.Object
eu.bandm.tools.lexic.TokenRule<T>
- Type Parameters:
T
- the type of token types
Associates a token type with a syntax fragment.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) NAutomaton<T>
Returns the automaton that implements the syntax fragment of this rule.getType()
Returns the token type of this rule.toString()
-
Constructor Details
-
TokenRule
Creates a new instance.- Parameters:
type
- the token type; whethernull
is acceptable is application-dependentfragment
- the syntax fragment
-
-
Method Details
-
getType
Returns the token type of this rule.- Returns:
- the token type of this rule
-
getImplementation
NAutomaton<T> getImplementation()Returns the automaton that implements the syntax fragment of this rule.- Returns:
- the automaton that implements the syntax fragment of this rule
-
toString
-