-
Notifications
You must be signed in to change notification settings - Fork 0
Template Generator
Benedict Albrecht edited this page May 20, 2026
·
7 revisions
The Crodox Template Generator is a Python script that produces starter Crodox grammar definitions for supported programming languages.
python crodox_template_generator.py <language>
python crodox_template_generator.py <language> --output <file># Print Python definition to stdout
python crodox_template_generator.py python
# Write to a file
python crodox_template_generator.py python --output python.crodox| Language | Command |
|---|---|
| Python | python crodox_template_generator.py python |
To add a new language, edit crodox_template_generator.py:
-
Create a new generator function:
def generate_mylang() -> str: lines = [ '<~"FROM".ext~>', ' # ... your objects here ...', '<~>', ] return '\n'.join(lines) + '\n'
-
Register it in the
LANGUAGESdictionary:LANGUAGES: dict[str, Callable[[], str]] = { "python": generate_python, "mylang": generate_mylang, }
-
Run it:
python crodox_template_generator.py mylang
The generator script is included in this wiki repository: crodox_template_generator.py
- 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