Accepts `$' as valid character when recognizing identifiers.

Added support for yet another gcc extension that is using in OSX 10.6 system headers.
This commit is contained in:
Roberto Raggi
2009-11-04 13:45:49 +01:00
parent 093a309dab
commit 4a87d875f0

View File

@@ -603,7 +603,7 @@ void Lexer::scan_helper(Token *tok)
do {
yyinp();
if (! (isalnum(_yychar) || _yychar == '_'))
if (! (isalnum(_yychar) || _yychar == '_' || _yychar == '$'))
break;
} while (_yychar);
@@ -674,9 +674,9 @@ void Lexer::scan_helper(Token *tok)
if (control())
tok->string = control()->findOrInsertStringLiteral(yytext, yylen);
} else if (std::isalpha(ch) || ch == '_') {
} else if (std::isalpha(ch) || ch == '_' || ch == '$') {
const char *yytext = _currentChar - 1;
while (std::isalnum(_yychar) || _yychar == '_')
while (std::isalnum(_yychar) || _yychar == '_' || _yychar == '$')
yyinp();
int yylen = _currentChar - yytext;
if (f._scanKeywords)