A GNU Emacs major mode for editing BNF grammars.
Currently provides basic syntax and font-locking for BNF files. EBNF and ABNF are in my plans for the near future.
- Syntax highlighting
Known to work with GNU Emacs 24.3 and later. BNF Mode may work with older versions of Emacs, or with other flavors of Emacs (e.g. XEmacs) but this is not guaranteed. Bug reports for problems related to using BNF Mode with older versions of Emacs will most like not be addressed.
The master of all the material is the Git repository at https://github.com/sergeyklay/bnf-mode .
NOTE: The master
branch will always contain the latest unstable version.
If you wish to check older versions or formal, tagged release, please switch
to the relevant tag.
TODO
TODO
- Download
bnf-mode.el
- Put the file in your Elisp common folder like
$HOME/.emacs.d/lisp/
- Then you can include like this:
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
- Add either of the two following lines to your initialization file.
The first only loads BNF Mode when necessary, the 2nd always during startup
of GNU Emacs.
(autoload 'bnf-mode "bnf-mode" nil t) ;; OR (require 'zephir-mode)
- Optionally byte compile
bnf-mode.el
for faster startup:M-x byte-compile
Command (For the M-x prompt.) | Description |
---|---|
bnf-mode | Switches to BNF Mode. |
bnf-mode-version | Print version info for BNF Mode. |
Any file that matches the glob *.bnf
is automatically opened in bnf-mode
.
Feel free to ask question or make suggestions in our issue tracker .
To see what has changed in recent versions of BNF Mode, see the CHANGELOG.org .
Zephir Mode is open source software licensed under the GNU General Public Licence version 3 .