Implementation of a simple interpreter that uses stacks.
Many programming languages are compiled to an abstract machine compiled in stacks. With this in mind, in this software you can use operator and solutions that are stored in stacks.
- Some basic commands you can use are:
push
- receive an integer and add to the stackadd
- add two numberssub
- subtract two numbersdiv
- divide two numbersprint
- remove the last value from the stack and prints itstack
- print the entire stackpopx
- remove the last element of the stack and saves itpushx
- pushs the saved data without argument
> push 10
operation: push
argument: 10
> push 30
operation: push
argument: 30
> print
operation: print
argument:
----- Stack -----
10
30
> mult
operation: mult
argument:
> print
operation: print
argument:
----- Stack -----
300