Roger-luo / Expronicon.jl

Collective tools for metaprogramming on Julia Expr
https://expronicon.rogerluo.dev/
MIT License
87 stars 6 forks source link

[Feature request] generating BNF from ADTs #48

Open ChenZhao44 opened 1 year ago

ChenZhao44 commented 1 year ago

It will be very useful if we can generate BNF from user-defined ADTs automatically.

Roger-luo commented 1 year ago

this should be possible by just walking through the definitions via reflections (the variant_xxx functions), the question is it does not fully compatible with BNF - ADTs do not have syntax information, generating a specific BNF would be possible.