Inspiration

Modern programming languages often feel like black boxes. While developers can write code, many struggle to understand what happens internally between source code and execution. Fundamental concepts such as lexical analysis, parsing, Abstract Syntax Trees (ASTs), and runtime environments are usually hidden behind abstraction layers.

Flux-lang was inspired by the need to make these internal processes visible. The goal was to build a minimal yet complete programming language that prioritizes transparency and learning over performance or feature richness.

What it does

Flux-lang is an educational programming language and interpreter that allows users to:

⦁ Write and execute simple programs

⦁ Inspect the generated Abstract Syntax Tree (AST)

⦁ Trace program execution step by step

⦁ Examine runtime environments and variable bindings

⦁ Understand how errors are detected and handled internally

By exposing each stage through a command-line interface, Flux-lang turns language internals into something developers can actively explore.

How we built it

Flux-lang follows a classic interpreter pipeline similar to real-world language implementations. The system is modular and divided into clear stages:

⦁ Lexical Analysis – Converts source code into tokens

⦁ Parsing – Produces a structured representation of the program

⦁ AST Generation – Builds a hierarchical, syntax-independent model

⦁ Interpretation – Executes the program using a runtime environment

⦁ CLI & REPL – Enables execution, inspection, tracing, and interaction

Execution flow: Source Code → Tokens → AST → Execution

This design ensures each component has a single responsibility, improving clarity, maintainability, and educational value.

Challenges we ran into

⦁ Designing an AST that is simple yet expressive

⦁ Implementing clear and beginner-friendly error reporting

⦁ Keeping the language minimal without oversimplifying core concepts

⦁ Ensuring execution traces accurately reflect real interpreter behavior

⦁ Balancing educational clarity with correct language semantics

Accomplishments that we're proud of

⦁ Built a complete programming language from scratch

⦁ Implemented a clean, modular interpreter architecture

⦁ Exposed internal language stages through practical CLI tools

⦁ Created a project focused on learning and understanding, not abstraction

⦁ Applied real compiler and interpreter design principles successfully

What we learned

⦁ How programming languages work beyond surface-level syntax

⦁ The importance of modular design and separation of concerns

⦁ How AST structure influences runtime behavior

⦁ Why error handling is as important as execution logic

⦁ How theoretical compiler concepts translate into real systems

What's next for Flux-lang

⦁ Formal grammar documentation

⦁ Enhanced error diagnostics with source-level context

⦁ Optional static analysis and type checking

⦁ Extended debugging capabilities in the REPL

⦁ Visual representations of ASTs and execution traces

Flux-lang will continue to evolve as a learning-first language, helping developers understand not just how to write code, but how code actually runs.

Built With

  • abstract-syntax-tree
  • cli
  • interpreter-pattern
  • java
  • lexer
  • parser
  • repl
Share this project:

Updates