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


      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to