diff options
author | Brad King <brad.king@kitware.com> | 2008-12-17 13:24:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-12-17 13:24:35 (GMT) |
commit | 625ef26163451686a68b092d672e79c3e2b80e1e (patch) | |
tree | caf361740e62c2e9e727d13f84bb7dc21be59545 /Source/cmCommandArgumentLexer.h | |
parent | 093cfc22f11ab014abe220e600e2d99c7a356851 (diff) | |
download | CMake-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.h')
-rw-r--r-- | Source/cmCommandArgumentLexer.h | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/Source/cmCommandArgumentLexer.h b/Source/cmCommandArgumentLexer.h index c7e6054..fd24abf 100644 --- a/Source/cmCommandArgumentLexer.h +++ b/Source/cmCommandArgumentLexer.h @@ -25,7 +25,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -47,7 +47,7 @@ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ -#if __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. @@ -70,7 +70,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -101,6 +100,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -110,11 +111,12 @@ typedef unsigned int flex_uint32_t; #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST @@ -140,21 +142,19 @@ typedef void* yyscan_t; #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r -int cmCommandArgument_yylex_init (yyscan_t* scanner); +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; +typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE @@ -209,24 +209,16 @@ struct yy_buffer_state #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , - yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size , - yyscan_t yyscanner ); -void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , - yyscan_t yyscanner ); -void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , - yyscan_t yyscanner ); -void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , - yyscan_t yyscanner ); +void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size , - yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str , - yyscan_t yyscanner ); -YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len , - yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -250,6 +242,10 @@ void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif +int cmCommandArgument_yylex_init (yyscan_t* scanner); + +int cmCommandArgument_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ @@ -261,8 +257,7 @@ void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); -void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , - yyscan_t yyscanner ); +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); @@ -325,8 +320,7 @@ extern int cmCommandArgument_yylex (yyscan_t yyscanner); #define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) #endif /* !YY_DECL */ -/* yy_get_previous_state - get the state just before - the EOB char was reached */ +/* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER |