https://github.com/comidan/calculatorlanguagecompiler
A simple calculator language and its compiler
https://github.com/comidan/calculatorlanguagecompiler
Last synced: 6 months ago
JSON representation
A simple calculator language and its compiler
- Host: GitHub
- URL: https://github.com/comidan/calculatorlanguagecompiler
- Owner: comidan
- Created: 2019-11-22T20:22:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-25T17:28:07.000Z (over 6 years ago)
- Last Synced: 2025-08-26T08:43:59.572Z (11 months ago)
- Language: Yacc
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CalculatorLanguageCompiler
A simple calculator language and its compiler.
Language syntax is the following :
```
integer * [let var1 = ?]{ var1 + integer + [let var2 = integer, var3 = ?]{ var2 - var3} };
```
Where :
● Integer is any integer number
● To declare a variable you have to write [let = ? or integer], where if ? is present it'll let you insert dyamically any integer.
● After a declaration there has to be an operation on the variable inside {}
● There can be annidated variables declaration
● Variables with the same name will always refer to their nearest declaration inside {}
The corrispettive compiler was built using Flex and Bison under a Linux environment.
The compiler executable is already built.