-
Notifications
You must be signed in to change notification settings - Fork 0
Syntax Overview
Benedict Albrecht edited this page Jun 2, 2026
·
3 revisions
A complete reference of all Crodox grammar elements and their notation.
graph TD
FILE["<b>File</b><br/><~ file.xy ~>"] --> VOBJ["<b>Visible Object</b><br/><: name :>"]
FILE --> HOBJ["<b>Hidden Object</b><br/><* name *>"]
FILE --> SUBFILE["<b>Subgrammar</b><br/>Nested <~ ~>"]
VOBJ --> SUB["<b>Sub-body</b><br/><--->"]
VOBJ --> REF["<b>Reference</b><br/><-{ref}->"]
VOBJ --> VAR["<b>Variable</b><br/><< var >>"]
VOBJ --> OR["<b>Or</b><br/><| a <||> b |>"]
VOBJ --> REP["<b>Repeat</b><br/><? ... ?>"]
VOBJ --> JUMP["<b>Jump</b><br/>-->> target"]
HOBJ --> SUB2["Sub-body"]
HOBJ --> OR2["Or / Repeat / Jump"]
SUB --> VOBJ2["Child Objects"]
style FILE fill:#4a90d9,color:#fff
style VOBJ fill:#7b68ee,color:#fff
style HOBJ fill:#888,color:#fff
style VAR fill:#e67e22,color:#fff
| Syntax | Element | Description | Details |
|---|---|---|---|
<~ file.xy ~> |
File | Defines a grammar for a file type | Grammar Structure |
<: object :> |
Visible Object | Named object that participates in the dependency graph | Objects |
<* object *> |
Hidden Object | Structural object, not referenceable | Objects |
<---> |
Sub-body | Accepts child objects | Sub-bodies |
<-{ref}-> |
Reference | Substitutes another object's variables | References |
<< variable >> |
Variable | Captures a token from source code | Variables |
<| a <||> b |> |
Or Statement | Matches one of several alternatives | Or Statements |
<? ... ?> |
Repeat | Matches a pattern zero or more times | Repeat Statements |
-->> target |
Jump | Skips input until target token is found | Jump Instructions |
| Syntax | Type | Scope | Description |
|---|---|---|---|
<< var >> |
Standard | :following |
Default - visible to following siblings |
<< "path" >> |
Path | - | File path reference |
<< 'ref' >> |
Reference | - | Creates dependency, no overwrite |
<< VAR >> |
Uppercase | - | Overwrites value, no dependency |
<< var:following >> |
Standard | :following |
Explicit forward scope (default) |
<< var:up >> |
Standard | :up |
Visible to parent objects |
<< var:down >> |
Standard | :down |
Visible to child objects |
<< var:siblings >> |
Standard | :siblings |
Visible to all siblings |
<< var:global >> |
Standard | :global |
Visible everywhere |
<< var:hook >> |
Standard | :hook |
Hook scope |
Next: Objects - Learn about visible and hidden building blocks.
- Getting Started
- Sign-Up
- Home Screen
- Creating Your First Template
- Template Editor
- Application Navigation
- Syntax Overview
- Workflow: End-to-End
- Workflow: Test with simpleDemo
- Workflow: Build Template from angularTemp
- Demo Repositories
- Template
- Workbench
- GitHub Integration
- GitHub App Installation
- GitHub Repository Setup
- GitHub Re-linking
- Settings
- Overview
- Declarations
- Types
- Scoping