diff options
| author | bjculkin <bjculkin@mix.wvu.edu> | 2017-03-20 19:18:27 -0400 |
|---|---|---|
| committer | bjculkin <bjculkin@mix.wvu.edu> | 2017-03-20 19:18:27 -0400 |
| commit | 70299a3eb281d3083829a0f97c809e2f4af59fe2 (patch) | |
| tree | 22ffb7c922818933822125c35113b6dbd4047a31 /RGens/src/main/java/bjc/rgens/newparser/GrammarException.java | |
| parent | 22237d1476f1496aef6bebf066ff2e6652ba4953 (diff) | |
Work more on parser
This does more work on the parser, including moving from the old
LineReader/Scanner combo to BlockReader.
It includes more syntax checking, but still doesn't actually do anything.
With some dummy methods in RGrammarBuilder, should be able to see if the
basic file parser is working correctly.
Where blocks and their syntax still need to implemented, and actual pragma
implementations need to be provided.
Diffstat (limited to 'RGens/src/main/java/bjc/rgens/newparser/GrammarException.java')
| -rw-r--r-- | RGens/src/main/java/bjc/rgens/newparser/GrammarException.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/RGens/src/main/java/bjc/rgens/newparser/GrammarException.java b/RGens/src/main/java/bjc/rgens/newparser/GrammarException.java new file mode 100644 index 0000000..c9f2723 --- /dev/null +++ b/RGens/src/main/java/bjc/rgens/newparser/GrammarException.java @@ -0,0 +1,39 @@ +package bjc.rgens.newparser; + +/** + * The exception thrown when something goes wrong while parsing a + * grammar. + * + * @author student + * + */ +public class GrammarException extends RuntimeException { + /* + * 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 GrammarException(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 GrammarException(String msg, Exception cause) { + super(msg, cause); + } +}
\ No newline at end of file |
