A compiler for SoulFu game scripts, written in C. This tool processes script files and generates executable bytecode for the SoulFu game engine.
- Compiles SoulFu script files (.SRC) into runnable bytecode (.RUN)
- Handles preprocessing, tokenization, and opcode generation
- Supports function definitions, variables, and control structures
- Includes buffer management utilities for file I/O
The project uses a Makefile for building:
makeThis will compile the executable ssc.
To clean up build artifacts:
make cleanThe SoulFu Script Compiler processes all .SRC files in a specified input directory and generates corresponding .RUN files in an output directory.
./ssc [options]-hDisplay help information and exit-cCompile (required to perform compilation)-i <path>Specify input directory path (default: "sfd")-o <path>Specify output directory path (default: same as input path)
Display help:
./ssc -hCompile all .SRC files in the default input directory ("sfd") and output to the same directory:
./ssc -cCompile all .SRC files in a custom input directory and output to a different directory:
./ssc -c -i my_scripts -o compiled_outputNote: The compiler processes all .SRC files found in the input directory. It performs two passes:
- Headerization (preprocessing)
- Compilerization (full compilation)
This project is part of the SoulFu game ecosystem. Please refer to the original SoulFu project for licensing information.