[antlr-interest] ANTLR generating invalid Java

Oren Ben-Kiki oren at ben-kiki.org
Thu Aug 7 12:54:49 PDT 2008


On Thu, Aug 7, 2008 at 12:37 PM, Oren Ben-Kiki <oren at ben-kiki.org> wrote:
> I didn't see this warning in the book... Now that I am aware of it, I
> can avoid the problem by turning of auto-backtracking and manually
> adding syntactic predicates. Thanks!

I spoke in haste... it seems it is not possible to use rule parameters
in syntactic predicates :-(
It seems as though parameters were envisioned as carrying context only
to actions;
the rules themselves (that is, the valid input syntax) is not expected
to be affected by them.
This means I am SOL - my syntax _does_ depend on the value of the parameters.
Is this really the case?

Oren.


More information about the antlr-interest mailing list