Skip to content

fsocietyweb/ChestFuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🫧 Project Chestfuck (.chestf)

A minimalist, high-speed multi-target programming language compiler written from scratch in pure C. It transpiles your custom .chestf scripts directly into clean, standard C code and builds a native machine binary on the fly.

No Python required. Zero external scripting dependencies.


🚀 Features

  • Instant File Management: Create templates and compile in a single breath using make new.
  • Integrated Terminal Workflow: Edit your code directly inside the terminal and auto-compile on save using make edit.
  • Permanent Code Export: The compiler preserves the generated .chestf.c file alongside your native binary for analysis.
  • Mac UTF-8 Safe: Built-in string parser dynamically filters and handles native Mac smart quotes (, , ).

📜 Official Syntax Guide

Command Syntax Example Description
Output SCREAM "Hello World" Prints a string once to the console.
Spam ANNOUNCE "Error!" Instantly loops and prints the string 50 times.
Timing WAIT 3 Suspends program execution for specified seconds.
Input status = SPEAK("Ready? ") Captures terminal inputs into a string variable.
Logic CHECK IF x == 10 THEN Starts a modern conditional control chain.
Else If OTHERWISE IF x > 5 THEN Handles fallback conditions if previous checks fail.
Else IF NONE Global conditional fallback block.
Loops REPEAT 5 TIMES Loops a block of code a specified number of times.
End END Closes any open logic or loop structure blocks.
Exit QUIT Gracefully closes the running program context.
Crash RAGEQUIT Forces a hard program crash with an error message.

🛠️ Automated Terminal Workflow

Your entire development lifecycle is managed directly through the provided automated Makefile.

1. Build the Main Compiler

Compile the core binary engine to get started:

make

2. Create and Compile a New Template

Generate a fresh .chestf script pre-loaded with a Hello World template and automatically compile it into both a .c source and a native app:

make new FILE=test.chestf

3. Edit and Auto-Compile on Save

Open any file in the built-in terminal editor. The moment you save and exit (Ctrl+O, Enter, Ctrl+X), the system automatically re-transpiles and updates your native binary application:

make edit FILE=test.chestf

4. Run the Output Application

Execute your native standalone binary directly from the directory:

./test

📦 Directory Architecture

def/
├── chestfuck_compiler.c  # Core Compiler framework
├── chestf_compiler       # Compiled compiler executable app
├── test.chestf           # Your Chestfuck source file
├── test.chestf.c         # Retained generated C code source
├── test                  # Compiled native target machine binary
├── UPDATES.md            # Version and feature changelog
├── LICENSE               # Open-source MIT license code
└── README.md             # This documentation

About

my First and own Programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors