[antlr-interest] ANTLRworks and backtrack?

Matthew McDole simucal at gmail.com
Wed Feb 10 22:29:49 PST 2010


It took me a little bit to get the java.g to behave properly as well.

It isn't an issue with the grammar, but instead your settings.

Here is a detailed tutorial:
http://openjdk.java.net/projects/compiler-grammar/antlrworks/index.html

In any case, what you need to do is:

1) Select File->Preferences and then in ANTLR Options, add
-Xconversiontimeout 100000
2) When launching ANTLR works, launch it with more than the default
heap space by: java -Xmx512m -jar antlrworks-1.3.1.jar

Be sure to save, and close and then re-open after these 2 steps.

Now, when you go to generate code, it should do it without complaint.

-Matt


More information about the antlr-interest mailing list