[antlr-interest] help for Tree Grammar PLSQL subset

skhalid sidraakhalid at gmail.com
Tue Apr 24 10:58:44 PDT 2012


I am doing my research project on converting PLsql to MySQL syntax. I have
completed analysis work and now I am doing implementation. I have taken
ANTLR, and C# for implementation. 

Since I am new to ANTLR so getting lot of trouble to write a translator in
antlr. I am using antlrworks 1.4 and i have extracted a subset of plsql
grammer which works fine to me and debuggers shows me correct AST. I am
getting problem on writing tree grammer for plsql subset grammar. 
grammer files Key.g and keyprinter.g  are attached herewith. 

I have extracted tree grammer from an open source link for the sake of my
learning so that i can understand  it by debugging the grammar in
antlrworks. 
https://bitbucket.org/notnull/ingres-migration-library/src/6203a63188cf/IngresMigrationParser/src/main/antlr3/com/ingres/antlr/idiom/oracle

When i run tree grammar on antlrworks, it gives error 
"grammar mismatch: grammar for the remote parser is not the same" 
and shows me NIL in antlrworks debugger 

ANTLR also provides the support for the Stringtemplates for writing
translators. I am bit confused that which approach should i follow for
translation .Please give me some suggestions on it. 
1- writing traslation logic in tree grammer directly 
2- using stringtemplte .stg files 


 key.g
keyPrinter.g


Can anyone help me and guide me with expert advice on it. 
Thanks in advance 


Sidra 


--
View this message in context: http://antlr.1301665.n2.nabble.com/help-for-Tree-Grammar-PLSQL-subset-tp7496855p7496855.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list