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

EBNF rendering to HTML #25

Merged
merged 2 commits into from
Mar 11, 2019
Merged

EBNF rendering to HTML #25

merged 2 commits into from
Mar 11, 2019

Conversation

katef
Copy link
Owner

@katef katef commented Mar 11, 2019

This is a quick attempt at rendering an EBNF dialect for sake of human consumption rather than for parsing. It's a made-up dialect, formatted for presentation in documentation, and presented as HTML. I hope it sits well alongside the SVG railroad diagrams for the same purpose.

Most of the time it looks something like this:

image

and in worser cases like this:

image

There you can see the hex encoding for non-printable things, which I picked for the railroad diagrams because I think it's slightly less confusing for single characters than using an escape character.

The excess parentheses appear there because this rendering is directly from the AST rather than a more convenient form for rewriting and optimisations. Hence #24.

@katef katef merged commit 69f2d27 into master Mar 11, 2019
@katef katef deleted the kate/ebnfhtml5 branch March 11, 2019 05:37
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