この文法ファイル(Creole wiki マークアップ用) を Antlr 3 でコンパイルしようとしていますが、Antlr ツール (C# バージョン) でメモリ リークが発生し、Java バージョンではヒープ スペースが不足します。
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.util.Arrays.copyOf(Unknown Source)
at java.util.ArrayList.grow(Unknown Source)
at java.util.ArrayList.ensureCapacityInternal(Unknown Source)
at java.util.ArrayList.add(Unknown Source)
at org.antlr.misc.OrderedHashSet.add(OrderedHashSet.java:67)
at org.antlr.analysis.DFAState.addNFAConfiguration(DFAState.java:229)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:632)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:708)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:477)
at org.antlr.analysis.NFAToDFAConverter.findNewDFAStatesAndAddDFATransitions(NFAToDFAConverter.java:296)
at org.antlr.analysis.NFAToDFAConverter.convert(NFAToDFAConverter.java:110)
at org.antlr.analysis.DFA.<init>(DFA.java:237)
at org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1355)
at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:1119)
at org.antlr.tool.Grammar.createLookaheadDFAs(Grammar.java:1069)
at org.antlr.codegen.Target.performGrammarAnalysis(Target.java:118)
at org.antlr.codegen.JavaTarget.performGrammarAnalysis(JavaTarget.java:54)
at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:286)
at org.antlr.Tool.generateRecognizer(Tool.java:696)
at org.antlr.Tool.process(Tool.java:509)
at org.antlr.Tool.main(Tool.java:98)
文法をコンパイルする方法はありますか?