[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison version in graph output file
From: |
tys lefering |
Subject: |
Re: bison version in graph output file |
Date: |
Mon, 3 May 2010 07:22:56 +0200 |
User-agent: |
SquirrelMail/1.4.18 |
Hi Joel,
Here a patch on graphviz.c with maybe something interesting:
- nodes are "1", "2" etc. because did not like using
numbers as identifiers, now it are strings.
- counter for number of nodes/edges and printing of it
at end of graph file in c++ comment, for manual inspection
to get some idea of the graph size and complexity.
- colors again as it was done in the vcg graph output.
- statement in header what the edge style/colors are about
- edge attributes separated with ',' just as dot does
it in the pdf documentation. (but can also be spaces)
"137" -> "71" [style=solid,color="blue",label="\"char\""]
- color between "" because it also can be other formats
with numbers like "#112233" or color="0.002 0.999 0.999"
output is like this:
// Generated by GNU Bison 2.4.502-bc81d-dirty.
// Report bugs to <address@hidden>.
// Home page: <http://www.gnu.org/software/bison/>.
// Shifts are solid, gotos are dashed, and error are dotted edge lines.
// Shifts are blue, gotos are green, and error are red colored edge lines.
digraph "p.y"
{
"0" [label="0\n$accept -> . input \"end of file\""]
"0" -> "1" [style=dashed,color="green",label="input"]
...
"147" [label="147\nrhs -> rhs symbol named_ref.opt ."]
}
// 148 nodes and 283 edges in this bison graph
attached patch.txt
Thanks.
patch.txt
Description: Text document