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: | Jesse Jones <jesjones@mindspring.com> |
Newsgroups: | comp.compilers |
Date: | 4 Feb 2004 21:43:26 -0500 |
Organization: | EarthLink Inc. -- http://www.EarthLink.net |
References: | 04-02-031 |
Keywords: | parse |
Posted-Date: | 04 Feb 2004 21:43:26 EST |
James Moughan <moughanj@tcd.ie> wrote:
> 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.
You can do this sort of thing with an Earley parser or a generalized
recursive descent parser (something like what boost::spirit does). An
Earley parser is a bit harder to write, but supports left-recursion
and ambiguity better than a recursive descent parser.
> James Moughan
> [Extensible parsers that could add new syntax on the fly were popular in
> the 1970s, but I haven't seen any lately. They turned out to be useful
> for writing code that nobody could read, but not for much else. -John]
What about Dylan? It places some limits on the kinds of things you can
define, but even with those in place you can create an awful lot of
new syntax.
-- Jesse
Return to the
comp.compilers page.
Search the
comp.compilers archives again.