[antlr-interest] Invalid option: backtrack

Laura Adam ladam at vbi.vt.edu
Tue Jul 22 10:57:44 PDT 2008


Hello,

I'd like to make a try with the backtrack option.I want to turn on the backtrack option at the grammar level.
I made a lexer.g file like that :


class lexer extends Lexer;
options {
    k=100;
    backtrack = true;
    } 
 rules.............



I had an "Invalid option: backtrack".
(Moreover, if I try to change the first line into a "grammar T;", trying to do exactly what I read in the book, that doesn't work, I don't understand why)

I reinstall the latest version of Antlr to be sure that I am using one that contains that option.
I also add to the classpath the .jar file such as that :

export CLASSPATH="$CLASSPATH:/home/ladam.local/antlr-3.1b2/lib/antlr-3.1b2.jar:\
/home/ladam.local/antlr-3.1b2/lib/stringtemplate-3.2.jar:\
/home/ladam.local/antlr-3.1b2/lib/antlr-2.7.7.jar:\
/home/ladam.local/antlr-3.1b2/lib/antlr-runtime-3.1b2.jar:\
/home/ladam.local/antlr-3.1b2/lib/gunit-1.0.2.jar"


Even if I want to use the backtrack option at a rule level, I can't. Backtrack doesn't even appear in emacs ANTLR menu.

What can I do?

Laura Adam


More information about the antlr-interest mailing list