[antlr-interest] empty file and lexer tokens

Sriram Durbha cintyram at yahoo.com
Fri Oct 25 08:30:00 PDT 2002


hi,
even if i give my grammar as follows the program is crashing on empty
file , please advise

expr : ( slist exception catch [antlr::CharStreamException& re]
                    {
                      std::cout << "Exception in expr" <<  std::endl;
		       reportError(re.toString()); 
		    }
		    catch [antlr::TokenStreamException& re]
		    {
		     std::cout << "Exception in expr" <<  std::endl;
		     reportError(re.toString()); 
		    }
           ) EOF! ;
slist :( stmnt SEMI! )*;
stmnt : assignExpr ;


note : even for any other exceptin class in the given hierarchy , it
crashes..
==============================================
hi what is the use of the other three tokens?

const char* ExprParser::_tokenNames[] = {
	"<0>",
	"EOF",
	"<2>",
	"NULL_TREE_LOOKAHEAD",
           ...

thanks 
ram
	


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list