ENH: Remove some allocations
This commit is contained in:
parent
1a1e78be6f
commit
84f12f9298
|
@ -99,47 +99,53 @@ Modify cmCommandArgumentLexer.h:
|
||||||
|
|
||||||
"${" {
|
"${" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
|
yylvalp->str = yyextra->m_DCURLYVariable;
|
||||||
return cal_DCURLY;
|
return cal_DCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
"}" {
|
"}" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
|
yylvalp->str = yyextra->m_RCURLYVariable;
|
||||||
return cal_RCURLY;
|
return cal_RCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
"@" {
|
"@" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
|
yylvalp->str = yyextra->m_ATVariable;
|
||||||
return cal_AT;
|
return cal_AT;
|
||||||
}
|
}
|
||||||
|
|
||||||
[A-Za-z0-9_]+ {
|
[A-Za-z0-9_.]+ {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_NAME;
|
return cal_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
[^A-Za-z0-9_${}\\@]+|\\. {
|
[^\${}\\@]+|\\. {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_SYMBOL;
|
return cal_SYMBOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
"$" {
|
"$" {
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
|
yylvalp->str = yyextra->m_DOLLARVariable;
|
||||||
return cal_DOLLAR;
|
return cal_DOLLAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
"{" {
|
"{" {
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
|
yylvalp->str = yyextra->m_LCURLYVariable;
|
||||||
return cal_LCURLY;
|
return cal_LCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
.|\n {
|
"\\" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_ERROR;
|
yylvalp->str = yyextra->m_BSLASHVariable;
|
||||||
|
return cal_BSLASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
Loading…
Reference in New Issue