A compiler-design project that transpiles code between 10 programming languages using a full parse → analyze → optimize → emit pipeline.
| Interface | Link |
|---|---|
| Web App (full editor UI) | xrenes.github.io/Byte-to-Byte |
| Terminal Preview (interactive TUI in browser) | xrenes.github.io/Byte-to-Byte/terminal.html |
Python · JavaScript · TypeScript · Java · C · C++ · C# · Go · Rust · Ruby
90+ source → target pairs
Source Code → parse() → analyze() → optimize() → emit() → Output
- Parser — tokenizes source into typed AST nodes
- Analyzer — builds symbol table, resolves scopes, infers types
- Optimizer — constant folding, dead code elimination
- Emitter — generates idiomatic target-language code
| File | Purpose |
|---|---|
parser.js |
Core compiler engine (~1800 lines, zero dependencies) |
index.html |
Landing page with particle animation |
app.html |
Main two-panel web editor UI |
terminal.html |
Browser-based interactive terminal emulator |
transpiler.js |
Web UI wiring (12-pass regex pipeline) |
b2b.js |
CLI tool (--from, --to, --out flags) |
b2b-app.js |
Node.js ANSI terminal TUI |
style.css |
Dark green theme, CSS variables |
test_semantic.js |
36 automated semantic analysis tests |
# Web UI — open in browser directly (no server needed)
start index.html
# CLI tool
node b2b.js --from python --to java input.py
# Interactive terminal TUI
node b2b-app.jsCompiler Design project — built with pure JavaScript, zero runtime dependencies.