From cea3e47938322b97c318dea38dc0d649e196dc1b Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 16 Aug 2022 23:03:27 -0400 Subject: Refactor to add backtracking support This probably doesn't help w/ error messages, but it enables some cool ideas where syntax can be reused in cases where it would otherwise be invalid --- .../java/bjc/pratt/tokens/ExpectionNotMet.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 JPratt/src/main/java/bjc/pratt/tokens/ExpectionNotMet.java (limited to 'JPratt/src/main/java/bjc/pratt/tokens/ExpectionNotMet.java') diff --git a/JPratt/src/main/java/bjc/pratt/tokens/ExpectionNotMet.java b/JPratt/src/main/java/bjc/pratt/tokens/ExpectionNotMet.java new file mode 100644 index 0000000..2bd45e2 --- /dev/null +++ b/JPratt/src/main/java/bjc/pratt/tokens/ExpectionNotMet.java @@ -0,0 +1,23 @@ +package bjc.pratt.tokens; + +import bjc.utils.parserutils.ParserException; + +/** + * The exception thrown when an expectation fails. + * + * @author EVE + * + */ +public class ExpectionNotMet extends ParserException { + private static final long serialVersionUID = 4299299480127680805L; + + /** + * Create a new exception with the specified message. + * + * @param msg + * The message of the exception. + */ + public ExpectionNotMet(final String msg) { + super(msg); + } +} \ No newline at end of file -- cgit v1.2.3