Package org.nineml.coffeegrinder.util
Class ParserAttribute
java.lang.Object
org.nineml.coffeegrinder.util.ParserAttribute
Attributes that can be associated with a symbol or token.
ParserAttributes are a way to associate arbitrary additional information with the symbols in the grammar or the tokens in the input. For example, to associate additional metadata with nonterminals or to associate line and column numbers with tokens.
It's worth observing that the terminals created from the input stream don't get metadata.
-
Field Details
-
LINE_NUMBER_NAME
- See Also:
-
COLUMN_NUMBER_NAME
- See Also:
-
OFFSET_NAME
- See Also:
-
REGEX_NAME
- See Also:
-
-
Constructor Details
-
ParserAttribute
Create a parser attribute.- Parameters:
name- the attribute namevalue- the attribute value- Throws:
NullPointerException- if the name or value are null
-
-
Method Details