Whitespace Evaluator is an interpreter for the Whitespace programming language written in Scala 3. The interpreter utilizes scala parser combinators for parsing Whitespace code and is built using sbt (Simple Build Tool).
Whitespace is an esoteric programming language where the only meaningful characters are space, tab, and newline. All other characters are ignored, making the code visually resemble whitespace. Programs in Whitespace are defined by sequences of these whitespace characters, and they are executed based on the lengths of these sequences.
- Whitespace Interpreter: Parses and interprets Whitespace code.
- Parser Combinators: Utilizes Scala 3's parser combinators for stability and easy to understand code.
- SBT Build: Uses SBT as the building tool for the project.
- CI/CD Testing: CI/CD pipeline ensures continuous testing of the interpreter.
Ensure you have the following prerequisites installed before using the Whitespace Evaluator:
-
Clone this repository to your local machine:
git clone https://github.com/Andreal2000/WhitespaceEvaluator.git
-
Navigate to the project directory:
cd WhitespaceEvaluator
-
Build the project using SBT:
sbt compile
To execute a whitespace program, provide the program as input to the interpreter:
sbt "run path/to/your/whitespace-program.ws"
To execute multiple whitespace programs in succession, provide the paths to the programs as input to the interpreter:
sbt "run path/to/first/whitespace-program.ws path/to/second/whitespace-program.ws ... path/to/nth/whitespace-program.ws"
This command will execute each whitespace program in the specified order. Adjust the file paths accordingly to include all the whitespace programs you want to run.
This project includes unit tests to ensure the correctness of the interpreter. To run the tests, use the following command:
sbt test
The CI/CD pipeline also automatically runs these tests to ensure continuous integration.