From fed70f3ac817ed4943a230cb901fcd65dc6fdd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gassmann?= Date: Fri, 11 Jun 2021 20:55:12 +0200 Subject: [~] First totaly functional Calculator, reorganised the files, verified and added error messages --- calculator-java/src/main/java/ch/bfh/parser/ParserException.java | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 calculator-java/src/main/java/ch/bfh/parser/ParserException.java (limited to 'calculator-java/src/main/java/ch/bfh/parser/ParserException.java') diff --git a/calculator-java/src/main/java/ch/bfh/parser/ParserException.java b/calculator-java/src/main/java/ch/bfh/parser/ParserException.java new file mode 100644 index 0000000..a85e3b2 --- /dev/null +++ b/calculator-java/src/main/java/ch/bfh/parser/ParserException.java @@ -0,0 +1,8 @@ +package ch.bfh.parser; + +import ch.bfh.lexer.Token; + +public class ParserException extends RuntimeException { + public ParserException(String s) { super(s); } + public ParserException(Token token, String s) { super("Last read token: '"+token.str+"', "+s); } +} \ No newline at end of file -- cgit v1.2.3