How tg11-org/plt works
PLT is an experimental source-to-source translator. A user selects a source and target language through the CLI; the CLI reads the source, dispatches to a frontend to produce language-neutral IR, optionally prints that IR, and dispatches the IR to a backend that emits target code. The documented principal route is JavaScript to Python or C; the CLI and source index also show Python/C# frontends and a Tcl backend. Arrows are limited to README statements and shown CLI/frontend/backend code; unsampled capabilities are not inferred.
Main entry points: Program.cs CLI dispatcher · Nodes.cs IR model · MiniJsFrontend.cs JavaScript frontend · PythonFrontend.cs Python frontend
Components 11
Command line
- CLI dispatcher
src/PLT/PLT.CLI/Program.cs
Source frontends
- JavaScript frontend
src/PLT/PLT.CORE/Frontends/Js/MiniJsFrontend.cs - Python frontend
src/PLT/PLT.CORE/Frontends/Python/PythonFrontend.cs - C# frontend
src/PLT/PLT.CORE/Frontends/CSharp/CSharpFrontend.cs
Intermediate representation
- IR model
src/PLT/PLT.CORE/IR/Nodes.cs - IR pretty printer
src/PLT/PLT.CORE/IR/PrettyPrinter.cs
Target backends
- Python emitter
src/PLT/PLT.CORE/Backends/Python/PythonEmitter.cs - C emitter
src/PLT/PLT.CORE/Backends/C/CEmitter.cs - Tcl emitter
src/PLT/PLT.CORE/Backends/Tcl/TclEmitter.cs
Other components
- Translator user
- Translated source
Connections 16
- Translator user → CLI dispatcher: selects languages
README.md - CLI dispatcher → JavaScript frontend: dispatches to
src/PLT/PLT.CLI/Program.cs - CLI dispatcher → Python frontend: dispatches to
src/PLT/PLT.CLI/Program.cs - CLI dispatcher → C# frontend: dispatches to
src/PLT/PLT.CLI/Program.cs - JavaScript frontend → IR model: constructs
src/PLT/PLT.CORE/Frontends/Js/MiniJsFrontend.cs - Python frontend → IR model: produces
src/PLT/PLT.CORE/Frontends/Python/PythonFrontend.cs - C# frontend → IR model: produces
src/PLT/PLT.CORE/Frontends/CSharp/CSharpFrontend.cs - CLI dispatcher → IR pretty printer: prints optionally
src/PLT/PLT.CLI/Program.cs - IR model → IR pretty printer: formats
src/PLT/PLT.CORE/IR/PrettyPrinter.cs - CLI dispatcher → Python emitter: dispatches to
src/PLT/PLT.CLI/Program.cs - CLI dispatcher → C emitter: dispatches to
src/PLT/PLT.CLI/Program.cs - CLI dispatcher → Tcl emitter: dispatches to
src/PLT/PLT.CLI/Program.cs - IR model → Python emitter: emits from
src/PLT/PLT.CORE/Backends/Python/PythonEmitter.cs - IR model → C emitter: emits from
src/PLT/PLT.CORE/Backends/C/CEmitter.cs - IR model → Tcl emitter: emits from
src/PLT/PLT.CORE/Backends/Tcl/TclEmitter.cs - CLI dispatcher → Translated source: writes or prints
src/PLT/PLT.CLI/Program.cs