What is a good tool for creating railroad diagrams? [closed]

被刻印的时光 ゝ 提交于 2019-11-27 00:24:46

问题


I was very impressed by sqlite's syntax diagrams and was wondering if anyone could recommend software which would let me create similar graphs.


回答1:


It looks like they wrote their own script for generating these, as a little embedded DSL in TCL. You might be able to re-purpose their script.

edit: Yep, it's pretty easy to use, though it looks like it'll take a little tweaking to make the output prettier (for some reason, convert is failing to antialias this on my system; the postscript output looks nice).

hello {                                                                          line HELLO {or WORLD {line MY FRIEND {opt ANDREY}} }                       } 

edit 2: Here's a brief article on how this works, along with some notes on how to log in anonymously to view the source if you can't see it immediately.




回答2:


If you use EBNF for your syntax, there is the EBNF Visualizer for this purpose.

You can also try Graphviz. It is open source and their exist several GUI tools for working with it. It is mostly useful for generic graphs but it can be adapted for syntax graphs too.

Another free tool called SYNGEN also exists.




回答3:


I think it should be possible to define the RTN graph in Dot language and then generate with one of Dot-enabled tools.




回答4:


You might be able to get close with RFFlow




回答5:


On the accepted answer : Go to Line 1035 and simply alter the file extension for the output from “gif” go “png”, which will create an antialiased picture in PNG-format.

Also on my system “xv” is not available, simply comment it away (line 1036, following):

if 0 {   if {$do_xv} {     exec xv $name.gif &   } } 

cheers




回答6:


I use OpenOffice Draw for many of my drawing needs. Free, open-source, and multiplatform are the big things for me. It does a great job on flow charts with a small learning curve.

I've used SmartDraw before and found it very capable but my need for



来源:https://stackoverflow.com/questions/773371/what-is-a-good-tool-for-creating-railroad-diagrams

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!