Browsable Dot Grammar

CC-BY

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]

Summary

Syntax

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* Graph Id "{" StatementList "}" "\n"?
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 ","

GrammarLabMaintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Last updated in September 2015. []