Related articles |
---|
grammar based programming compiler.ddj@h-rd.org (compiler.ddj@h-rd.org) (2011-08-08) |
Re: grammar based programming gene.ressler@gmail.com (Gene) (2011-08-12) |
From: | Gene <gene.ressler@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Fri, 12 Aug 2011 14:40:13 -0700 (PDT) |
Organization: | Compilers Central |
References: | 11-08-010 |
Keywords: | parse |
Posted-Date: | 12 Aug 2011 22:21:33 EDT |
On Aug 8, 2:50 pm, "compiler....@h-rd.org" <compiler....@h-rd.org>
wrote:
> recently I got interested in trying to use a grammar like approach to
> programming. My ideas were a bit inspired by PEG implementations and
> their usual capability of semantic actions. Basically programming in
> something like BNF. Do you know some references or links or the
> proper name for grammar based programming? I only found two papers:
>
> Constructing Programs as Executable Attribute Grammars by Frost
(http://cs.uwindsor.ca/~richard/PUBLICATIONS/COMPJ_92.pdf)
>
> Programming with Grammars by Hehner
(http://www.cs.toronto.edu/~hehner/PwG.pdf)
I doubt it. Or in a very broad sense you could say functional
programming has subsumed this idea. Attribute grammars, despite what
the authors claim, suffer from a big declarative semantics gap -- a
"too much magic" problem much like the one that also prevented logic
programming, e.g. Prolog, from becoming mainstream. AGs describe a
computation, but there are so many hidden evaluation details that
getting from a spec to an ag "program" can be far from intuitive. See
http://portal.acm.org/citation.cfm?id=808247 for the effort that took
ag's about as far as usefully possible, IMO.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.