An open API service indexing awesome lists of open source software.

https://github.com/foufoujoujou/binary-expression-evaluator

A binary expression evaluator as test study for a pascal mini compiler
https://github.com/foufoujoujou/binary-expression-evaluator

Last synced: 9 days ago
JSON representation

A binary expression evaluator as test study for a pascal mini compiler

Awesome Lists containing this project

README

          

#+TITLE: Binary expression evaluator in RAW C
** Description
An attempt to compile and run a binary expression for my mini pascal compiler project.
** Resouces
- [[https://web.stonehill.edu/compsci/CS104/Stuff/Infix%20and%20%20postfix%20expressions.pdf][Infix and postfix expressions]]
- [[https://en.wikipedia.org/wiki/Binary_expression_tree][Binary expression tree]]
** Instructions
*** To run the program with an expression passed as a command line argument:
#+BEGIN_SRC bash
mkdir
cd
cmake ..
make
./main help
#+END_SRC

* TODO Functionality [8/9]
- [X] Help
- [X] Basic operation parsing[4/4]
- [X] +
- [X] -
- [X] /
- [X] *
- [X] Adding support for command line arguments
- [X] Adding support for parentheses
- [X] Building a binary expression tree from a postfix expression
- [X] Evaluating a binary expression tree
- [X] Implementing a small lexer for multi-digit integer support
- [X] Adding support for unary operators [0/1]
- [x] negate (-expression)
- [] prefix plus (+expression)
- [ ] Adding support for boolean operators[0/4]
- [ ] And(&)
- [ ] Or(|)
- [ ] Not(!)
- [ ] Xor(^)