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
- Host: GitHub
- URL: https://github.com/mj10/yet-another-programming-language
- Owner: MJ10
- License: mit
- Created: 2018-02-15T07:25:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T08:28:10.000Z (over 6 years ago)
- Last Synced: 2025-06-04T04:16:19.242Z (about 1 year ago)
- Topics: interpreter, lex, yacc
- Language: Yacc
- Homepage:
- Size: 14.6 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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)