[ale] lexx/yacc (flex/bison) book recommendation?

Danny Cox danscox at mindspring.com
Mon Sep 29 18:36:05 EDT 2003


John,

On Mon, 2003-09-29 at 12:21, John Wells wrote:
> I'm interested in learning more about lexx/yacc...particularly in writing
> parsers to help to translations from a particular language to another.
> 
> Anyone gone down this road before?  What's the best approach?  There's an
> Oreilly book and a GNU book and I'm torn between the two. 

	I have the O'Rielly book, and for the initial stuff like "what is a
lexical analyzer" and "what is a parser (generator)", it's excellent. 
They include a lexer/parser for a subset of SQL.

	I'm with Alan, though.  The GNU flex/bison combo is much more
configurable, and can do tricks that took some C pre-processor tricks
with lex/yacc (e.g. > 1 seperate grammers in one executable).  Flex is
also insanely fast compared to hand written parsers I've done.

	The info pages for flex and bison go into quite some detail.  They're
pretty good.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny



More information about the Ale mailing list