Prereqs:
- Java (for ANTLR)
- Python 3.9+
- curl (optional to download antlr jar)
Quick start:
-
Install python deps:
pip install -r requirements.txt -
Generate ANTLR parser:
chmod +x ./grammar/build_antlr.sh./grammar/build_antlr.sh -
Run the demo:
python -m src examples/tshirt.gdsl measurements.json out/tshirt -
Inspect
out/tshirt.json
You may make a change to the grammar in grammar/GarmentDSL.g4 along with corresponding changes in the src files to process your new grammar. For this change to be registered, you must rerun
./grammar/build_antlr.sh