MCPcopy Index your code
hub / github.com/CompilerProgramming/ez-lang

github.com/CompilerProgramming/ez-lang @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
4,209 symbols 11,492 edges 324 files 181 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

EeZee Programming Language

This project is part of the https://compilerprogramming.github.io/ project.

The EeZee programming language is designed to allow us to learn various compiler techniques.

The EeZee Language

The EeZee programming language is a tiny statically typed language with syntax inspired by Swift. The language has the following features:

  • Integer, Struct and 1-Dimensional Array types
  • If and While statements
  • Functions

The EeZee language specification is available. The language is intentionally very simple and is meant to have just enough functionality to experiment with compiler implementation techniques.

Modules

The project is under development and subject to change. At this point in time, we have following initial implementations:

  • lexer - a simple tokenizer.
  • parser - a recursive descent parser and AST.
  • types - the type definitions.
  • semantic - semantic analyzer.
  • stackvm - a compiler that generates IR for a stack based virtual machine. There is no interpreter for this instruction set yet.
  • registervm - a compiler that generates a so called three-address IR and an interpreter that can execute the IR.
  • optvm - WIP optimizing compiler with SSA transformation, constant propagation, graph coloring register allocation targeting an abstract machine. Includes Interpreter to run the abstract machine.
  • seaofnodes - WIP compiler that generates Sea of Nodes IR, using SoN backend from Simple Chapter 21. Generates native code for X86-64, AArch64 and RISC-V.

How can you contribute?

The project is educational, with a focus on exploring various compiler algorithms and data structures. Clarity and simplicity is preferred over a coding style that attempts to do micro optimizations.

Contributions that improve the quality of the implementation, add test cases / documentation or fix bugs, are very welcome. I am not keen on language extensions at this stage, but eventually we will be extending the language to explore more advanced features.

I am also interested in porting this project to C++, Go, Rust, Swift, D, C, etc. If you are interested in working on such a port please contact me via Discussions.

Community Discussions

There is a community discussion forum.

What's next

The project has only just got started, there is lots to do!. See the plan in the website. More documentation to follow, but for now please refer to the source code and the site above.

Extension points exported contracts — how you extend this code

RIPRelSize (Interface)
(no doc) [44 implementers]
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/codegen/RIPRelSize.java
ASTVisitor (Interface)
(no doc) [4 implementers]
parser/src/main/java/com/compilerprogramming/ezlang/parser/ASTVisitor.java
MachNode (Interface)
(no doc) [118 implementers]
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/MachNode.java
MultiNode (Interface)
(no doc) [4 implementers]
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/MultiNode.java

Core symbols most depended-on inside this repo

in
called by 702
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/Node.java
p
called by 493
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/Node.java
reg
called by 384
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/codegen/CodeGen.java
add1
called by 217
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/codegen/Encoding.java
p
called by 154
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/util/SB.java
nIns
called by 125
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/Node.java
value
called by 108
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/type/TypeFloat.java
size
called by 102
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/util/Ary.java

Shape

Method 3,714
Class 478
Enum 12
Interface 5

Languages

Java100%

Modules by API surface

parser/src/main/java/com/compilerprogramming/ezlang/parser/AST.java145 symbols
optvm/src/main/java/com/compilerprogramming/ezlang/compiler/Instruction.java111 symbols
optvm/src/main/java/com/compilerprogramming/ezlang/compiler/CompiledFunction.java106 symbols
registervm/src/main/java/com/compilerprogramming/ezlang/compiler/Instruction.java71 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/Node.java68 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/cpus/arm/arm.java66 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/BoolNode.java58 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/cpus/x86_64_v2/x86_64_v2.java51 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/Compiler.java50 symbols
registervm/src/main/java/com/compilerprogramming/ezlang/compiler/CompiledFunction.java50 symbols
semantic/src/main/java/com/compilerprogramming/ezlang/semantic/NullableAnalysis.java45 symbols
seaofnodes/src/main/java/com/compilerprogramming/ezlang/compiler/node/cpus/riscv/riscv.java45 symbols

For agents

$ claude mcp add ez-lang \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact