oakmac / open-ideas

a Place to Store Ideas
2 stars 0 forks source link

compile Lucy Lang to clj-statecharts #18

Open oakmac opened 1 year ago

oakmac commented 1 year ago

The Lucy language is a DSL for creating state diagrams. As of Jan 2023, it compiles to JavaScript to be used with the XState library.

clj-statecharts is a Clojure(Script) library inspired by XState that implements state charts. One of the features of clj-statecharts is that state machines can be represented using EDN data in Clojure code.

It would be nice to have a compiler that could transform Lucy into an EDN structure that is usable by clj-statecharts.

Another idea along these lines would be the ability to transform Lucy into SCXML, which is an XML-based format for representing state machines.

oakmac commented 1 year ago

The lezer-lucy project might be a useful reference here.