This ANTLR grammar will allow you to parse .dot files using ANTLR.
Currently, the parser builds a tree whose root node
depending on whether the document defines a directed graph or not.
The first child is just a text with the name of the graph, and his siblings
, in the order in which they appear in the
contains a set of children whose
names are the name of the
's attributes, and
themselves containing just a text node with the value of each one of the
On the other hand, a
is labeled with the
of the relationship, and would be a tree node composed of
depending on whether the document defines a directed graph or not, and
- the name of the
node which appears as
the target of the relationship.
The files are:
chous - available at acm-sl.org
Last modified: Tue Jan 24 16:27:28 CET 2006