Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a good Emacs mode or method for lex/flex/yacc/bison files?

Tags:

emacs

yacc

lex

People also ask

Is yacc and bison same?

Bison is the GNU implementation/extension of Yacc, Flex is the successor of Lex.

Do people still use YACC?

Yes, this stuff is still used.

Is Flex and Lex same?

Flex (fast lexical analyzer generator) is a free and open-source software alternative to lex. It is a computer program that generates lexical analyzers (also known as "scanners" or "lexers").

What is yacc and bison?

Bison originated as a workalike of a program called Yacc — Yet Another Compiler Compiler. 9. Yacc was written at Bell Labs as part of the very early development of Unix; one of its first uses was to develop the original Portable C Compiler, pcc. The same person, Steven C. Johnson, wrote Yacc and the original pcc.


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.lip6.fr/pub/emacs/elisp-archive/incoming/bison-mode.el.gz

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.


Looks like Matz (of Ruby fame) wrote a yacc(/bison) mode. Have a look at http://www.rubyist.net/~matz/a/yacc.el