Re: grammar based programming

Gene <>
Fri, 12 Aug 2011 14:40:13 -0700 (PDT)

          From comp.compilers

Related articles
grammar based programming ( (2011-08-08)
Re: grammar based programming (Gene) (2011-08-12)
| List of all articles for this month |

From: Gene <>
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, "" <>
> 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
> Programming with Grammars by Hehner

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 for the effort that took
ag's about as far as usefully possible, IMO.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.