[Tutor] Language parsing

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Tue, 27 Nov 2001 21:45:05 -0800 (PST)


On Tue, 27 Nov 2001, dman wrote:

> On Wed, Nov 28, 2001 at 03:49:22AM +0000, Allan Crooks wrote:
>
> | I'm planning to write a program which uses configuration files 
> | similar to those of fetchmail (an example of which can be found 
> | here: http://www.tuxedo.org/~esr/fetchmail/fetchmail-man.html#24)
> | 
> | I was wondering if anyone could recommend tools to help me 
> | process the configuration file (something which would require me to 
> | define a grammar and so on), 
> 
> SPARK is pretty popular.  There are others too, just search for "lex"
> in the Vaults of Parnassus.

SPARK is pretty nice; it's the tool I used to parse propositional phrases
in one of my side projects:

    http://hkn.eecs.berkeley.edu/~dyoo/python/propositions

One caveat: test your grammar as you work with SPARK.  I think that its
error messages need some... improvement.


Another popular parser tool is YAPPS:

    http://theory.stanford.edu/~amitp/Yapps

and as a side note, Amit Patel's web site is very very cool; he has a lot
of game programming information on his page.