[antlr-interest] Re: Error return from lexer/parser
antlrlist
antlrlist at yahoo.com
Tue Jun 17 09:50:13 PDT 2003
Sorry, I don't understand.
You say that your parser/lexer fails, but it does not rise any
exception nor print any error message. Then how do you know it fails?
Don't take me wrong, I'm not joking. If no errors are detected, then
this means that the entry is valid.
Things you could try:
- Make sure that your defaultErrorHandler
(http://www.antlr.org/doc/options.html#defaultErrorHandler) option is
set to true.
- Make sure that your grammar is not really rising exceptions (maybe
you forgot a try/catch block that is catching them, or you erased it
and forgot to re-compile?)
- Make sure that your grammar can not accept the entry that you
think is "wrong" (maybe your rules are not well defined, so they can
accept more entries than the ones you thought about initially)
- Finally, if nothing works, re-compile your analyzers with the -
trace command line option and trace the analysis.
I hope I could help you,
Enrique
--- In antlr-interest at yahoogroups.com, "Anil Kumar" <anilk at s...>
wrote:
> Hi everyone,
> I have a simple grammar, which has description for expression. When
i give
> it to the lexer/parser wrong expr. to the application, the
lexer/parser
> fails but it does not raises exceptions nor does it returns any
error
> status. Is there something missing that i have to specify to raise
> exception/return errors to the invoker of lexer/parser.
> Thanks,
> Anil
>
>
> DISCLAIMER: This email is bound by the terms and conditions
described at
> http://www.subexgroup.com/mail-disclaimer.htm
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list