Skip to content

Examples

Tristin Porter edited this page Jan 12, 2026 · 3 revisions

CDTk Examples

CDTk empowers you to create powerful and efficient compilers. The following examples highlight key techniques and concepts for designing compilers using CDTk. Each example demonstrates how to leverage the toolkit for common scenarios like parsing, code generation, and multi-target transpilation.

Check the examples to explore:

  • Basic lexing, parsing, and code generation workflows.
  • Advanced multi-target transpilers or domain-specific language construction.

Explore the Examples

The complete examples with source code and detailed explanations are available here:

CDTk Examples on GitHub


What to Learn Next

Once you've reviewed the examples, dive deeper into these concepts:

  • Tokens: How to define lexical patterns. Tokens
  • Rules: Structuring grammars for parsing. Rules
  • Mappings: Creating flexible code generation templates. Mapping
  • Compilation Pipeline: Understand each stage of compiling input. Pipeline
  • Advanced Architectures: Explore how CDTk unifies all components. Architecture
  • Performance: Learn about CDTk's industrial grade performance. Performance

Clone this wiki locally