Related articles |
---|
Are there any pure grammar examples available? russellf@selectst.com (Russ Freeman) (1998-07-20) |
Re: Are there any pure grammar examples available? collins@cs.wm.edu (Bob Collins) (1998-07-21) |
Re: Are there any pure grammar examples available? eodell@pobox.com (1998-07-21) |
Re: Are there any pure grammar examples available? jamz@my-dejanews.com (1998-07-24) |
From: | eodell@pobox.com (Eric O'Dell) |
Newsgroups: | comp.compilers |
Date: | 21 Jul 1998 11:10:41 -0400 |
Organization: | Compilers Central |
References: | 98-07-145 |
Keywords: | parse |
On 20 Jul 1998 17:04:35 -0400, "Russ Freeman" <russellf@selectst.com>
wrote:
>Has anyone come across such a thing as a pure language grammar? What I
>mean by pure is a language grammar that has not been "re-jigged" to
>make parsing easier (e.g. LL(1)).
>
>It strikes me that such a form would be more useful as a basis for
>designing a clean and regular AST. Otherwise it seems that your design
>may be bastardized to overcome limitations of parsing tools.
That depends on what you mean by "grammar". If you mean BNF, I can't
answer your question. But if syntax diagrams are okay by you, you
might want to look for texts on the Pascal family. Wirth seems to be
fond of syntax diagrams, which are pretty pure representations. I seem
to recall that IBM's PL/I documentation also uses syntax diagrams,
although PL/I, as a language, is a little short on actual syntax.
In the same general vein, you might want to look at some LL(k) parser
tools like PCCTS and PRECCX, which require much less "re-jigging" than
grammars for LALR(1) parsers, depending on the language.
--Eric
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.