Well I think I may have found the source of the problem. I had backtrack=true enabled, and that may have caused any error reporting capabilities to disappear.
On Wed, Jan 28, 2009 at 4:24 PM, Bot Tiger <[email protected]> wrote: > Dear Jim and ANTLR community, > > >Are you saying that this aborts when trying to print an error message if > >you do not try to override the reporting function with your own, or that > > >it aborts with your own reporting function? > > > It does not abort in either my handler or the default one. It reports a token > at offset -1 which does not make sense if it is EOF. > > > Here is an example using the default handlers. > > > >> 1++2 > > -memory-(1) : error 5 : Unexpected token, at offset -1 > near [Index: 0 (Start: 1369936-Stop: 1369936) ='1', type<15> Line: 1 > LinePos:-1] > : missing elements... > -memory-(1) : error 5 : Unexpected token, at offset -1 > > near [Index: 0 (Start: 1369936-Stop: 1369936) ='1', type<15> Line: 1 > LinePos:-1] > : missing elements... > > As you can see here, the default error reporter here says that there is an > unexpected token at offset -1. You said that this means it is expecting an > EOF token. > > I thought it would be expecting a number token. > > I expected the error report to say something like: > > Unexpected token at offset 2. Expected NUMBER token. > > Thank you again. > > --~--~---------~--~----~------------~-------~--~----~ 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
