diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-03 23:59:30 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-04 00:01:28 -0300 |
| commit | 5c416488ef63b5004ca424de56894eb17712f116 (patch) | |
| tree | b16cb41e704f8046ce75d094bfe5968116d93dfe /src/main/java/bjc/rgens/parser/RecurLimitException.java | |
| parent | 63aaf20560a2c4037cab8a7ef5fd6251d6036a2d (diff) | |
Add recurrance limit
This controls the number of times a rule can be entered into during a
single generations, and is set to 5 by default
Diffstat (limited to 'src/main/java/bjc/rgens/parser/RecurLimitException.java')
| -rw-r--r-- | src/main/java/bjc/rgens/parser/RecurLimitException.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/bjc/rgens/parser/RecurLimitException.java b/src/main/java/bjc/rgens/parser/RecurLimitException.java new file mode 100644 index 0000000..faeffb3 --- /dev/null +++ b/src/main/java/bjc/rgens/parser/RecurLimitException.java @@ -0,0 +1,35 @@ +package bjc.rgens.parser; + +/** + * The exception thrown when a rule exceeds its recurrence limit + * + * @author student + */ +public class RecurLimitException extends GrammarException { + /* Serialization ID. */ + private static final long serialVersionUID = -7287427479316953668L; + + /** + * Create a new grammar exception with the specified message. + * + * @param msg + * The message for this exception. + */ + public RecurLimitException(String msg) { + super(msg); + } + + /** + * Create a new grammar exception with the specified message and + * cause. + * + * @param msg + * The message for this exception. + * + * @param cause + * The cause of this exception. + */ + public RecurLimitException(String msg, Exception cause) { + super(msg, cause); + } +} |
