-
Notifications
You must be signed in to change notification settings - Fork 92
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
Feature: railroad diagrams #5
Comments
One issue to be decided would be which parts of the syntax get converted into syntax diagrams. Is it each production (rule) a separate railroad diagram? Or just most of them? Probably only 'most of them' as the syntax diagrams for the character sets, etc, are not very exciting — and the lists of keywords don't make good railroad diagrams, either. The diagrams would need to be embeddable in an HTML page so that you could still traverse around the specifications — finding the right diagrams for whatever term you're looking at would be daunting otherwise. There might also be a question of whether some rules could/should be combined to make a more usable railroad diagram. Please feel free to take the material and generate railroad diagrams from it, but I think doing so would be a major exercise. |
Hi
Actually, since I wrote GraphViz2 I've keep an eye on the graphviz.org
mailing list, and I vaguely recall mention of software which can produce
railroad diagrams. I'll check.
And I'm very partial to such diagrams myself, but producing them from
BNF sounds a bit tricky. I do however already turn BNF into a tree:
If you start from:
https://savage.net.au/Module-reviews.html#Output_from_my_Marpa_oriented_modules
And click on:
'Demo output for MarpaX::Grammar::GraphViz2'
You'll get to:
https://savage.net.au/Perl-modules/html/marpax.grammar.graphviz2/
…--
Ron Savage - savage.net.au
|
Hi
See http://bottlecaps.de/rr/ui
…--
Ron Savage - savage.net.au
|
Hi
See also
https://stackoverflow.com/questions/796824/tool-for-generating-railroad-diagram-used-on-json-org
…--
Ron Savage - savage.net.au
|
[cosmetic change]add missing h2 closing tag to sql-2003-2.bnf
Here is a manually conversion using as base Obs: It's a heavy diagram that takes time and resources to view. Non reserved words appear with You can navigate through the grammar by clicking the rectangular boxes.
|
Hi Domingo
Thanx for your contribution. It's massive :-).
I followed your instructions to copy the grammar to
https://www.bottlecaps.de/rr/ui and clicked View Diagram. And it worked!
Wow.
I'm still racking my brain as to what the next step should be. What do
you suggest?
I'll forward your original email to Jonathan Leffler, the author of all
the SQL files I was hosting.
…---
Cheers
Ron
savage.net.au
|
Probably host the result page on https://ronsavage.github.io/SQL/ , wait a bit of third party eyes to gaze over it and maybe spot some mistakes or suggest improvements. |
Hi Domingo
Thanx for the quick reply.
Yes, I'll do that, and let you know.
…---
Cheers
Ron
savage.net.au
On 2021-07-29 18:10, Domingo Alvarez Duarte wrote:
Probably host the result page on https://ronsavage.github.io/SQL/ ,
wait a bit of third party eyes to gaze over it and maybe spot some
mistakes or suggest improvements.
--
You are receiving this because you commented.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Links:
------
[1] #5 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AAAFH6FTXMZWTFZLBRH7AXDT2EEGJANCNFSM4E2U4MIQ
|
Hi Domingo, Jonathan
I've pushed your grammar and a readme file to github, as:
o sql-2003-2.ebnf
o sql-2003-2.ebnf.readme
I'll post about this to blogs.perl.org and irc.libera.chat#marpa. The
latter is where we discuss Marpa (in Perl as Marpa::R2),
which is a grammar processing package.
…---
Cheers
Ron
savage.net.au
|
And here I manually made the SQL-2016 grammar to generate the railroad diagram JakeWheat/sql-overview#6 |
Hi Domingo
Wow. Nice work. I'll add it to the SQL repo.
Thanx!
…---
Cheers
Ron
savage.net.au
|
Hi Jonathan, Domingo
I've blogged about our recent process:
http://blogs.perl.org/users/ron_savage/2021/08/railroad-diagrams-for-sql-2003-and-sql-2016.html
…---
Cheers
Ron
savage.net.au
|
Hello,
It would be great if railroad diagrams (like sqlite's) were included on the webpage.
Here is a nice JS generator for railroad diagrams: https://github.com/tabatkins/railroad-diagrams
Thanks for considering!
The text was updated successfully, but these errors were encountered: