public abstract class Token extends Decoratable
This is an abstraction for input tokens. It allows the parser to be used, for example, for both sequences of characters and sequences of strings. (Sequences of anything you like, provided you define the tokens.)
The only thing that's important about tokens is that we can tell when they match each other. This is not the same as equality becuase, for example, the same regular expression token might match many different input strings.
|Constructor and Description|
A token with attributes.
|Modifier and Type||Method and Description|
What is this token?
Does this token match the input?
addAttribute, addAttributes, getAttribute, getAttributes, getAttributesMap, getAttributeValue, hasAttribute
public abstract boolean matches(Token input)
input- The input.
public abstract java.lang.String getValue()