Skip to content

feat!: rewrite CDL parser to recursive descent with v1.3 features#7

Merged
Bissbert merged 1 commit intomainfrom
feature/cdl-v1.3
Feb 14, 2026
Merged

feat!: rewrite CDL parser to recursive descent with v1.3 features#7
Bissbert merged 1 commit intomainfrom
feature/cdl-v1.3

Conversation

@Bissbert
Copy link
Contributor

Summary

  • Full rewrite of website CDL parser from regex-based to recursive descent
  • Multi-line CDL input support in playground
  • Updated workers/crystal-api submodule with matching parser rewrite
  • flatForms() helper for backwards-compatible flat list access

BREAKING CHANGE: Internal parser architecture changed from regex to recursive descent. External API (parseCDL, validateCDL) unchanged.

Files changed

  • src/lib/cdl-parser.ts - full recursive descent rewrite (802 insertions)
  • src/hooks/useCDLValidation.ts - multi-line CDL support
  • workers/crystal-api - updated submodule ref (see gemmology-dev/crystal-api PR)

Test plan

  • CDL playground parses all existing expressions correctly
  • Multi-line CDL input works (line breaks between forms)
  • Parenthesized grouping syntax renders correctly in playground
  • @name/$name definitions and references resolve in playground
  • npm run build succeeds without errors
  • Worker submodule builds and deploys successfully

Full rewrite of both website and worker CDL parsers from regex-based to
recursive descent. Supports parenthesized grouping, form labels,
@name/$name definitions and references, flatForms() helper, and
multi-line CDL input.

BREAKING CHANGE: Internal parser architecture changed from regex to
recursive descent. External API (parseCDL, validateCDL) unchanged.
@github-actions
Copy link

🚀 Preview deployed to: https://ab35b16a.gemmology-dev.pages.dev

@Bissbert Bissbert merged commit a850c50 into main Feb 14, 2026
3 of 4 checks passed
@Bissbert Bissbert deleted the feature/cdl-v1.3 branch February 14, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant