[antlr-interest] [c target] memory leaks during error recovery

yurushkin at rambler.ru yurushkin at rambler.ru
Sun Oct 18 14:06:41 PDT 2009


good day,
I have the rule

myRule[returns Type1 res] :
	rule1, rule2, rule3, rule4... ruleN { res = f($rule1, $rule2,..., ,
$ruleN) }
	;

it's all ok.
BUT if ruleN will fire exception, rule1, rule2.. rule(N-1) subtrees will
be forgotten!!!
How can I manage such situations?? can you write me right code for such
rule, that gives answer on my question?
thanks

PS: I tried to use "catch" attribute .. but it needs errorCode. It's not
good, because there're may be different errors.

-- 
Best regards,
Michael


More information about the antlr-interest mailing list