[antlr-interest] Transformation to new grammar
Barry McGillin
barry.mcgillin at oracle.com
Mon Aug 15 05:03:01 PDT 2005
I have a grammar for one version of SQL that I'm mapping into Oracle SQL.
We can walk the trees and generate what we need to however, I have a full version of the target grammar available. Is is possible to map from one grammar to another, so that it is possible to verify that tree n is correct wrt the target grammar as shown below.
|Source Grammar | tree 1 | ... | tree n | Target grammar|
| o | o | | o | o |
| / \ | / \ | | / \ | / \ |
| o o | o o | | o o | o o |
| / \ | / \ | | / \ | / \ |
| o o |o o| |o o | o o |
Today, we can walk the source tree and make transformations to it to move us from tree 1 towards tree n, but when do we know we're finished and correct? I'm not looking for a specific solution, but rather some ideas about how this can be done efficiently if at all :-)
Thanks guys
Barry
More information about the antlr-interest
mailing list