[antlr-interest] (no subject)
Meena Vinod
spprtmail09 at yahoo.com
Thu Feb 5 21:19:10 PST 2009
Hi,
I have a .g file.If i give invalid values as input,most of them report the error:"cannot match to predicted input" .Is there any way by which i can generate different errors.I inserted a new exception macro in antlr3exception.h file but since my rule is for eg:
new_cmd: new_verb (new_options)* (target_Instance)* ..here the valid input would be "cd -k ./dir" (or) cd (or) cd -k (or) cd ./dir
(note :- new_verb:cd, new_options=-k, target_Instance=./dir )
but if i give cd -g which is invalid and i try to catch the new error in the new_options rule in parser.c file it doesnt catch the error as it is optional and goes to the next rule which is target_Instance.How do i catch the error in the second rule only even though its optional.Pls help
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090205/5f10c079/attachment.html
More information about the antlr-interest
mailing list