[antlr-interest] Getting information on failed syntactic pred
icate?
mzukowski at yci.com
mzukowski at yci.com
Tue Feb 3 13:33:36 PST 2004
Here's something to think about. Error reporting generally excludes any
information from a failed predicate. Sometimes the predicate fails,
everything else fails, and you would want to report something about the
possibilities it was expecting, including for the predicate.
Mont6
-----Original Message-----
From: Terence Parr [mailto:parrt at cs.usfca.edu]
Sent: Tuesday, February 03, 2004 12:58 PM
To: antlr-interest at yahoogroups.com
Subject: Re: [antlr-interest] Getting information on failed syntactic
predicate?
Hi
Depends on what you mean by the reason...do you mean the token sequence
that failed? You can use my new RewriteEngine to track all tokens and
have an index number for each. Then, upon failure (override a method
or somethign) record what the token index is. You can also record the
index of when you started guessing. Then you can print out a failed
sequence if you know for sure you got an error from it...
Ter
On Feb 3, 2004, at 11:02 AM, Daniel Shane wrote:
> Hi,
>
> 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:
>
> a:
> b
>
> ideally.
>
> Is this possible?
>
> Thanks in advance!
> Daniel Shane
>
> _________________________________________________________________
> MSN Messenger : discutez en direct avec vos amis !
> http://messenger.fr.msn.ca/
>
>
>
>
> 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/
>
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing
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/
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