[antlr-interest] Prevent rulePostProcessing

ssUser sajnamismail at gmail.com
Tue Jun 26 23:53:06 PDT 2012


Hi, 

Is there a way that I can prevent rulePostProcessing from happening? I dont
want to modify the auto generated scripts to do this. Basically I want the
returned tree to always have the root node even if it is a tree with a
single node. Meaning I would like the ^(nil X) to remain as ^(nil X) and not
be processed to X. Can this be done from the grammar itself? 

Also, is it possible to change the text of the default nil root to anything
else? I understand the nil root has a text 'null' and that this gets added
by antlr for flat trees. Can I set this from the grammar itself so that
getText gives me something I have set instead of null? 

Thanks
SS

--
View this message in context: http://antlr.1301665.n2.nabble.com/Prevent-rulePostProcessing-tp7578286.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list