[antlr-interest] Out of Memory

Mark Boylan boylan.mark at gmail.com
Sun Oct 4 01:07:06 PDT 2009


Hi.

My grammar is working really well with smaller test files, but I run
out of heap space on large files. Unfortunately, my users will expect
to be able to load pretty big files occasionally (~1GB).

Looking at the code documentation for the Antlr3 stream classes, it
looks like they copy the entire stream. I'm  thinking that I need to
write a custom implementation of IntStream or CharStream that buffers
the input. Is that the right way to solve this? Can someone point me
in the right direction?

Thanks!

 - mark


More information about the antlr-interest mailing list