summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentLexer.in.l
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-08 18:18:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-06-08 18:18:31 (GMT)
commitbbf1c3a0e87c4358b65d41393455fc393d8e16e0 (patch)
treea2bd3776a2947d1caac17f2da80aa29844715077 /Source/cmCommandArgumentLexer.in.l
parent859b51751811f1b4c160793010cf3ad20c00140d (diff)
downloadCMake-bbf1c3a0e87c4358b65d41393455fc393d8e16e0.zip
CMake-bbf1c3a0e87c4358b65d41393455fc393d8e16e0.tar.gz
CMake-bbf1c3a0e87c4358b65d41393455fc393d8e16e0.tar.bz2
ENH: Handle more cases
Diffstat (limited to 'Source/cmCommandArgumentLexer.in.l')
-rw-r--r--Source/cmCommandArgumentLexer.in.l34
1 files changed, 32 insertions, 2 deletions
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l
index 0a071fc..fcbfcd8 100644
--- a/Source/cmCommandArgumentLexer.in.l
+++ b/Source/cmCommandArgumentLexer.in.l
@@ -85,31 +85,61 @@ Modify cmCommandArgumentLexer.h:
%%
-"$[A-Za-z0-9_]+{" {
+\$[A-Za-z0-9_]+\{ {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
return cal_NCURLY;
}
+@[A-Za-z0-9_]+@ {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
+ return cal_ATNAME;
+}
+
"${" {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
return cal_DCURLY;
}
"}" {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
return cal_RCURLY;
}
"@" {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
return cal_AT;
}
[A-Za-z0-9_]+ {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
return cal_NAME;
}
-([^A-Za-z0-9_$}\\@]+|\.) {
+[^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));
+ return cal_DOLLAR;
+}
+
+"{" {
+ yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
+ return cal_LCURLY;
+}
+
+.|\n {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ return cal_ERROR;
+}
+
%%