[antlr-interest] Fwd: antlr-interest Digest, Vol 20, Issue 46

Scott Amort jsamort at gmail.com
Fri Jul 28 08:02:33 PDT 2006


Hi Anup,

Anup Shankar wrote:
> The invocation code is 
> --------------------------------
> istringstream input_string;
> istream *input=NULL;
> 
> input_string.str( "open server1.net");
> input = &input_string;
> ftpLexer lexer(*input);
> ftpParser parser(lexer);
> parser.cmd();
> 
> SwithStmt
> --------------
> void ftpParser::cmd() {
> 
> try { // for error handling
> switch ( LA(1)) {
> case LITERAL_open:
> {
> openCmd();
> break;
> }
> 
> }
> Here iam facing problems, where the comparision of the literal in this case "open" is not succeeding, in the Switch case stmt..

What is the actual error message?  How do you know the switch is not
succeeding?

Best,
Scott


More information about the antlr-interest mailing list