|Statement at a time parsing with yacc email@example.com (1991-12-12)|
|Parsing question firstname.lastname@example.org (Arshad Mahmood) (1991-12-13)|
|From:||Arshad Mahmood <email@example.com>|
|Organization:||Laboratory for the Foundations of Computer Science, Edinburgh U|
|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.
Return to the
Search the comp.compilers archives again.