Parsing question

Arshad Mahmood <>
13 Dec 91 18:42:21 GMT

          From comp.compilers

Related articles
Statement at a time parsing with yacc compres! (1991-12-12)
Parsing question (Arshad Mahmood) (1991-12-13)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Arshad Mahmood <>
Keywords: parse, OOP
Organization: Laboratory for the Foundations of Computer Science, Edinburgh U
References: 91-12-061
Date: 13 Dec 91 18:42:21 GMT

I have been writing a program transformation system, where transformations
are represented as pairs of patterns (the declarative reading of a
transformation being anything matching the first pattern may be replaced
by the second (suitably instantiated)).

I originally represented patterns as a new syntactic catgeory (only some
expressions of the language could be patterns), however I would like to
allow any valid sub-expression of a legal expression to be a pattern.
There is an obvious trivial solution, which is simply to declare this
pattern syntactic category to comprise every other syntactic category. As
you can imagine this is grossly ambiguous, I have other slightly more
intelligent ways of essentially doing the same thing.

If anyone has a reference on a treatment of grammars such as these, I
would be very greatful.

A. Mahmood
Edinburgh U.

Post a followup to this message

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