Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fhammoud/interpreter
Custom language interpreter written in C
https://github.com/fhammoud/interpreter
Last synced: 2 months ago
JSON representation
Custom language interpreter written in C
- Host: GitHub
- URL: https://github.com/fhammoud/interpreter
- Owner: fhammoud
- Created: 2018-12-11T22:40:58.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T23:53:57.000Z (about 6 years ago)
- Last Synced: 2024-04-24T16:41:46.467Z (9 months ago)
- Language: C
- Size: 1.08 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - interpreter
README
# Custom Interpreter
This was a fun university junior year C project that interprets and executes a custom language.
We were given a grammar and tasked to tokenize and parse code written in the provided text files.
The output should match each text files corresponding expected file.Features of this program:
* Reads in one of the provided test files
* Parse the input file looking for tokens and build the statements
* Interpret and execute the custom code
* Output the result##### To test
###### Linux
* Clone the project and move to its directory
* Run `make` to build the executable
* Run the program and redirect input from one of the test files
* e.g `./main.out < tests/switch_while.txt`
* Verify output###### Windows
This project was written for Linux so running on Visual Studio may require an installation of Windows Subsystem for Linux (WSL)
* Clone the project
* Open the solution file in Visual Studio
* Configure a connection to your WSL installation
* Run the program
* You can change input parameters from `Debug > interpreter Properties > Debugging > Program Arguments`