[antlr-interest] Workaround: Does @synpredgate work per rule?
Colin.Macdonald at us.gbs.com
Tue Nov 23 07:42:10 PST 2010
FYI - I put in place a workaround by including (state.backtracking>0) in
This works, but will cause lookahead to produce false positives in some
GROUP Business Software
----- Forwarded by Colin Macdonald/NA/GBS on 2010-11-23 10:06 AM -----
From: Colin Macdonald <Colin.Macdonald at us.gbs.com>
To: antlr-interest at antlr.org
Date: 2010-11-22 01:38 PM
Subject: [antlr-interest] Does @synpredgate work per rule?
Sent by: antlr-interest-bounces at antlr.org
Hi all, quick question,
Searching the forums leads me to believe that @synpredgate works at the
rule level. However my attempts (in Java target) still end up with "if (
state.backtracking==0 )" code
Terence posted this, which seems to indicate that it will work
A month earlier he'd described the exact problem I'm facing with syntactic
predicates and setting necessary scope variables in actions during
backtracking. But didn't have a solution at that time.
More information about the antlr-interest