[1] TriGDoc ::= ws* (statement ws*)*
[2] statement ::= directive ws* '.' | graph
[3] graph ::= graphName? ws* '='? ws* '{' ws* (triples ws* ('.' ws* triples ws*)* '.'? ws*)? '}' ws* '.'?
[4] graphName ::= resource
All other grammar terms are defined by the Turtle grammar as of 2006/12/04.