Information about lab05 deadline, and legacy code progress
- tl;dr: communicate with your mentor, and everything will be fine.
- fail to communicate with your mentor, and you are going to have a bad time.
Information about the next two Wednesdays
- will be explained in class.
lab06: some context and high level help
Let’s look at the big picture of lab06:
In particular, this segment of code
public int tokenizeParseAndEvaluate(final String input)
throws TokenizerException, ParserException, EvaluatorException {
return evaluate(parse(tokenize(input)));
}
Let’s review the big picture:
- Tokenizing goes from
String
toArrayList<Token>
- The file Tokenizer.java is an implementation of the finite state automaton
- Parsing goes from
ArrayList<Token>
toAST
- The file Parser.jvaa is an implementation of the context-free grammar.
- Evaluator goes from
AST
to plain oldint
We can see that in this file: