The following grammar is based on this EBNF specifications for EBNF meta-grammar:
ebnf ::= [ global-desc ] { local-desc | rule | comment }
local-desc ::= '{' ? { any-character } ? '}'
global-desc :: "{{" ? { any-character } ? "}}"
rule ::= identifier '::=' expression [ '.' ]
expression ::= term { '|' term }
term ::= factor { factor }
factor ::= identifier
| string-literal
| character-literal
| '(' expression ')'
| '[' expression ']'
| '{' expression '}'
| '?' expression '?'
| option
| repetition
| group
option ::= expression '?'
repetition ::= expression '*'
| expression '+'
group ::= '(' expression ')'
character-literal ::= "'" ? any-character ? "'"
string-literal ::= '"' ? { any-character } ? '"'
identifier ::= letter { letter | '-' }
letter ::= 'A' | 'B' | ... | 'z'
Put your name on it, maybe a LICENSE too.
this is the best EBNF syntax by far (and I've reviewed nearly all the variants of EBNF syntax highlighters).