Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #227 > unrolled thread

grammar based programming

Started by"compiler.ddj@h-rd.org" <compiler.ddj@h-rd.org>
First post2011-08-08 20:50 +0200
Last post2011-08-12 14:40 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.compilers


Contents

  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

#227 — grammar based programming

From"compiler.ddj@h-rd.org" <compiler.ddj@h-rd.org>
Date2011-08-08 20:50 +0200
Subjectgrammar based programming
Message-ID<11-08-010@comp.compilers>
Dear compilers readers,

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 would be glad to hear from anything you have heard about this.
Maybe? it is known in the compiler community under a different name.

thanks,

Marc

compiler.ddj@h-rd.org

[toc] | [next] | [standalone]


#234

FromGene <gene.ressler@gmail.com>
Date2011-08-12 14:40 -0700
Message-ID<11-08-017@comp.compilers>
In reply to#227
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.compilers


csiph-web