Skip to content

0ASLAN-dev0/C-Slang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-Slang ~

C-Slang is a minimalist, Lua-C hybrid programming language created for fun and experimentation. It combines the simplicity of Lua with the structure of C, designed to feel familiar yet quirky.

C-Slang Logo

⚠️ This is a toy language. It’s not production-ready, but it’s a cool little project to mess around with.


🚀 Features

  • C-style syntax with a sprinkle of Lua vibes
  • Basic types: int, float, bool, char, string
  • Functions, loops (while, for), conditionals (if, elif, else)
  • print(...) and read(...) for I/O
  • Basic expressions and arithmetic
  • Single-line and multi-line comments
  • WIP EBNF grammar with future plans for arrays and structs

🔧 Transpiler to C

I wrote a basic transpiler that converts .csl files into C code.

How to Use

  1. Clone the repo:

    git clone https://github.com/0ASLAN-dev0/C-Slang.git
    cd C-Slang
  2. Install the transpiler:

    pip install .
  3. Transpile a .csl file:

    transpilecsl path/to/your_file.csl

This will output a .c file in the same directory.


😅 Known Issues

  • The transpiler is incomplete
  • Some language features aren't supported yet.
  • Error handling is minimal to non-existent.
  • Parsing could be way more robust.

Basically: it kinda works... Mostly.


❤️ Contributions Welcome

I would greatly appreciate any contributions to this project! Bug fixes, improvements, refactoring, or even better — a real compiler — would be amazing.

If you're into building languages, parsers, or compilers, feel free to fork and build something better out of this.


EBNF File

You can check out the EBNF file here.


📜 License

MIT — do whatever you want (with credits of course).


Made with ❤️ by 0ASLAN-dev0

About

C-Slang is a simple Lua–C hybrid programming language with C-style syntax and static typing. It supports functions, loops, conditionals, expressions, and I/O. Designed for learning and experimentation, it balances readability with low-level control. The grammar is defined in EBNF and suitable for building transpilers or compilers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages