Skip to content

Instantly share code, notes, and snippets.

@luxbock luxbock/ebnf-mode.el
Created Mar 24, 2014

Embed
What would you like to do?
(define-generic-mode 'ebnf-mode
'(("(*" . "*)"))
'("=" ":" ":=" "::=")
'(
("^[^ \t\n][^=]+" . font-lock-variable-name-face)
("<" . font-lock-constant-face)
(">" . font-lock-constant-face)
("['\"].*?['\"]" . font-lock-string-face)
("\\[\\|\\]\\|{\\|}\\|(\\|)\\||\\|,\\|;" . font-lock-type-face)
("\\?" . font-lock-builtin-face)
("\\*" . font-lock-builtin-face)
("\\+" . font-lock-builtin-face)
("[^ \t\n]" . font-lock-negation-char-face))
'("\\.ebnf\\'")
`(,(lambda () (setq mode-name "EBNF")))
"Major mode for EBNF metasyntax text highlighting.")
(provide 'ebnf-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.