Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q. Are you interested in syntax diagrams for Dhall? #1345

Open
greggirwin opened this issue Aug 4, 2023 · 6 comments
Open

Q. Are you interested in syntax diagrams for Dhall? #1345

greggirwin opened this issue Aug 4, 2023 · 6 comments

Comments

@greggirwin
Copy link

I've meant to do it for a long time, but the ABNF tripped up our tool's ABNF metagrammar. I finally hacked things a bit to get a render, but not sure if you're interested. Rough in a couple places, with at least one thing that looks like a glitch. but here's the idea (zipped so GH won't try to render it in chat).

dhall.zip

Can be rendered as separate rules, for inclusion in targeted docs. Also, ABNF makes for some pretty ugly diagrams where strings are mapped to chars.

@Gabriella439
Copy link
Contributor

How is the ABNF diagram generated? If it's something that could be generated in CI I'd be open to including it in the website's reference section.

@greggirwin
Copy link
Author

Our DiaGrammar tool is a Windows app with GUI and CLI interfaces. Need to see what trips it up on the Unicode char ranges in the ABNF for automation. I had to translate it to our native grammar for this render.

@Gabriella439
Copy link
Contributor

Oh, I see. It would probably be difficult to incorporate a Windows application into our CI (which is Linux-based), so we probably won't be able to make use of this

@greggirwin
Copy link
Author

OK. Feel free to use what I posted if you want, until the grammar changes. :^)

@MonoidMusician
Copy link
Collaborator

Here's another tool that can be used to diagram BNF grammars:

https://github.com/katef/kgt/

I haven't used it myself, but I know someone who is using it.

@greggirwin
Copy link
Author

They have an open ticket for Dhall'grammar: katef/kgt#51 Similiar issues that I ran into and had to work around.

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

No branches or pull requests

3 participants