Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/graphical/dot/rascal/concrete/extracted
Source used for this grammar: Bert Lisser, lang::dot::syntax::Dot
, 2011–2012 [GitHub]
Nod
, EdgeRhs
, Port
, AttrList0
, Subgraph
, Graph
, AttrList
, Statement
, StatementOptional
, NodeStatement
, StatementList
, Edg
, DOT
, AttrTag
, EdgeStatement
, AttrStatement
, EdgeOp
, NodeId
, DotAttr
), 0 root (—), 1 top (DOT
), 2 bottom (Id
12, LAYOUT
).Nod ::= Subgraph
Nod ::= NodeId
EdgeRhs ::=
Edg
Port ::= ":" Id Id
AttrList0 ::= "[" DotAttr "]"
Subgraph ::= "subgraph" Id "{" StatementList "}"
Graph ::=
"digraph"
Graph ::= AttrTag
Graph ::=
"graph"
AttrList ::=
AttrList0
Statement ::= AttrStatement
Statement ::= EdgeStatement
Statement ::= NodeStatement
Statement ::=
Id "=" Id
StatementOptional ::= Statement ";"
NodeStatement ::= Nod AttrList
StatementList ::=
StatementOptional
Edg ::= EdgeOp Nod
DOT ::= LAYOUT"{" StatementList "}" "\n"Graph Id
AttrTag ::=
"node"
AttrTag ::=
"graph"
AttrTag ::=
"edge"
EdgeStatement ::= Nod EdgeRhs AttrList
AttrStatement ::= AttrTag AttrList
EdgeOp ::=
"->"
EdgeOp ::=
"--"
NodeId ::= Id Port
NodeId ::= Id
DotAttr ::=
Id "=" Id
DotAttr ::= Id "=" Id ","