Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #234

Re: grammar based programming

From Gene <gene.ressler@gmail.com>
Newsgroups comp.compilers
Subject Re: grammar based programming
Date 2011-08-12 14:40 -0700
Organization Compilers Central
Message-ID <11-08-017@comp.compilers> (permalink)
References <11-08-010@comp.compilers>

Show all headers | View raw


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.

Back to comp.compilers | Previous | NextPrevious in thread | Find similar


Thread

grammar based programming "compiler.ddj@h-rd.org" <compiler.ddj@h-rd.org> - 2011-08-08 20:50 +0200
  Re: grammar based programming Gene <gene.ressler@gmail.com> - 2011-08-12 14:40 -0700

csiph-web