summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentLexer.in.l
diff options
context:
space:
mode:
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;
+}
+
%%