在 Linux 上使用 Bison --graph=[file] 的技巧
最近(大约一个月前),我试图向公司的内部扩展语言引入新的构造,并与一些减少-减少错误作斗争。虽然我最终解决了这个问题,但深入研究 y.output 文件并不容易。
作为实验,我尝试使用 Bison 的 --graph=
作为最初的实验,我尝试使用 Postscript 的输出运行dotty。现在我们的内部语言是普通的本土开发的、图灵完备的、动态类型的脚本语言,但我对接下来的事情毫无准备。 dotty 运行花费了四个多小时(2GHz 双核 AMD64 盒子)!当它完成时,渲染的图表不是我所说的可读的。
所以,很简单,我正在寻求建议。是否有一组开关可以改善我采用的“默认”方法的结果?我正在寻找
- 优化“渲染”时间
- 的经验,提高图形的可读性,
- 为更好的图形查看器提供可能的建议
Recently (about a month ago) I was trying to introduce new constructs to my company's in-house extension language, and struggling with a couple of reduce-reduce errors. While I eventually solved this problem, digging into the y.output file was no picnic.
As an experiment, I tried using Bison's --graph=<file> option to output a DOT file (note that our standard build uses Byacc, not Bison). As I'm on a 'turnkey' Linux box, I didn't have a Graphviz installation and could not easily install from RPMs (working on Red Hat Enterprise Linux 4). Instead, I built it from source.
As an initial experiment, I tried to run dotty with an output of Postscript. Now our internal language is your average home-grown, Turing-complete, dynamically typed scripting language, but I was unprepared for what followed. The dotty run took over four hours (2GHz dual core AMD64 box)! And when it was done, the graph that was rendered was not what I would call readable.
So, quite simply, I'm looking for advice. Are there a set of switches which would improve the outcome over the 'default' approach I took? I'm looking for experience in
- optimizing 'render' time
- improving readability of the graph
- possible advice on better graphical viewers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您已经看过这个链接,但为了完整起见,在以下位置有一个查看者列表等: http: //graphviz.org/resources/ 或参见 https://web.archive.org/web/20131005020548/http://graphviz.org/Resources.php 获取存档副本。
I imagine you've already seen this link, but just for completeness, there is a list of viewers etc. at: http://graphviz.org/resources/ or see https://web.archive.org/web/20131005020548/http://graphviz.org/Resources.php for an archived copy.