diff options
author | Brad King <brad.king@kitware.com> | 2007-06-04 19:57:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-06-04 19:57:33 (GMT) |
commit | e40c51dddf7428d25543c0f05d6a6cc16454c97f (patch) | |
tree | eb2d44ad19e284a17c125d6047a01655187a9646 /Source/cmCommandArgumentLexer.h | |
parent | 64a8eb990ac12152a9c74f273978b926edec3724 (diff) | |
download | CMake-e40c51dddf7428d25543c0f05d6a6cc16454c97f.zip CMake-e40c51dddf7428d25543c0f05d6a6cc16454c97f.tar.gz CMake-e40c51dddf7428d25543c0f05d6a6cc16454c97f.tar.bz2 |
BUG: Fixed cmCommandArgumentLexer no-escape mode to not match backslash-escape sequences as lexical tokens at all. Needed to configure files with backslashes preceding an @VAR@ replacement. This fixes bug#5130.
Diffstat (limited to 'Source/cmCommandArgumentLexer.h')
-rw-r--r-- | Source/cmCommandArgumentLexer.h | 124 |
1 files changed, 54 insertions, 70 deletions
diff --git a/Source/cmCommandArgumentLexer.h b/Source/cmCommandArgumentLexer.h index 582bfce..c123187 100644 --- a/Source/cmCommandArgumentLexer.h +++ b/Source/cmCommandArgumentLexer.h @@ -2,10 +2,6 @@ #define cmCommandArgument_yyHEADER_H 1 #define cmCommandArgument_yyIN_HEADER 1 - - - - #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ @@ -35,7 +31,7 @@ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#if __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. @@ -96,7 +92,7 @@ typedef unsigned int flex_uint32_t; /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST -#else /* ! __cplusplus */ +#else /* ! __cplusplus */ #if __STDC__ @@ -148,73 +144,65 @@ typedef unsigned int yy_size_t; #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; - int yy_buffer_status; + int yy_buffer_status; - }; + }; #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 ); @@ -229,6 +217,8 @@ void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 +#define ESCAPES 1 +#define NOESCAPES 2 #endif @@ -247,8 +237,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 ); @@ -311,15 +300,13 @@ 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 #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive -#undef yytext_ptr #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS @@ -327,8 +314,5 @@ extern int cmCommandArgument_yylex (yyscan_t yyscanner); #undef YY_DECL #endif - - - #undef cmCommandArgument_yyIN_HEADER #endif /* cmCommandArgument_yyHEADER_H */ |