[antlr-interest] ANTLRWorks 2 (for ANTLR v4)

Sam Harwell sharwell at pixelminegames.com
Mon Sep 12 08:26:38 PDT 2011


This is easy for a parser. Just add the following to your grammar.

@rulecatch{}

Aside from answering the single question "In the input recognized by this
grammar? (yes/no)", this is a rather useless thing to do. There are many,
many other ways to approach error handling that are more appropriate for any
other task.

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Wujek Srujek
Sent: Monday, September 12, 2011 4:18 AM
To: antlr-interest Interest
Subject: Re: [antlr-interest] ANTLRWorks 2 (for ANTLR v4)

I am new to ANTLR3 and haven't yet got a lot of experience with it. The one
thing that is bugging me, though, is how hard it was to make sure ANTLR
doesn't perform any recovery and fails on first error with checked
exceptions. And it involved a nasty trick with sneaky throwing... I would
love to see it made easier.

wujek




More information about the antlr-interest mailing list