Browsable Dot Grammar

CC-BY

Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: markup/graphical/dot/rascal/abstract/extracted
Source used for this grammar: Bert Lisser, lang::dot::Dot, 2012 [GitHub]

Summary

Syntax

Id ::=
	string
DotGraph ::=
	[graph]::([id]::Id [stmts]::Stms)
	[digraph]::([id]::Id [stmts]::Stms)
Stms ::=
	Stm*
NodeId ::=
	Id PortId
PortId ::=
	Id CompassPt
CompassPt ::=
	[N]::ε
	[NE]::ε
	[E]::ε
	[SE]::ε
	[S]::ε
	[SW]::ε
	[W]::ε
	[NW]::ε
	[C]::ε
	[_]::ε
Stm ::=
	[N]::([id]::Id [attrs]::Attrs)
	[N]::[id]::Id
	[N]::([nid]::NodeId [attrs]::Attrs)
	[N]::[nid]::NodeId
	[E]::([from]::Id [to]::Id [attrs]::Attrs)
	[E]::([from]::Id [to]::Id)
	[E]::([nfrom]::NodeId [to]::Id [attrs]::Attrs)
	[E]::([nfrom]::NodeId [to]::Id)
	[E]::([sfrom]::Stm [to]::Id [attrs]::Attrs)
	[E]::([sfrom]::Stm [to]::Id)
	[E]::([from]::Id [nto]::NodeId [attrs]::Attrs)
	[E]::([from]::Id [nto]::NodeId)
	[E]::([nfrom]::NodeId [nto]::NodeId [attrs]::Attrs)
	[E]::([nfrom]::NodeId [nto]::NodeId)
	[E]::([sfrom]::Stm [nto]::NodeId [attrs]::Attrs)
	[E]::([sfrom]::Stm [nto]::NodeId)
	[E]::([from]::Id [sto]::Stm [attrs]::Attrs)
	[E]::([from]::Id [sto]::Stm)
	[E]::([nfrom]::NodeId [sto]::Stm [attrs]::Attrs)
	[E]::([nfrom]::NodeId [sto]::Stm)
	[E]::([sfrom]::Stm [sto]::Stm [attrs]::Attrs)
	[E]::([sfrom]::Stm [sto]::Stm)
	[S]::([id]::Id [stms]::Stms)
	[S]::[stms]::Stms
	[A]::([prop]::Id [val]::Id)
	[GRAPH]::[attrs]::Attrs
	[NODE]::[attrs]::Attrs
	[EDGE]::[attrs]::Attrs
Attr ::=
	[prop]::string [val]::Id
Attrs ::=
	Attr*
Outline ::=
	([key]::integer [args]::string*)*
Dotline ::=
	[graph]::DotGraph [outline]::Outline

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