<file> ::= ( <statement> | <comment> | <block> )+
<statement> ::= <anytext>+ "\n"+
<comment> ::= "::" <anytext>+ "\n"+
<block> ::= "(" "\n"+ ( <comment> <statement> | <statement> | <block> )+ ")" "\n"+
<anytext> ::= #"[a-z0-9 ]"
<blockerror> ::= "{" "\n"+ ( <comment> <statement> | <statement> | <block> )+ "}" "\n"+
see https://mdkrajnak.github.io/ebnftest/
"test":
:: ok comment 1
ok statement 2
ok statement 3
:: ok comment 4
:: ok comment 5
ok statement 6
:: ok comment 7
(
:: broken comment 8
:: broken comment 9
ok statement 10
:: ok comment 11
ok statement 12
:: broken comment 13
)
statement ok 14
:: comment ok 15
:: ... etc ...