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 variables = new HashMap<>(); //Persisted Expressions aka variables protected CalculatorLexer cl; protected Token lastToken; protected double value; protected abstract void parse(); public abstract double getValue(); }