[antlr-interest] Getting information on failed syntactic predicate?

Ric Klaren klaren at cs.utwente.nl
Wed Feb 4 03:43:52 PST 2004


On Tue, Feb 03, 2004 at 02:02:59PM -0500, Daniel Shane wrote:
> Is it possible to get some information on why a certain syntactic predicate 
> failed?
> 
> eg. If I have the following rule:
> 
> a:
>    (b)=> b
>   | c
> 
> and b does not match, is it possible to have the "reason" why b failed? This 
> would be the error message generated by:

If it's for debugging purpose you can turn on tracing (-tracexxx options to
antlr) You may have to override a few of the trace methods in the generated
classes to make tracing visible during guessing mode. Don't recall of the
top of my head if this last step is necessary.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  Quidquid latine dictum sit, altum viditur.
                 (Whatever is said in Latin sounds profound.)


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list