[antlr-interest] Highlighting syntax errors

Ana Nelson nelson.ana at gmail.com
Wed Jan 21 04:58:34 PST 2009


Hi, Indhu,

You could also try the syntax highlighting support in Pygments (
http://pygments.org/). ANTLR support is only in the development branch for
now, but it should be included in the next release. To check out the source:

hg clone http://dev.pocoo.org/hg/pygments-main

This would let you view your coloured code as HTML or any of the available
Pygments formats.

Regards
Ana



2009/1/21 Indhu Bharathi <indhu.b at s7software.com>

> Got it! I guess I can do that using
> org.antlr.runtime.debug.DebugEventListener's beginResync (), endResync () &
> consumeToken(Token t)
>
>
> http://www.antlr.org/api/Java/interfaceorg_1_1antlr_1_1runtime_1_1debug_1_1_debug_event_listener.html
>
> :-)
>
>
> ----- Original Message -----
> From: Indhu Bharathi <indhu.b at s7software.com>
> To: antlr-interest <antlr-interest at antlr.org>
> Sent: Wednesday, January 21, 2009 5:30:06 PM GMT+0530 Asia/Calcutta
> Subject: [antlr-interest] Highlighting syntax errors
>
> Hi,
>
> When I parse an input in ANTLRWorks IDE, I can see which portion of the
> input has errors using the 'input' window in the debugger. Syntax error
> (handled by automatic error recovery) will be highlighted in red. While this
> is a very useful feature, I cannot parse a very big file (approx 1 mb)
> inside the IDE as that would be very slow. Is there a way to do this "error
> highlighting" outside the IDE using the error handling techniques? I looked
> into chapter 10. But didn't get any hint.
>
> Advanced thanks for any pointers :-)
>
> - Indhu
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090121/075e64eb/attachment.html 


More information about the antlr-interest mailing list