public class GrammarException extends CoffeeGrinderException
Grammar exceptions are generally errors in the grammar, use of a nonterminal that has no rule defining it, for example.
| Constructor and Description |
|---|
GrammarException(java.lang.String code,
java.lang.String message)
Grammar exception with a message.
|
GrammarException(java.lang.String code,
java.lang.String message,
java.lang.Throwable cause)
Grammar exception with an underlying cause.
|
| Modifier and Type | Method and Description |
|---|---|
static GrammarException |
grammarIsClosed()
Raised if an attempt is made to write to a closed grammar.
|
static GrammarException |
invalidCharacterClass(java.lang.String name)
Raised if an invalid Unicode character class is specified.
|
static GrammarException |
invalidGrammarRegex()
Raised if a regular expression is used incorrectly.
|
getCodepublic GrammarException(java.lang.String code,
java.lang.String message)
code - the codemessage - the messagepublic GrammarException(java.lang.String code,
java.lang.String message,
java.lang.Throwable cause)
code - the codemessage - the messagecause - the causepublic static GrammarException grammarIsClosed()
public static GrammarException invalidCharacterClass(java.lang.String name)
name - the Unicode character classpublic static GrammarException invalidGrammarRegex()
Regular expressions must be the only symbol on the right hand side of a rule.