Skip to content

soulfu-dev/soulfu-script-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoulFu Script Compiler

A compiler for SoulFu game scripts, written in C. This tool processes script files and generates executable bytecode for the SoulFu game engine.

Features

  • 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

Building

The project uses a Makefile for building:

make

This will compile the executable ssc.

To clean up build artifacts:

make clean

Usage

The SoulFu Script Compiler processes all .SRC files in a specified input directory and generates corresponding .RUN files in an output directory.

Basic Syntax

./ssc [options]

Command-line Options

  • -h Display help information and exit
  • -c Compile (required to perform compilation)
  • -i <path> Specify input directory path (default: "sfd")
  • -o <path> Specify output directory path (default: same as input path)

Examples

Display help:

./ssc -h

Compile all .SRC files in the default input directory ("sfd") and output to the same directory:

./ssc -c

Compile all .SRC files in a custom input directory and output to a different directory:

./ssc -c -i my_scripts -o compiled_output

Note: The compiler processes all .SRC files found in the input directory. It performs two passes:

  1. Headerization (preprocessing)
  2. Compilerization (full compilation)

License

This project is part of the SoulFu game ecosystem. Please refer to the original SoulFu project for licensing information.

About

A compiler for SoulFu SRC scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors