wallacegibbon/e-language-compiler
48.6
Weak · 17 September 2026
3.1k
lines of production code
Erlang
primary language
1
measurement over time
What this system is
This system is a compiler for the E programming language, specifically designed for embedded systems and RISC-V architectures. It provides a cross-platform command-line tool for compilation, alongside development aids such as syntax highlighting for Vim and VS Code. The project includes a hardware abstraction layer for CH32V microcontrollers and a suite of sample code demonstrating low-level features like pointer arithmetic and interrupt handling.
Features
Add VS Code extension for E language syntax highlighting
A new VS Code extension package has been added to the repository to provide syntax highlighting, language configuration, and code snippets for the E programming language. This enables users to get basic language support in VS Code for files with the .e extension.
(dependencies) · high confidence
Add Vim syntax highlighting and file detection for E Language
Vim users can now get syntax highlighting and proper file type detection for E Language source files (extensions .e and .elang). This change adds a file detection script to recognize these extensions and a syntax definition file that highlights keywords, types, operators, comments, strings, and numbers specific to the E Language.
misc/vim · high confidence
E Language compiler now available as a cross-platform escript
The E Language compiler is now distributed as a standalone executable escript named \ec\, built via \rebar3 escriptize\. This change introduces a unified command-line interface for compilation, simplifying the build and installation process across Unix-like systems and Windows (via the updated \build\_and\_install.sh\ script). The release also includes comprehensive documentation (README, BUILD guides, and a Chinese version) detailing the language's syntax, embedded-systems focus, and comparison with C, alongside development aids like an OpenOCD debugging guide.
(repo-wide) · high confidence
Expanded E language sample suite with CH32V MCU support and new language features
The sample directory has been significantly expanded with new examples demonstrating E language capabilities, including pointer operations (\any.e\, \arraytest.e\), chained function invocations (\chain\_call.e\), compound assignment operators (\assign.e\), and struct initialization (\initexpr.e\). A comprehensive hardware abstraction layer for CH32V microcontrollers (\ch32v.e\) is now provided, defining structs and macros for GPIO, EXTI, timers, USART, ADC, and DAC peripherals. This enables the new LED blink samples (\led\_sample\_1.e\ for CH32V307, \led\_sample\_2.e\ for CH32V003) which utilize these definitions and interrupt attributes. Additional samples cover control flow (\cond.e\, \label.e\), type compatibility (\opf\_1.e\, \opf\_2.e\), and new language features like \alignof\ (\struct.e\) and \typeof\ (\typeof.e\).
sample · high confidence
Introduce array subscript syntax support
The compiler now supports the array subscript operator \\[\]\ (e.g., \a\[b\]\) in the E language. During the AST compilation phase, these expressions are automatically transformed into equivalent pointer arithmetic operations (\(a + b \* sizeof(a^))^\), allowing users to access array elements using standard syntax while the backend handles the underlying memory addressing.
src · high confidence
Test coverage
Added script to compare compiler output with GNU toolchain
A new shell script, \misc/compare\_gnu\_as.sh\, has been added to the project. This tool automates the validation of the compiler's generated machine code by assembling and linking an input assembly file using the GNU RISC-V toolchain, extracting the resulting disassembly, and comparing it against the machine code details produced by the compiler. This facilitates regression testing and ensures compatibility with standard GNU assembler outputs.
misc · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 49.
Lenses
- Code Health 94
- Architecture 97
- Maturity 53
- Readiness 17
- Security 100
- Event Sourcing 100
Changes since last survey
- 300 commits — 221 feature/other, 79 fixes
By area
- (root) — 69 commits
- src/e_dumper_ir1.erl — 50 commits
- sample/struct.e — 19 commits
- src/e_util.erl — 17 commits
- src/e_ast_compiler.erl — 16 commits
- misc/elang.vim — 10 commits
- sample/led_sample_1.e — 9 commits
- sample/sample.e — 8 commits
- src/e_compiler.erl — 8 commits
- src/e_dumper_machine1.erl — 7 commits
- misc/compare_gnu_as.sh — 6 commits
- sample/ch32v.e — 6 commits
- src/e_size.erl — 6 commits
- src/e_type.erl — 6 commits
- sample/chain_call.e — 5 commits
- sample/cond.e — 5 commits
- src/e_record_definition.hrl — 5 commits
- src/e_array.erl — 4 commits
- src/e_compile_option.erl — 4 commits
- src/e_dumper_c.erl — 4 commits
Notable commits
- fix: Bug Fix & Features: merge_plus/1 and merge_pointer/1 in e_util.erl did not handle function invocation expressions. Type checking for @ was wrong as many cases are missed. Function can be converted to any kind of pointer now.
- fix: Bug Fix & Refactor: Undefined structs are not handled before this commit. e_util:get_struct_from_type/2 got introduced to eliminate some duplicated codes.
- fix: Bug Fix & Syntax Change & Documents: eliminate_dot_in_expr/2 did not handle e_type_convert expression. ; is replaced by , in the E language. And more content in README.
- fix: Bug Fix (IR1 generating): When there are no local variables, there should still be one word on the callee's stack for returning value.
- fix: Bug Fix (in the yecc file): The precedence of call expression (function invocation) was wrong. Use 2 separate patterns (expr)(args) and identifier(args) to solve this problem.
- fix: Bug Fix and Feature: The register offsets in machine code generating was wrong. Assembly code for GNU ld is generated for comparing.
- fix: Bug Fix or Feature: The lexer did not support error reporting on invalid input like Chinese character inside variable definitions. And leex was not configured to use {Line, Col} on error.
- fix: Bug Fix: Chaining function invocation did not support empty argument list. Fixed now. And temporary register bank in IR1 generating process has been narrowed to support more architectures.
- fix: Bug Fix: In the prologue and epilogue of a function, sp should be increased first and restored last so that interrupt will not destroy local data.
- fix: Bug Fix: One address/element was missing when command line option --ivec-init-jump were not specified.
- fix: Bug Fix: One register 0 ({x, 0}) was written as {0, 0}, which was wrong. This bug has not caused problem yet because of the way to use it. (The wrong code had never run yet)
- fix: Bug Fix: Paddings/holes among instructions and data were not filled. They are now filled with 0s in the genrated bin file.
- fix: Bug Fix: Stack space (on the caller side) to store arguments during function invocation was not released after invocation.
- fix: Bug Fix: The IR generated from AST used to do things like {add, R1, R1, R2}, which causes bugs like changing fp. The new code generated is {add, T, R1, R2}.
- fix: Bug Fix: The mret instruction was generated in the wrong branch.
- fix: Bug Fix: The address offset calculation for init jump was missing. (Which would generate wrong code when the address of the init jump instruction is not 0)
- fix: Bug Fix: The bounds checking for immediate number was missing for the br family instructions and wrong for the j instruction during machine code generating.
- fix: Bug Fix: The code generated for the not operator on comparing operator directly was wrong. Logic operators (including not) generate their own jump instructions.
- fix: Bug Fix: The command line argument -entry should not be atom type when using argparse. Because that atom means existing atom, and the entry comes from the E source code, not the Erlang compiler source code.
- fix: Bug Fix: The first word should be a jump instruction (jumping to __init), not an address. (This is RISC-V, not Cortex-M, Reset address is not called by the machine)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
wallacegibbon/e-language-compiler was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 17 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f096b9699e26e834240ed83168cc243826cc054e — the exact code this score is about.
- Scored under rubric-2026.09.12 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-f94092f054c1.