Fix token recognition in macro parser

This commit is contained in:
Stas Degteff 2007-02-04 15:59:21 +00:00
parent 8ddffc9987
commit 5247d83d9e

View File

@ -50,7 +50,7 @@ static bool tokenxchg(std::string &input, std::string::iterator &pos,
size_t toklen = strlen(tok);
const char* inp_str_tok=it2str(input, pos);
if ( (strnieql(inp_str_tok, tok, toklen)) && isspace(inp_str_tok[toklen]) )
if ( (strnieql(inp_str_tok, tok, toklen)) && (isspace(inp_str_tok[toklen]) || ispunct(inp_str_tok[toklen])) )
{
std::string str = src;
std::string::iterator tokend = pos+toklen;