[antlr-interest] Lexer issue with Python target and predicates

Laurie Harper laurie at holoweb.net
Fri May 18 12:35:12 PDT 2007


Benjamin Niemann wrote:
> Hello,
> 
> Laurie Harper wrote:
> 
>> I have a grammar which is producing illegal Python code. Both semantic
>> and syntactic predicates seem to trigger the incorrect code.
>>
>> [...]
> 
> That's fixed in the just released 3.0 - grab it, as long as it's fresh ;)
> 
>> [...] with the full grammar, the lexer is over 28Mb of Python (!) and
>> can't be imported :-(
> 
> Yeah - the Python compliler seems to be pretty memory hungry. I had a 15MB
> lexer and gave up after a few minutes with most of the swap memory being
> allocated.
> 
> That's fixed now, too. Now I'm using compressed lookup tables, which are
> uncompressed at runtime - just like Java, where .class files seem to have a
> size limit.

Wow, *much* better ;-) Thanks, that did the trick.

L.



More information about the antlr-interest mailing list