# BNF-mode

I do a lot of writing and editing of context-free grammars in BNF format, eg for my work on Grammatical Evolution (examples here and here).

I was amazed to find that there’s no Emacs mode for editing BNF. Here’s a small contribution which does some syntax highlighting. It also lives at EmacsWiki.

## Installation

Paste it into your .emacs file and execute it with C-x C-e. When you edit a .bnf file, it will automatically go into BNF-mode.