-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Andrew Matthews edited this page Aug 14, 2025
·
1 revision
A high-level view of the current compiler pipeline and components.
flowchart LR
A[Source .5th] --> B[Lexer/Parser (ANTLR)]
B --> C[AST Builder (Visitor)]
C --> D[Language Analysis Phases]
D --> E[Type Annotation & Checks]
E --> F[IL Code Generator]
F --> G[.il file + validation]
- Parser (src/parser)
- ANTLR grammar + generated lexer/parser
- AST Model/Generated (src/ast-model, src/ast-generated)
- Node types and builder-generated code
- Compiler (src/compiler)
- Orchestration of parsing and phases
- Language analysis passes
- Code Generator (src/code_generator)
- Emits .NET IL, validates structure
- Tests (test/ast-tests)
- Parser/AST visitors
- Type annotation
- End-to-end IL generation
- Source code is tokenized and parsed
- AST Builder produces a typed AST structure
- Analysis phases annotate types, resolve references, check constraints
- Code generator converts the processed AST to .NET IL
- Tests verify each stage and the final IL output
- Primitive types map to IL primitives; user types map to .NET constructs
- The pipeline is evolving; phases and responsibilities may shift as the language grows