summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentLexer.in.l
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-17 19:50:08 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-17 19:50:08 (GMT)
commit1bbccc5bef5c195e9fae2d3d5ab350b386fe45cc (patch)
tree667a2ac3cb8fa341d4960ea0065e33775567ecaf /Source/cmCommandArgumentLexer.in.l
parentb7a2d11f2d6dd27719282f1fcd2f69bef3513cac (diff)
downloadCMake-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.l10
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;