fddl Programming Language

Lexer Screenshot Lexer Tests Screenshot REPL Screenshot Parsing 'hello, world'

Overview

fddl is a small programming language inspired by various languages, designed to help learn language implementation concepts in Rust.

For years, I’ve tried to learn various programming languages, and while I could master the basics, the real-world projects often eluded me. And I wouldn't know who to turn to even if I knew where to start.

fddl was born out of this journey. fddl is my attempt to combine the aspects I appreciate from many languages into something uniquely my own.

I started learning Rust and have really liked it. I've been following tutorials and the Crafting Interpreters site as guides for this very problematic programming language.

I like aspects of so many programming languages, but I don't really like any of them, so I always found it hard to pick one and stick with it. But I had the same problem playing World of Warcraft, too.

So I, like many of you, decided to make a hobby programming language to see what may be able to be done with it. This is a brand new project as of September 2024 and I am one person.

The fact that I have a REPL working in this language is nothing short of amazing to me. It's fucking magic.

Features

Getting Started

Keep in mind, this is only at the lexer stage currently. It'll read your inputs and that's it.

To clone the repo:

git clone https://git.fddl.dev/fddl/fddl.git

To run the REPL:

cargo run

To parse a fddl script:

cargo run path/to/script.fddl

Examples:

func main() {
            // print statement
            print("hello, world in fddl");
        
            // variable declaration
            let y = 5;
        
            // if statement
            if (x > 10) {
            print("x is greater than 10");
            }
        
            // while loop
            while (x < 100) {
            print(x);
            let x = x + 1;
            }
        }

At least for right now. I still want to do something odd.

Running the Project

Make sure your project compiles and the tests pass:

cargo build
cargo test
cargo run

Again, cargo run only starts the REPL for testing.

running fddl examples.fddl (from the git repo) produces the following.

Goals and Projections:

Note: This is not a final list; it's words on paper (metaphorically) at the time of writing.

Lexer:

Parser:

Compiler:

Comments:

Error Handling:

Testing:

License

This project is licensed under the MIT License.

Contact

Git repo