[antlr-interest] "error reporting + paraphrase mechanism + cdfa.predict" problem
Amr Muhammad
amr.muhammad.w at gmail.com
Sun Nov 28 01:38:21 PST 2010
Hello,
I am trying to implement the paraphrase mechanism explained in the textbook
ch.10 p.240. However, an exception is raised before the rule gets a chance
to be called.
I have a rule like this:
rule1: (rule2 (a+ b* | b* a+) )* (rule2 a*)*
rule2 calls other rules which deep down implement the paraphrase mechanism
when i looked at the generated code, it seems that the rule1 function would
call sth like : cdfa9.predict(....)
This predict method is what makes the parser go to exception state and would
not execute the function for rule2
i am not sure what i am doing wrong here.. Appreciate your guidance.
Thank you for your time :)
Amr Muhammad
Cairo Univ. Computer Eng. Grad.
twitter:@amrmuhammad <http://twitter.com/amrmuhammad>
More information about the antlr-interest
mailing list