bnfc-mode simplifies editing BNFC input files in Emacs. BNFC is a handy tool for converting context-free grammars into parsers, syntax highlighters, and documentation.
Input files are in a language called Labelled BNF. As a context-free grammar, it's capable of describing itself. Here's a screenshot of part of that grammar in bnfc-mode.
- Syntax highlighting via
font-lock-mode
- Automatically loads on files with
*.cf
extension - Comment/uncomment lines using
M-;
The recommended way is via MELPA, but it can also be installed manually.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.