[antlr-interest] about antlr3 lexer output file size(C target)

miao miao_ly at hotmail.com
Sun Dec 6 18:18:51 PST 2009




David-Sarah Hopwood wrote:
> 
> 
> 7 MB -> 35 MB sounds like a pretty serious regression. That said,
> I think that the way you're handling encodings here is definitely
> suboptimal. You're almost certainly better off converting the
> input to a fixed encoding before lexing it. For the Java target that
> would be UTF-16; I don't know what would be best for C.
> 
> -- 
> David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com
> 
> 
>  
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 
> 

Thank you for your advice.
But I think converting the encoding before lexing may be spend additional
time and memory...
another question:
ANTLR is much powerful and controllable than other parser/lexer
generator,but I think the size of the generated code seems much more bigger
than any other I used(such as lex,yecc,lemon...).Are there any advice to
control the code size? A 7M lexer I still feel horrible.%-|

Kind regards 
miao

-- 
View this message in context: http://n2.nabble.com/about-antlr3-lexer-output-file-size-C-target-tp4104034p4124022.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list