Re: --- Regexps, compilers etc., prog help ---

Paul David Fox <pfox@lehman.com>
16 Feb 1997 22:52:49 -0500

          From comp.compilers

Related articles
--- Regexps, compilers etc., prog help --- sjain@a.chem.upenn.edu (1997-02-11)
Re: --- Regexps, compilers etc., prog help --- the_artful_parser@null.net (Quinn Tyler Jackson) (1997-02-16)
Re: --- Regexps, compilers etc., prog help --- pfox@lehman.com (Paul David Fox) (1997-02-16)
Re: --- Regexps, compilers etc., prog help --- jmccarty@sun1307.spd.dsccc.com (1997-02-20)
Re: --- Regexps, compilers etc., prog help --- nkramer@cs.cmu.edu (Nick Kramer) (1997-02-20)
Re: --- Regexps, compilers etc., prog help --- ok@cs.rmit.edu.au (1997-02-22)
Re: --- Regexps, compilers etc., prog help --- kanze@gabi-soft.fr (1997-03-14)
Re: --- Regexps, compilers etc., prog help --- the_artful_parser@null.net (1997-03-16)
Re: --- Regexps, compilers etc., prog help --- henry@zoo.toronto.edu (Henry Spencer) (1997-03-21)
[1 later articles]
| List of all articles for this month |

From: Paul David Fox <pfox@lehman.com>
Newsgroups: comp.compilers
Date: 16 Feb 1997 22:52:49 -0500
Organization: Lehman Brothers, Inc.
References: 97-02-072
Keywords: lex

Hursh Jain wrote:
> [re handling regular expressions]
> I don't know too much theory and to be honest I don't want to get down
> into too much theoretical detail ( involving books on compilers etc. )
>
> My very limited knowledge indicated that reg-exps are the first step
> to understanding compiler theory. Help !
>
> Hursh
> sjain@a.chem.upenn.edu
> [I'd sit down with the Dragon Book and read the chapter on regular
> expresssions and finite state machines. In this case, an ounce of
> theory is worth several hundred pounds of hacking, since it's such a
> thoroughly studied field. -John]


I must whole-heartedly agree. You cannot expect to write a regexp
parser and compiler without some knowledge of the theory behind it.
Its like learning to speak French without ever talking to a French
person.


As a newbie, the dragon book will look scary but just give it a light
read so you can acquaint yourself with what you dont know. You dont have
to learn it - just know what it contains - for reference.


Go and pick up some real life source code, e.g. GNU grep and
read the code.


If you want to learn - you will learn more by reading someone elses
code than botching up your own.


Regexps and compilers make me come out in a cold-sweat, but if I
keep my eyes closed, I know I can make myself belief I understand
them.


_______________________________________________________
| Paul David Fox Lehman Brothers. |
| ###################### E-mail: pfox@lehman.com |
| # This space for rent# Home: fox@crisp.demon.co.uk |
| ###################### Tel: +44 171 601 0011 x6397 |
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.