Hummi Grammar Reference

Below is the formal defintion the grammar that Hummi interprets input, defined in EBNF. For an explanation, see Hummi Grammar Explanation.

hummi.ebnf

Download as text file: hummi.ebnf


(* Grammar for single line sub-graphs for fast diagram construction in Hummi.app *)

statement: ws (list | out | in)? ws
<list>: unit ws (<';;'> ws unit)*
<unit>: (node | group)
node: text links
<links>: (out | in)*
out: <'>>'> (label <'::'>)? (ws group | node)
in: <'<<'> (label <'::'>)? (ws group | node)
group: (left-group | right-group) links
<left-group>: <'[['> (ws label ws <'::'>)? ws list? ws <']]'>?
<right-group>: <'[['>? ws list? (ws <'::'> ws label)? ws <']]'>
label: text
<text>: ws #'^(?:(?!\s*>>)(?!\s*<<)(?!\s*::).)+'
<ws>: <#'\s*'>