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

Separate Railroad Diagram Generation into Scriptable Function #134

Closed
kevinastone opened this issue Mar 9, 2016 · 3 comments · Fixed by #164
Closed

Separate Railroad Diagram Generation into Scriptable Function #134

kevinastone opened this issue Mar 9, 2016 · 3 comments · Fixed by #164
Labels

Comments

@kevinastone
Copy link
Contributor

It would be handy to generate the railroad diagrams for documentation about my grammar. It seems to only exist in the gh-pages branch for the online documentation. Could you package this up as part of the distro so consuming apps can generate their own documentation?

Thanks (chevrotain has been great!)

@bd82
Copy link
Member

bd82 commented Mar 9, 2016

I'm glad you are finding Chevrotain to be useful :).
And thanks for the suggestion, looks like a very good idea as this feature would be a "general" feature that could benefit all users.

I'll have a look at it and see what is needed to productize it.

bd82 pushed a commit that referenced this issue Mar 10, 2016
* Dependencies to lodash in the diagrams building logic
* References to the playground DOM.
* References to other functions in the playground flow's logic.

prerequisite for #134
@bd82 bd82 added the Diagrams label Mar 12, 2016
@bd82
Copy link
Member

bd82 commented Mar 12, 2016

Hi @kevinastone.

Please have a look at version 0.5.21
Specifically the template for generating syntax diagrams locally.
https://github.com/SAP/chevrotain/tree/master/diagrams

There is a limitation that your grammar needs to be executable in the browser.
However because your grammar file Has no dependencies other than chevrotain. it should not be difficult to browserify/webpack/umd it.

I'm unable to make the diagrams generation run in node.js(scriptable) due the railroad-diagrams library used.

However in the future I will try to make the grammar structure itself serialize-able and thus
serialize it in a node.js script and render from the serialized form.
#139

bd82 pushed a commit that referenced this issue Apr 1, 2016
@bd82 bd82 closed this as completed in #164 Apr 2, 2016
@bd82
Copy link
Member

bd82 commented Apr 2, 2016

closed by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants