Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 614 Bytes

File metadata and controls

22 lines (16 loc) · 614 Bytes

PatternGen Starter

Prereqs:

  • Java (for ANTLR)
  • Python 3.9+
  • curl (optional to download antlr jar)

Quick start:

  1. Install python deps: pip install -r requirements.txt

  2. Generate ANTLR parser: chmod +x ./grammar/build_antlr.sh ./grammar/build_antlr.sh

  3. Run the demo: python -m src examples/tshirt.gdsl measurements.json out/tshirt

  4. 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