[antlr-interest] Re: CLI with ANTLR - best practice
thierryj8
thierryj8 at yahoo.com
Fri Apr 9 11:24:38 PDT 2004
It seems easy to catch the exceptions in the parser
ls
: ls
exception
catch [RecognitionException ex] {
System.out.println("command");
}
;
but it's not obvious how to catch the default exception
throw new NoViableAltForCharException((char)LA(1), getFilename(),
getLine(), getColumn());
in the lexer.
Possibly the exceptions should be handled in the parser, and the lexer
exceptions should be turned off?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list