Skip to content
Benedict Albrecht edited this page Jun 2, 2026 · 7 revisions

Crodox Documentation

Changing Software Development for Good - Simplifying the Complex

Welcome to the official Crodox documentation. Crodox is a grammar definition tool that lets you describe how source code is structured - files, objects, variables, and their relationships - so it can be parsed, queried, and understood.


How It Works

graph LR
    subgraph "Grammar Definition"
        FILE["<b>File</b><br/><code>&lt;~ file.xy ~&gt;</code>"]
        VOBJ["<b>Visible Object</b><br/><code>&lt;: name :&gt;</code>"]
        HOBJ["<b>Hidden Object</b><br/><code>&lt;* name *&gt;</code>"]
        FILE --> VOBJ
        FILE --> HOBJ
    end

    subgraph "Inside Objects"
        VAR["<b>Variable</b><br/><code>&lt;&lt; var &gt;&gt;</code>"]
        SUB["<b>Sub-body</b><br/><code>&lt;---&gt;</code>"]
        REF["<b>Reference</b><br/><code>&lt;-{ref}-&gt;</code>"]
        OR["<b>Or Statement</b><br/><code>&lt;| a &lt;||&gt; b |&gt;</code>"]
        REP["<b>Repeat</b><br/><code>&lt;? ... ?&gt;</code>"]
        JUMP["<b>Jump</b><br/><code>--&gt;&gt; target</code>"]
    end

    VOBJ --> VAR
    VOBJ --> SUB
    VOBJ --> REF
    VOBJ --> OR
    VOBJ --> REP
    VOBJ --> JUMP

    subgraph "Output"
        TREE["Dependency<br/>Tree"]
        QUERY["Query<br/>Language"]
    end

    VAR --> TREE
    TREE --> QUERY

    style FILE fill:#4a90d9,color:#fff
    style VOBJ fill:#7b68ee,color:#fff
    style HOBJ fill:#888,color:#fff
    style VAR fill:#e67e22,color:#fff
    style TREE fill:#27ae60,color:#fff
    style QUERY fill:#27ae60,color:#fff
Loading

Quick Start

Step Topic Description
1 Getting Started Sign in, link GitHub, create your first template
2 Syntax Overview All grammar elements at a glance
3 Objects Visible <: :> and hidden <* *> building blocks
4 Sub-bodies Nesting child objects inside parents
5 References Reusing objects without nesting
6 Variables Capturing tokens and controlling scope
7 Query Language Querying the dependency tree

Full Reference

Core Concepts

Page Description
Syntax Overview Complete syntax reference table
Objects Visible vs. hidden objects
Sub-bodies <---> child object nesting
References <-{ref}-> object substitution
Or Statements <| a <||> b |> alternatives
Repeat Statements <? ... ?> repeating patterns
Jump Instructions -->> skip to target

Grammar Structure

Page Description
Grammar & Subgrammar Structure File composition and subgrammar nesting
Dependency Structure How objects form dependency trees

Variables & Scoping

Page Description
Variables Overview All variable types and scoping rules
Declarations How variables are declared
Path <<"path">> File path references
Reference <<'name'>> Dependency-creating references
Uppercase <<NAME>> Overwrite variables
Scope: :following Default forward scope
Scope: :up Parent scope
Scope: :down Child scope
Scope: :siblings Sibling scope
Scope: :global Global scope
Scope: :hook Hook scope

Advanced

Page Description
Query Language Querying parsed dependency trees

Examples

Language Description
Angular Multi-file grammar (.ts, .html, .css, .module.ts, .service.ts, .component.ts)
Python Single-file grammar with indentation-based scoping
T-SQL SQL grammar with BEGIN ... END sub-bodies

Tools

Tool Description
Template Generator Python CLI to generate starter Crodox definitions

Crodox Software GmbH · An der Mauer 4, 73479 Ellwangen, Germany · www.crodox.com

Clone this wiki locally