diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-17 19:50:08 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-17 19:50:08 (GMT) |
commit | 1bbccc5bef5c195e9fae2d3d5ab350b386fe45cc (patch) | |
tree | 667a2ac3cb8fa341d4960ea0065e33775567ecaf /Source/cmCommandArgumentLexer.in.l | |
parent | b7a2d11f2d6dd27719282f1fcd2f69bef3513cac (diff) | |
download | CMake-1bbccc5bef5c195e9fae2d3d5ab350b386fe45cc.zip CMake-1bbccc5bef5c195e9fae2d3d5ab350b386fe45cc.tar.gz CMake-1bbccc5bef5c195e9fae2d3d5ab350b386fe45cc.tar.bz2 |
ENH: Improve handling of escaped characters
Diffstat (limited to 'Source/cmCommandArgumentLexer.in.l')
-rw-r--r-- | Source/cmCommandArgumentLexer.in.l | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l index e2fdb72..80afa03 100644 --- a/Source/cmCommandArgumentLexer.in.l +++ b/Source/cmCommandArgumentLexer.in.l @@ -124,7 +124,15 @@ Modify cmCommandArgumentLexer.h: return cal_NAME; } -[^\${}\\@]+|\\. { +\\. { + if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) + { + return cal_ERROR; + } + return cal_SYMBOL; +} + +[^\${}\\@]+ { //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); return cal_SYMBOL; |