[antlr-interest] Examples of semantic predicates with extremely long generated code

Sam Harwell sharwell at pixelminegames.com
Mon Apr 4 10:23:40 PDT 2011


For the example at the bottom of ANTLR-245, I get the following condition in
args, element, and element2 (respectively):

!((((true)||(false))))

!((false))

!((true))

The tool doesn't have target language analysis, so true and false here might
as well be X and Y.

I'll work on getting this into the Java version after some more testing.

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Terence Parr
Sent: Monday, April 04, 2011 12:02 PM
To: antlr-interest Interest
Subject: Re: [antlr-interest] Examples of semantic predicates with extremely
long generated code

Looks like I have three different bugs entered

http://www.antlr.org/jira/browse/ANTLR-393
http://www.antlr.org/jira/browse/ANTLR-430
http://www.antlr.org/jira/browse/ANTLR-245

 I recall that at least one of them had a small example.
T
On Apr 4, 2011, at 9:58 AM, Sam Harwell wrote:

> Hi everyone,
> 
> For certain cases of semantic predicates, ANTLR generates some 
> *extremely* long, complicated, and redundant conditionals in the 
> output code. I've been working on resolving this issue, and I'm 
> looking for some examples of these grammars to make sure my updates 
> properly reduce these conditionals. Does anyone have a sample they can
send me?
> 
> Thanks!
> Sam
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list