I did write for me a major mode for writing grammars in Backus-Naur notation.
I send you the code of the Backus-Naur mode.
If you consider that this code would be useful for emacs, I will send improved versions.
I attach here a grammar file for testing it.
The font lock of the right nonterminals is chaged while typing.
A few key binding :
C-x SPC jumps to the definition of the right-nonterminal under the cursor.
mouse-3 jumps to the definition of the clicked right-nonterminal .
M-s rotate the cursor to all the matches of the left-nonterminal under the cursor.
C-u C-SPC can be used, because every jump adds a mark.
Note that I do not parse for myself in yacc notation: `;' between right symbols, `|' for another rule, etc.
I parse using a rule on every line, and all the symbols of a rule are separated by simple spaces.
Alin.