University project for my OOP class
Build an Abstract Syntax Tree for the ArnoldC language. Once the Abstract Syntax Tree is build, print and interpret it using the Visitor Pattern. The tests are located in tests folder. It is guaranteed that the tests are correct and do not contain any lexical/semantic/syntactic error. The output-ref folder contains the correct output for each test.
For this project, the tests will cover only the following instructions:
- False I LIED
- True NO PROBLEMO
- If BECAUSE I'M GOING TO SAY PLEASE
- Else BULLSHIT
- EndIf YOU HAVE NO RESPECT FOR LOGIC
- While STICK AROUND
- EndWhile CHILL
- PlusOperator GET UP
- MinusOperator GET DOWN
- MultiplicationOperator YOU'RE FIRED
- DivisionOperator HE HAD TO SPLIT
- ModuloOperator I LET HIM GO
- EqualTo YOU ARE NOT YOU YOU ARE ME
- GreaterThan LET OFF SOME STEAM BENNET
- Or CONSIDER THAT A DIVORCE
- And KNOCK KNOCK
- DeclareInt HEY CHRISTMAS TREE
- SetInitialValue YOU SET US UP
- BeginMain IT'S SHOWTIME
- EndMain YOU HAVE BEEN TERMINATED
- Print TALK TO THE HAND
- AssignVariable GET TO THE CHOPPER
- SetValue HERE IS MY INVITATION
- EndAssignVariable ENOUGH TALK