[antlr-interest] Syntactic predicate not being generated

Terence Parr parrt at cs.usfca.edu
Sun Jul 31 01:41:14 PDT 2005


On Jul 30, 2005, at 7:44 PM, Olivier Dragon wrote:

> On Fri, Jul 29, 2005 at 11:54:37AM -0400, Olivier Dragon wrote:
>
>> I have this problem where I put a syntactic predicate inside the  
>> lexer
>> and no code is being generated for it. I get no warnings or errors  
>> (it's
>> inside an alternative block with more than one). Here is the lexer  
>> rule:
>>
>
> I found that by increasing codeGenMakeSwitchThreshold to something
> higher than the number of alternatives I had would generate proper  
> code
> with the syntactic predicate check. Before that I was using the  
> default
> value, that is not specifying one.
>
> Is this a known bug with ANTLR?

Yikes!  That sounds like a problem.  I was going to suggest that  
perhaps ANTLR decided you didn't need the pred, but this second email  
makes it sounds just wrong; that switch shouldn't change  
functionality. :(

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



More information about the antlr-interest mailing list