summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandArgumentLexer.in.l
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-12-17 13:24:35 (GMT)
committerBrad King <brad.king@kitware.com>2008-12-17 13:24:35 (GMT)
commit625ef26163451686a68b092d672e79c3e2b80e1e (patch)
treecaf361740e62c2e9e727d13f84bb7dc21be59545 /Source/cmCommandArgumentLexer.in.l
parent093cfc22f11ab014abe220e600e2d99c7a356851 (diff)
downloadCMake-625ef26163451686a68b092d672e79c3e2b80e1e.zip
CMake-625ef26163451686a68b092d672e79c3e2b80e1e.tar.gz
CMake-625ef26163451686a68b092d672e79c3e2b80e1e.tar.bz2
ENH: Allow most characters in ENV variable refs
The $ENV{VAR} syntax permits access to environment variables. This teaches CMake to recognize most characters in the VAR name since some environments may have variables with non-C-identifier characters.
Diffstat (limited to 'Source/cmCommandArgumentLexer.in.l')
-rw-r--r--Source/cmCommandArgumentLexer.in.l6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l
index 8425c00..f75dedb 100644
--- a/Source/cmCommandArgumentLexer.in.l
+++ b/Source/cmCommandArgumentLexer.in.l
@@ -62,6 +62,12 @@ Modify cmCommandArgumentLexer.h:
%%
+\$ENV\{ {
+ //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
+ yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
+ return cal_ENVCURLY;
+}
+
\$[A-Za-z0-9/_.+-]+\{ {
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);