[antlr-interest] problem of using default parameters in parser rules

xdjicn xdji at mail.ustc.edu.cn
Wed May 21 21:58:41 PDT 2003


Hi,
   I want to use default parameters in parser rules,for example:

parseRule1 [int iPos = 0]
:
.....

but the codes generated by ANTLR redefined the default parameter:

//in .hpp
void Parser::parserRule1 (int iPos = 0);      //valid

//in .cpp
void Parser::parserRule1 (int iPos = 0)    
{
  ...
}
//which is invalid
Does anybody know how to solve the problem?
Thanks a lot!


 

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




More information about the antlr-interest mailing list