Editing lex or yacc files with Emacs is a nuisance: if I use C mode the indenting goes wrong, and if I don't use C mode I can't use indenting. Does anyone have a trick, a method, or an editing mode to get around it?
A:
I generally toggle between Makefile mode, text mode, and C mode depending on which line I am on. If you want better, you should write the mode!
vy32
2010-01-31 08:56:32
I don't know Emacs lisp so I can't do that.
Kinopiko
2010-01-31 14:15:24
Good time to learn.
vy32
2010-02-15 03:49:55
+1
A:
Looks like Matz (of Ruby fame) wrote a yacc(/bison) mode. Have a look at http://www.rubyist.net/~matz/a/yacc.el
VoidPointer
2010-02-06 10:48:56
+2
A:
It's not entirely what you want but there is a very excelent Bison mode for Emacs.
http://www.emacswiki.org/emacs/BisonMode
This is a better link:
http://ftp.sunet.se/pub/gnu/emacs-lisp/incoming/bison-mode.el
Since Yacc and bison are so closely related I don't find it lacking too much. Though I do most of my work with Antlr anymore.
chollida
2010-02-09 19:16:20
A:
How about this one?
http://borkware.com/quickies/single?id=73
or this one
http://www.cs.utah.edu/dept/old/texinfo/emacs19/emacs_26.html#SEC184
c0mrade
2010-02-13 10:35:41