Nova: A Modern ESP32 Transpiler banner

Nova: A Modern ESP32 Transpiler

3 devlogs
1h 46m 16s

I am building a custom DSL and source to source transpiler in Python. It takes a modern, lightweight syntax and translates it into highly optimized, register-level C++ for ESP32 microcontrollers, bypassing traditional Arduino boilerplate. The comp…

I am building a custom DSL and source to source transpiler in Python. It takes a modern, lightweight syntax and translates it into highly optimized, register-level C++ for ESP32 microcontrollers, bypassing traditional Arduino boilerplate. The compiler features a custom Lexer and a hand-written Recursive Descent Parser.

This project uses AI

I used an advanced AI research assistant to study compiler theory and to generate a high-level technical architecture document (Blueprint) for building a Transpiler. All actual implementation, typing, and debugging of the Python code are done manually by me.

noamismach

Phase 4 is officially complete!
The Nova Code Generator is working perfectly. It traverses the validated AST using the Visitor pattern and dynamically translates the custom DSL into standard, highly optimized C++ for the ESP32 .
Instead of using slow, standard Arduino functions like digitalWrite(), my generator injects direct register manipulation for ultra-fast pin toggling, and replaces blocking delays with FreeRTOS vTaskDelay to prevent Watchdog Timer crashes .
Next and final step: Phase 5 - CLI & Build System Integration!

Attachment
0
noamismach

Phase 2 is done!
I’ve successfully implemented a hand written Recursive Descent Parser for the Nova language. It takes the token stream from my Lexer and constructs a fully functiona AST. The parser handles grammar validation, normalizes time literals (converting 1s to 1000ms automatically for the C++ backend), and maps variables to hardware properties.
Next challenge: Phase 3 - Semantic Analysis (Hardware Constraint Validation)!

Attachment
0
noamismach

Phase 1 is officially complete!
I’ve built the Lexer (Tokenizer) for Nova, my custom ESP32 transpiler. The script successfully reads my new custom syntax (like pin led = Pin(2, out) and sleep(1s)), ignores whitespace, and strictly categorizes every character into a stream of logical Tokens (Keywords, Identifiers, Time Literals, etc.). It also tracks the exact line and column numbers for future error reporting.
Next up: Consuming these tokens to build the Parser and Abstract Syntax Tree (AST)!

Attachment
0