[Gardeners] Simple request for someone with graphical abilities
Christian Nybø
chr at nybo.no
Wed Apr 19 15:33:43 CDT 2006
On Apr 19, 2006, at 22:05, Peter Seibel wrote:
> For the FAQ I need a simple diagram of a parse tree. Here's an ASCII
> art sketch:
>
> *
> / \
> / \
> / \
> + -
> / \ / \
> 1 2 3 4
>
> If someone could make a reasonable looking .png of such a diagram,
> maybe with circles for the nodes, that'd be a great help.
In the dot language of Graphviz, it could be stated like this:
digraph parsetree {
node [shape = circle];
edge [dir = none];
star [label="*"];
plus [label="+"];
minus [label="-"];
n1 [label="1"];
n2 [label="2"];
n3 [label="3"];
n4 [label="4"];
plus -> {n1 n2};
minus -> {n3 n4};
star -> {plus minus};
}
Which would look like the attached image:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parse-tree.png
Type: image/png
Size: 9331 bytes
Desc: not available
Url : http://www.lispniks.com/pipermail/gardeners/attachments/20060419/104effd2/parse-tree.png
-------------- next part --------------
--
chr
More information about the Gardeners
mailing list