mirror of
https://github.com/reactos/CMake.git
synced 2025-02-23 05:22:26 +00:00
BUG: Character + should be valid in a variable name.
This commit is contained in:
parent
cba6306b86
commit
97c97730a6
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@
|
|||||||
#define FLEX_SCANNER
|
#define FLEX_SCANNER
|
||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 5
|
||||||
#define YY_FLEX_SUBMINOR_VERSION 31
|
#define YY_FLEX_SUBMINOR_VERSION 33
|
||||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||||
#define FLEX_BETA
|
#define FLEX_BETA
|
||||||
#endif
|
#endif
|
||||||
@ -36,6 +36,14 @@
|
|||||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||||
|
|
||||||
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||||
|
|
||||||
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||||
|
* if you want the limit (max/min) macros for int types.
|
||||||
|
*/
|
||||||
|
#ifndef __STDC_LIMIT_MACROS
|
||||||
|
#define __STDC_LIMIT_MACROS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
typedef int8_t flex_int8_t;
|
typedef int8_t flex_int8_t;
|
||||||
typedef uint8_t flex_uint8_t;
|
typedef uint8_t flex_uint8_t;
|
||||||
|
@ -59,13 +59,13 @@ Modify cmCommandArgumentLexer.h:
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
\$[A-Za-z0-9/_.-]+\{ {
|
\$[A-Za-z0-9/_.+-]+\{ {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
||||||
return cal_NCURLY;
|
return cal_NCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@[A-Za-z0-9/_.-]+@ {
|
@[A-Za-z0-9/_.+-]+@ {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
||||||
return cal_ATNAME;
|
return cal_ATNAME;
|
||||||
@ -74,25 +74,25 @@ Modify cmCommandArgumentLexer.h:
|
|||||||
"${" {
|
"${" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_DCURLYVariable;
|
yylvalp->str = yyextra->DCURLYVariable;
|
||||||
return cal_DCURLY;
|
return cal_DCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
"}" {
|
"}" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_RCURLYVariable;
|
yylvalp->str = yyextra->RCURLYVariable;
|
||||||
return cal_RCURLY;
|
return cal_RCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
"@" {
|
"@" {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_ATVariable;
|
yylvalp->str = yyextra->ATVariable;
|
||||||
return cal_AT;
|
return cal_AT;
|
||||||
}
|
}
|
||||||
|
|
||||||
[A-Za-z0-9/_.-]+ {
|
[A-Za-z0-9/_.+-]+ {
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_NAME;
|
return cal_NAME;
|
||||||
@ -114,19 +114,19 @@ Modify cmCommandArgumentLexer.h:
|
|||||||
|
|
||||||
"$" {
|
"$" {
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_DOLLARVariable;
|
yylvalp->str = yyextra->DOLLARVariable;
|
||||||
return cal_DOLLAR;
|
return cal_DOLLAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
"{" {
|
"{" {
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_LCURLYVariable;
|
yylvalp->str = yyextra->LCURLYVariable;
|
||||||
return cal_LCURLY;
|
return cal_LCURLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
"\\" {
|
"\\" {
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->m_BSLASHVariable;
|
yylvalp->str = yyextra->BSLASHVariable;
|
||||||
return cal_BSLASH;
|
return cal_BSLASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,8 @@ ENDIF(NOT FILE_IS_NEWER "${file}" "${CMAKE_CURRENT_SOURCE_DIR}/InputFile.h.in")
|
|||||||
# Test configuration of the string
|
# Test configuration of the string
|
||||||
SET(TEST_DEFINED 123)
|
SET(TEST_DEFINED 123)
|
||||||
SET(TEST_NOT_DEFINED)
|
SET(TEST_NOT_DEFINED)
|
||||||
STRING(CONFIGURE "${infile}" infile @ONLY)
|
STRING(CONFIGURE "${infile}" infile+-/out @ONLY)
|
||||||
|
SET(infile "${infile+-/out}")
|
||||||
|
|
||||||
# Write include file to a file
|
# Write include file to a file
|
||||||
STRING(REGEX REPLACE "includefile" "${file}" outfile "${infile}")
|
STRING(REGEX REPLACE "includefile" "${file}" outfile "${infile}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user