blob: 496dadfd498edc943a355e46670220fc298814a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package ch.bfh.parser;
import ch.bfh.lexer.CalculatorLexer;
import ch.bfh.lexer.Token;
import java.util.HashMap;
import java.util.Map;
abstract class Parser{
protected static Map<String, ExpressionParser> variables = new HashMap<>(); //Persisted Expressions aka variables
protected CalculatorLexer cl;
protected Token lastToken;
protected Double value = null;
protected abstract void parse();
public abstract double getValue();
}
|