Mail Archives: djgpp/1998/07/12/06:30:42
Destination: blp01 AT uow DOT edu DOT au (Brett Porter)
From: Gruber Gerhard
Group: comp.os.msdos.djgpp
Date: Sat, 11 Jul 1998 11:26:35 GMT:
>Got it right next to me... due back at the library on Wednesday :)
:)
>It was fantastic learning how to use lex and yacc but didn't do much
>in terms of actions and code-generation: beyond the scope of the book
>really. I think I've got it down now, using "Introduction to Compiling
>Techniques" by JP Bennett. It uses Lex, Yacc and C to write a simple
>compiler, with all the source in the back of the book. Mine is
>slightly more complicated than the language they use, but it got me
>going. We'll see... any other good books would be appreciated.
The only other one I know is in german, so not much use there. :)
>No, I think it is a non-essential feature, not worth the time. I don't
The problem is, that it is enssential if you want to parse real C/C++ source
code conforming to the definition. BUt I wonder if it is not faster when I
parse it on my own instead of writing a lex/yacc definition,
>have a preprocessor: the lex module includes, defines and skips
>comments as it goes.
I think that may be faster. Although the book claims that lex is faster then a
dedicated lexer.
--
Bye,
Gerhard
email: sparhawk AT eunet DOT at
g DOT gruber AT sis DOT co DOT at
Spelling corrections are appreciated.
- Raw text -