|
|
|
Ron Blaschke says:
Here are a few random observations that may help: * The IPV6_ADDRESS and subrules are enough to make the lexer generator choke really hard * With enough heap memory (2GB+) there's some progress. Memory usage goes up to about 1.8 GB, falls down to less than 100MB and creeps up to 1.8 GB again, and repeats. * With heap limited to 100MB ANTLR dies with OutOfMemoryError. Looking at the memory dump almost all heap memory is retained by 128,000+ StringTemplate objects. With 1GB heap there are 660,000+ StringTemplate objects, retaining almost the entire heap. acyclic DFA generation inline can still explode because a single state may be reachable from multiple other states. Each pass to that state regenerates all the subsequent edges. There is still a very large expansion in the number of states generated. Gets huge. Solution was to introduce option:
-Xmaxinlinedfastates m max DFA states before table used rather than inlining and set default to 10 states. |
||||||||||||||||||||||||||||||||||||||||||||||
I removed the DEC_OCTET and IPV6_ADDRESS, and it worked fine. With
either of them it ran into the same problems again. Maybe check these
two out.