EMERGENCY LANGUAGE is a Pascal based language.
This project was forked from Ghaiklor Pascal Interpreter and used for educational purposes. Was implemented only the compiler front-end, there is no code generation or code interpretation.
You can see the Emergency grammar here
Based on the Ghaiklor Pascal Interpreter was added:
- The syntax is a little bit different.
- IF instruction [DONE]
- WHILE instruction [DONE]
program correto;
inteiro a, b, c;
logico d, e6, f;
{Comentário correto}
inicio
a:=1;
enquanto (a>1) faca
inicio
se (b>10) entao
b:=2;
a:=a-1;
fim //Outro comentario correcto.
fim.
- NodeJS installed.
- Clone the repository or download as .zip
- Open the terminal
- Go to src in the project folder
- Execute the command
node index.js "source file name"
Eg:node index.js programaCorrecto.txt
You can write your own program, enjoy.