Syntax highlighting is also available for vim.
Overview
This page describes the XEmacs major mode for JFlex.
It currently supports the following features:
- Syntax highlighting (with font-lock) for JFlex keywords and Java actions
- Automatic indentation during typing (with TAB)
This current, initial version is somewhat preliminary (only one
level of highlighting in actions, some indentation may not work yet,
no customizations possible yet), but it works pretty well for a start.
I've tested it with XEmacs 21.1 and 21.4, but it should also run with
any other reasonably recent version of XEmacs (FSF Emacs might work,
too, but I haven't tried).
Since I'm playing the Emacs Lisp game at novice level, I would
appreciate feedback and criticism for this package (to <lsf@jflex.de>).
Depending on user feedback and/or contributions more features will be
added as the package matures. When it is reasonably stable, it will be
distributed together with JFlex.
Download
The mode consists of a single Emacs Lisp file:
Installation
- Put the source file into your load path. That is: (a) Put the file
jflex-mode.el into the directory ~/.xemacs/lisp. (b) Compile the file
using M-x byte-compile-file RET ~/.xemacs/lisp/jflex-mode.el RET.
-
Put the following code into your XEmacs init file. That is, open (or
create) the file ~/.emacs and insert the following lines:
(autoload 'jflex-mode "jflex-mode" nil t)
(setq auto-mode-alist (cons '("\\(\\.flex\\|\\.jflex\\)\\'" . jflex-mode) auto-mode-alist))
|
- Restart XEmacs.
|