diff options
author | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2021-06-11 17:28:55 +0200 |
---|---|---|
committer | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2021-06-11 17:28:55 +0200 |
commit | 98ddff97ec1d092b18ef2d176e83bd92f9671e03 (patch) | |
tree | af1457e05063421dc2860e6c033e58b28f9a8e4e /calculator-java/src/main/java/ch/bfh/parser/Parser.java | |
parent | 49f30529d9cd2ed62902079a45d4d3c1f45afbda (diff) |
[+] Added StatementParser, [~] Restructured the Parsers
Diffstat (limited to 'calculator-java/src/main/java/ch/bfh/parser/Parser.java')
-rw-r--r-- | calculator-java/src/main/java/ch/bfh/parser/Parser.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/calculator-java/src/main/java/ch/bfh/parser/Parser.java b/calculator-java/src/main/java/ch/bfh/parser/Parser.java index 9e048a6..333b942 100644 --- a/calculator-java/src/main/java/ch/bfh/parser/Parser.java +++ b/calculator-java/src/main/java/ch/bfh/parser/Parser.java @@ -3,12 +3,17 @@ package ch.bfh.parser; import ch.bfh.CalculatorLexer; import ch.bfh.Token; +import java.util.HashMap; +import java.util.Map; + abstract class Parser{ + + protected static Map<String, ExpressionParser> variables = new HashMap<>(); //'Persisted' Expressions when 'let' token was specified + protected CalculatorLexer cl; protected Token lastToken; protected double value; protected abstract void parse(); public abstract double getValue(); -} - +}
\ No newline at end of file |