Re: [graphviz-interest] Is DOT syntax ambiguous re node names and subgraph names?
"Emden R. Gansner" <[email protected]> Wed, 19 Nov 2014 16:36:14 -0500
| Newsgroups | gmane.comp.video.graphviz |
|---|---|
| Message-ID | <[email protected]> |
On 11/18/14 6:10 PM, Ron Savage wrote:
>
>
> Am I correct in thinking the attached (previous email) shows a
> situation where, to disambiguate, dot (by convention) takes 'one' and
> 'cluster_four' as node names rather than subgraph names?
>
> Is the decision documented somewhere? I couldn't see it on
> http://www.graphviz.org/content/dot-language.
>
That's specified by the grammar in the subgraph production. A subgraph
can have only one of three forms:
{...} // totally anonymous
subgraph { ... } // still anonymous but with syntactic sugar so it's
clear it's a subgraph
subgraph ABC { ... } // named subgraph
so the line
> one { two -> three }
is interpreted as a node whose name is "one", and an anonymous subgraph
containing the two nodes "two" and "three" and an edge
between them.
Emden
_______________________________________________
[email protected]
http://lists.research.att.com/mailman/listinfo/graphviz-interest