[antlr-interest] Synchronizing error messages from filter

Monty Zukowski monty at codetransform.com
Fri Jul 30 11:00:34 PDT 2004


No, there is not a standard way to queue up that message.

You might make a custom token object that had a field for an error 
message.  Then override consume() in the parser to print your error 
before actually consuming the token passed it.

I'd need more details on how you want to handle that message to give 
you more specifics.

Monty

On Jul 30, 2004, at 10:36 AM, dotlessbraille wrote:

> I am using a custom filter rule when the lexer finds an unexpected
> item.  This rule simply skips ahead to the next statement and
> outputs a warning message to the user.
>
> There is a problem if a parser rule has caused the lexer to look
> ahead several tokens.  In this case, the warning message will appear
> out of order to the user because it will show up as soon as the
> lexer encounters it, before the parser has generated its output from
> correct tokens immediately preceding the unexpected item.
>
> Is there any standard way to queue up this message?
>
> Thanks,
> SusanJ
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>



 
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