aboutsummaryrefslogtreecommitdiff
path: root/calculator-java/src/main/java/ch/bfh/parser/Parser.java
blob: 6a03fe1662e86712363cdca71c0ec61389eb0e45 (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;

    protected abstract void parse();
    public abstract double getValue();
}