CDTk Documentation

Welcome to the CDTk v9.0 documentation. This wiki covers every aspect of the Compiler Description Toolkit — from grammar definition to native binary output.

💡
New in v9.0
LESS CSS redesign, full .NET 10 support, improved QUILL ML pipeline with 128-dim feature vectors, and CRAB x86 PE EXE generation.

Quick Navigation

Pipeline Overview

CDTk translates source code through a 6-step pipeline:

  1. Lexing — source text is tokenized using the grammar's token declarations.
  2. Parsing — tokens are assembled into a parse tree using rule definitions.
  3. Structural role assignment — tokens are tagged with semantic roles (e.g., IfKeyword).
  4. Semantic table construction — the parse tree is mapped to a SemanticTable.
  5. Translation — morphisms map source semantics to target semantics.
  6. Code generationGrammar.Render(SemanticTable) emits target syntax.