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

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

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.