diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-13 14:00:15 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-13 14:00:15 (GMT) |
commit | 84f12f9298475c810e25d909d70f3cabdf691e39 (patch) | |
tree | 2d120eaed896e60e17329778f0dc48b14c75840e /Source | |
parent | 1a1e78be6f34655eafc0ef4dfc222d260c3b8733 (diff) | |
download | CMake-84f12f9298475c810e25d909d70f3cabdf691e39.zip CMake-84f12f9298475c810e25d909d70f3cabdf691e39.tar.gz CMake-84f12f9298475c810e25d909d70f3cabdf691e39.tar.bz2 |
ENH: Remove some allocations
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCommandArgumentLexer.in.l | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l index fcbfcd8..d314f00 100644 --- a/Source/cmCommandArgumentLexer.in.l +++ b/Source/cmCommandArgumentLexer.in.l @@ -99,47 +99,53 @@ Modify cmCommandArgumentLexer.h: "${" { //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; } "}" { //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; } "@" { //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; } -[A-Za-z0-9_]+ { +[A-Za-z0-9_.]+ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); return cal_NAME; } -[^A-Za-z0-9_${}\\@]+|\\. { +[^\${}\\@]+|\\. { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); return cal_SYMBOL; } "$" { - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->m_DOLLARVariable; return cal_DOLLAR; } "{" { - yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->m_LCURLYVariable; return cal_LCURLY; } -.|\n { - //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; - return cal_ERROR; +"\\" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->m_BSLASHVariable; + return cal_BSLASH; } %% |