[antlr-interest] Error nodes created upon syntax error
Terence Parr
parrt at antlr.org
Sat Jan 12 11:49:59 PST 2008
On Jan 12, 2008, at 1:34 AM, Gavin Lambert wrote:
> At 08:18 12/01/2008, Terence Parr wrote:
> >The Simple solution is to turn this off, relying on a
> >normal "exit rule upon syntax error" mechanism but leave
> >the insertion and deletion mechanism as an option by
> >overriding methods.
>
> It'd be nicer if there were an "options" entry that controlled this
> (both on a per-rule basis as well as a grammar-wide basis).
>
> (Of course, I'm a big fan of options, anyway; I'm still missing
> caseInsensitiveLiterals and the token aliases...)
:) well, as you can tell I'm not a big fan of options because each
Boolean option doubles my testing space. Literals are as obvious as
simple method overrides to let you say precisely what you want. In
this case the documentation is the code. Simple faq entry solves
everything for every target :)
I like single solutions that simply work. This morning I came up with
the "correct" answer: do single token insertion and deletion for a
token not referenced in an action or a rewrite rule. :) perfect,
bigger burden on me but easier on the user.
Ter
More information about the antlr-interest
mailing list