Re: Tools for Syntax Improvement?

"Ira D. Baxter" <>
6 Oct 2000 01:18:10 -0400

          From comp.compilers

Related articles
Tools for Syntax Improvement? (2000-10-01)
Re: Tools for Syntax Improvement? (Ira D. Baxter) (2000-10-06)
Re: Tools for Syntax Improvement? (2000-10-08)
| List of all articles for this month |

From: "Ira D. Baxter" <>
Newsgroups: comp.compilers
Date: 6 Oct 2000 01:18:10 -0400
Organization: Posted via Supernews,
References: 00-10-010
Keywords: optimize

In theory, there are "lots" of language-preserving transforms one can
apply to grammars; see Aho and Ullman for many examples.

For tools, you need an engine that can carry out transforms, and a way
to read grammars and transform them.

While we haven't specially done this, the DMS Reengineering toolkit is
designed to read arbitrary languages (given an explicit language
definition) and transform them according to an arbitrary mix of
surface-syntax rewrites and procedural transforms. See

Of course, designing a syntax to read EBNFs is, well, pretty easy.
(And we have of course done that for DMS's version of EBNF). The real
problem I have with this is there are a lot of rather trivial variants
of EBNF (typically one per language reference document!), and the
effort to define the EBNF to a tool and to hand write the transforms
(a day or so) seems just about equal to the effort to hand-hack the
conversion of a few hundred rules. So we have tended to do the latter
when faced with reference grammars. (Of course, if you insist on
reliable modification, then you really should go the automated route).

Ira Baxter, Ph.D., CTO 512-250-1018x140
Semantic Designs, Inc., FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759

<rjbotting@CSUSB. edu (Richard J. Botting)> wrote in message
> Way back when, I remember someone published a paper on some tools they
> had that would automatically improve the expression of the grammar of
> a language into a form suitable for a compiler compiler like
> yacc/bison.

Post a followup to this message

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