Related articles |
---|
Generalized parser without generation moughanj@tcd.ie (2004-02-01) |
Re: Generalized parser without generation joachim.durchholz@web.de (Joachim Durchholz) (2004-02-04) |
Re: Generalized parser without generation derkgwen@HotPOP.com (Derk Gwen) (2004-02-04) |
Re: Generalized parser without generation jesjones@mindspring.com (Jesse Jones) (2004-02-04) |
Re: Generalized parser without generation pete@restall.net (Peter Restall) (2004-02-04) |
Re: Generalized parser without generation cfc@shell01.TheWorld.com (Chris F Clark) (2004-02-04) |
Re: Generalized parser without generation vidar@hokstad.name (2004-02-04) |
Re: Generalized parser without generation bear@sonic.net (Ray Dillinger) (2004-02-08) |
From: | Ray Dillinger <bear@sonic.net> |
Newsgroups: | comp.compilers |
Date: | 8 Feb 2004 22:06:55 -0500 |
Organization: | Compilers Central |
References: | 04-02-031 |
Keywords: | parse |
Posted-Date: | 08 Feb 2004 22:06:55 EST |
> A friend of mine has been given a final year project for which his
> supervisor wants the above; that is, a program which can read in a
> description of a grammar then parse a file using it directly. Users
> must be able to add new grammars at any time without compiling. He
> has been told that this should be easy to find on the net, but this
> doesn't seem to be the case, and I certainly don't believe it. Does
> anyone know if such a tool exists, and if so, can they point me in
> the right direction?
I monkeyed such a beast together in about a week, using Scheme. It
would probably be just as easy in Common Lisp. The key is using
quote, unquote, and eval (and lots of lisp macrology) to make your
grammar description directly executable.
Use promises for first and follow sets; that guarantees that no matter
how many times you refer to them they will only be computed once.
Bear
Return to the
comp.compilers page.
Search the
comp.compilers archives again.