10. User Manual
Installation Requirements
To build and run this project, the following requirements must be met:
- A C++ compiler (such as
g++orclang++) - The
makebuild system installed - A Unix-based environment:
- macOS is fully supported
- Linux is supported, but may require additional standard library headers depending on the distribution and compiler configuration
Windows is not natively supported without a compatibility layer such as WSL (Windows Subsystem for Linux).
Cloning the Repository
To obtain the project source code, clone the repository using Git:
git clone git@git.staiduhar.com:arizotaz/trivial_c_plus.git
After cloning, navigate into the project directory:
cd <project-folder-name>
Building the Project
The project uses a Makefile for compilation. To build the interpreter, run:
make trivial
This command compiles all necessary source files and generates the executable named trivial.
If compilation issues occur on Linux, it may be necessary to install additional development headers or ensure that a modern C++ compiler standard (e.g., C++11 or later) is enabled.
Running the Interpreter
Once the project has been successfully built, there are two ways to run it:
- Interactive Shell Mode
To launch the Trivial interactive interpreter:
./trivial
This starts a shell-like environment where Trivial statements can be entered and executed line by line.
- File Execution Mode
To execute a Trivial program stored in a file:
./trivial {filename}
Replace {filename} with the path to the Trivial source file. The interpreter will read the file, process it, and execute the program sequentially.
Example:
./trivial example.tri