Commit Graph

10 Commits

Author SHA1 Message Date
Bruno BELANYI 0a4966ae95 calculator: add executable calculator
It can both evaluate and print the given expression.

It uses `click` to parse its CLI options.
2020-11-09 11:49:25 +01:00
Bruno BELANYI 2f240fa78c calculator: update Pipenv files 2020-11-09 11:49:25 +01:00
Bruno BELANYI f77f7b9ed7 calculator: add printer visitor 2020-11-09 11:49:25 +01:00
Bruno BELANYI 2ac7ce0520 calculator: add infix parser 2019-11-30 18:08:15 +01:00
Bruno BELANYI 425733deca calculator: add prefix parser 2019-11-30 17:37:55 +01:00
Bruno BELANYI 220e70ab33 calculator: add postfix parser 2019-11-30 17:32:57 +01:00
Bruno BELANYI 2490e1a5bd calculator: use commonly defined operations 2019-11-30 17:29:09 +01:00
Bruno BELANYI f103adddac calculator: add an evaluation visitor
The `calculator.eval` module defines an `Evaluator` visitor for the AST
hierarchy.
2019-11-30 15:21:42 +01:00
Bruno BELANYI 5ea82de840 calculator: add initial AST implementation
The AST's class hierarchy is defined inside the `calculator.ast` module.

An abstract visitor is defined inside the `calculator.ast.visit`
package.
2019-11-30 15:21:04 +01:00
Bruno BELANYI e7c70bd6a5 calculator: add Pipenv files 2019-11-30 15:15:47 +01:00