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

https://github.com/mj10/yet-another-programming-language

A simple interpreter built using Yacc and Lex
https://github.com/mj10/yet-another-programming-language

interpreter lex yacc

Last synced: 3 months ago
JSON representation

A simple interpreter built using Yacc and Lex

Awesome Lists containing this project

README

          

# Yet Another Programming Language

This is a simple interpreter built using `bison` and `flex` for the a programming language defined by the following grammar:

```
:= [ ] |
|
:= [a-zA-Z]+
:= [0-9]+
:= ‘+’ | ‘*’ | ‘==‘ | ‘<‘
:= [ = ] |
[ ; ] |
[ if ] |
[ while ] |
[ return ]
```

## Requirements

To build the interpreter you need `flex` and `bison` installed.

For installing bison and flex on Ubuntu, use the following command:

```bash
sudo apt install build-essential bison flex
```

## Building the Interpreter

To build the interpreter use the following command:

```bash
bash build
```

To clear the build files for a new build, use the following:

```bash
bash clean
```

## License

This repository is licensed under the [MIT License](https://github.com/MJ10/Yet-Another-Programming-Language/blob/master/LICENSE.md)