- Plain arguments may only be upgraded to search patterns if they cannot be
  split into multiple lexemes, and do not canonicalize to an attribute name.
This commit is contained in:
Paul Beckingham 2014-06-25 22:04:56 -04:00
parent 8bad1591dc
commit e688176310

View file

@ -1439,8 +1439,11 @@ void Parser::findPlainArgs ()
std::string raw = (*i)->attribute ("raw"); std::string raw = (*i)->attribute ("raw");
std::vector <std::string> lexed; std::vector <std::string> lexed;
Lexer::token_split (lexed, raw); Lexer::token_split (lexed, raw);
if (lexed.size () == 1) if (lexed.size () == 1)
{
// Furthermore, the word must not canonicalize to an attribute name.
std::string canonical;
if (! canonicalize (canonical, "attribute", raw))
{ {
// This tag also prevents further expanѕion. // This tag also prevents further expanѕion.
(*i)->tag ("PATTERN"); (*i)->tag ("PATTERN");
@ -1459,6 +1462,7 @@ void Parser::findPlainArgs ()
} }
} }
} }
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Parser::findMissingOperators () void Parser::findMissingOperators ()