www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/12/06:30:42

From: sparhawk AT eunet DOT at (Gerhard Gruber)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Writing a simple compiler
Date: Sun, 12 Jul 1998 10:18:28 GMT
Organization: Customer of EUnet Austria
Lines: 42
Message-ID: <35a87366.524013@news.Austria.EU.net>
References: <359eebbc DOT 5439034 AT news DOT uow DOT edu DOT au> <35a720ea DOT 2211979 AT news DOT Austria DOT EU DOT net> <35a74609 DOT 2414510 AT news DOT uow DOT edu DOT au>
NNTP-Posting-Host: e115.dynamic.vienna.at.eu.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019