We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
有一个在线铁路图生成器。 它从 上下文无关语法 在 EBNF。 您可以复制 SVG 代码或截取屏幕截图。
你必须输入语法,它就会生成图表。
例如,要创建您显示的第一个铁路图,您可以使用以下代码:
然后您可以使用
string ::= ...
和value ::= ...
定义string
和value
参考文献都显示了。查看页面上的一些示例图。 他们有 XML 甚至 EBNF 本身。
There is an Online Railroad Diagram Generator. It creates SVG syntax diagrams, also known as railroad diagrams, from context-free grammars specified in EBNF. You can copy the SVG code or take screen shots.
You have to type in the grammar and it'll make the diagram.
For example, to create the first railroad diagram you show, you would use the code:
Then you could go on to define
string
andvalue
usingstring ::= ...
andvalue ::= ...
The references are all shown.Check out some of the example diagrams on the page. They have XML and even EBNF itself.
Tab Atkins Jr. 创建了一个 Javascript 铁路图使用 svg 的生成器特别是因为他找不到具有他想要的视觉吸引力的产品,即“JSON.org 外观”。
Tab Atkins Jr. created a Javascript Railroad-diagram Generator using svg specifically because he could not find one that had the visual appeal he wanted , i.e. "the JSON.org look".
前几天有一个类似的问题:
创建铁路图的好工具是什么?
这个问题是关于如何生成 SQLite 语法图中的铁路图的。 接受的答案发现图表是使用 Tcl 编写的 DSL 生成的。
另一个答案提出了以下建议:使用基于 EBNL 语法的图表生成器。
There was a similar question a few days ago:
What is a good tool for creating railroad diagrams?
That question was about how railroad diagrams in the SQLite syntax diagrams were generated. The accepted answer found that the diagrams were generated using a DSL written in Tcl.
Another answer offered a suggestion to use a diagram generator which works off of EBNL grammar.
我也一直在寻找用于生成这些语法的工具图表,如果可能的话,在
js 库
中,这样就可以编辑和显示它,而无需等待无聊的时间来显示图形。我知道有一些工具那里 但我想说的是 www.bottlecaps.de 有一个漂亮的图形和颜色选项。 不幸的是我无法在那里获得该工具本身的源代码。
我还在这里找到了相关问题的答案,但只得到了以下内容,我们可以将其作为开源
js 库
并提供在线演示我们可以尝试使用的地方。js
中(语法作为Python
库)js
中,但是 UML(语法通过www.bottlecaps.de)js
中,但仅适用于 UMLI have been looking also for the tools used to generate these Syntax Diagrams and if possible in
js library
so it can be edited and displayed without awaiting a boring time for a graphic to come.I know there are tools out there but I would say that the generator from www.bottlecaps.de has a nice graphic with color option. Unfortunately I could not get source code of the tool it self there.
I went also to the related questions of answers here but got only followings where we can get it as open source
js library
and provided with an online demo where we can try and play with.js
(Syntax exists as aPython
library as well)js
but UML (Syntax is generated via www.bottlecaps.de)js
but found only for UMLIBM 的铁轨生成器处理得很好的事情之一就是默认值。 我还没有见过另一个发电机可以做到这一点。
一个例子是
One of the things that IBM's railroad track generator handles well is default values. I have not seen another generator that does this.
An example is
我找到了 J-algo 工具。 我认为绘制图表很容易,但我无法导出到图像或其他类型。
http://j-algo.binaervarianz.de/index.php
I found J-algo tool. I think it is very easy to draw diagram but I can't export to image or another type.
http://j-algo.binaervarianz.de/index.php
查看 http://code.google.com/p/html-railroad-图/ 生成 HTML 铁路图。 有一个示例,其中显示了生成的 JSON 铁路由 JavaScript 编写的带有链接的 HTML 页面。
Take a look at http://code.google.com/p/html-railroad-diagram/ which generates HTML railroad diagrams. There is an example that shows the JSON railroad generated in an HTML page by JavaScript with links.
我似乎记得 IBM 有一个工具可以构建此类图表,作为其 BookMaster SGML 套件的一部分。 铁路图经常用于大型机文档中。
I seem to remember that IBM has a tool that builds such diagrams as part of their BookMaster SGML suite. Railroad diagrams are often used in mainframe documentation.