[Cmake-commits] [cmake-commits] hoffman committed cmCTest.cxx 1.334.2.1 1.334.2.2 cmCommandArgumentLexer.cxx 1.15 1.15.2.1 cmCommandArgumentLexer.h 1.5 1.5.2.1 cmCommandArgumentLexer.in.l 1.10 1.10.4.1 cmCommandArgumentParser.cxx 1.13 1.13.2.1 cmCommandArgumentParser.y 1.10 1.10.10.1 cmCommandArgumentParserHelper.cxx 1.20 1.20.4.1 cmCommandArgumentParserHelper.h 1.11 1.11.4.1 cmCommandArgumentParserTokens.h 1.5 1.5.2.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jan 1 12:49:43 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6219/Source
Modified Files:
Tag: CMake-2-6
cmCTest.cxx cmCommandArgumentLexer.cxx
cmCommandArgumentLexer.h cmCommandArgumentLexer.in.l
cmCommandArgumentParser.cxx cmCommandArgumentParser.y
cmCommandArgumentParserHelper.cxx
cmCommandArgumentParserHelper.h
cmCommandArgumentParserTokens.h
Log Message:
ENH: RC 7 merge fix missing stuff from RC 6 and fix change log
Index: cmCommandArgumentParserTokens.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParserTokens.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C 2 -d -r1.5 -r1.5.2.1
*** cmCommandArgumentParserTokens.h 27 Jul 2007 14:55:24 -0000 1.5
--- cmCommandArgumentParserTokens.h 1 Jan 2009 17:49:41 -0000 1.5.2.1
***************
*** 15,23 ****
=========================================================================*/
! /* A Bison parser, made by GNU Bison 2.1. */
! /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
! 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
! Inc.
This program is free software; you can redistribute it and/or modify
--- 15,24 ----
=========================================================================*/
! /* A Bison parser, made by GNU Bison 2.3. */
! /* Skeleton interface for Bison's Yacc-like parsers in C
!
! Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
! Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
***************
*** 36,43 ****
Boston, MA 02110-1301, USA. */
! /* As a special exception, when this file is copied by Bison into a
! Bison output file, you may use that output file without restriction.
! This special exception was added by the Free Software Foundation
! in version 1.24 of Bison. */
/* Tokens. */
--- 37,52 ----
Boston, MA 02110-1301, USA. */
! /* As a special exception, you may create a larger work that contains
! part or all of the Bison parser skeleton and distribute that work
! under terms of your choice, so long as that work isn't itself a
! parser generator using the skeleton or a modified version thereof
! as a parser skeleton. Alternatively, if you modify or redistribute
! the parser skeleton itself, you may (at your option) remove this
! special exception, which will cause the skeleton and the resulting
! Bison output files to be licensed under the GNU General Public
! License without this special exception.
!
! This special exception was added by the Free Software Foundation in
! version 2.2 of Bison. */
/* Tokens. */
***************
*** 47,80 ****
know about them. */
enum yytokentype {
! cal_NCURLY = 258,
! cal_DCURLY = 259,
! cal_DOLLAR = 260,
! cal_LCURLY = 261,
! cal_RCURLY = 262,
! cal_NAME = 263,
! cal_BSLASH = 264,
! cal_SYMBOL = 265,
! cal_AT = 266,
! cal_ERROR = 267,
! cal_ATNAME = 268
};
#endif
/* Tokens. */
! #define cal_NCURLY 258
! #define cal_DCURLY 259
! #define cal_DOLLAR 260
! #define cal_LCURLY 261
! #define cal_RCURLY 262
! #define cal_NAME 263
! #define cal_BSLASH 264
! #define cal_SYMBOL 265
! #define cal_AT 266
! #define cal_ERROR 267
! #define cal_ATNAME 268
! #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
--- 56,91 ----
know about them. */
enum yytokentype {
! cal_ENVCURLY = 258,
! cal_NCURLY = 259,
! cal_DCURLY = 260,
! cal_DOLLAR = 261,
! cal_LCURLY = 262,
! cal_RCURLY = 263,
! cal_NAME = 264,
! cal_BSLASH = 265,
! cal_SYMBOL = 266,
! cal_AT = 267,
! cal_ERROR = 268,
! cal_ATNAME = 269
};
#endif
/* Tokens. */
! #define cal_ENVCURLY 258
! #define cal_NCURLY 259
! #define cal_DCURLY 260
! #define cal_DOLLAR 261
! #define cal_LCURLY 262
! #define cal_RCURLY 263
! #define cal_NAME 264
! #define cal_BSLASH 265
! #define cal_SYMBOL 266
! #define cal_AT 267
! #define cal_ERROR 268
! #define cal_ATNAME 269
! #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
***************
*** 85,88 ****
-
-
--- 96,97 ----
Index: cmCommandArgumentParser.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParser.cxx,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C 2 -d -r1.13 -r1.13.2.1
*** cmCommandArgumentParser.cxx 27 Jul 2007 14:55:24 -0000 1.13
--- cmCommandArgumentParser.cxx 1 Jan 2009 17:49:41 -0000 1.13.2.1
***************
*** 10,23 ****
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
! This software is distributed WITHOUT ANY WARRANTY; without even
! the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
! /* A Bison parser, made by GNU Bison 2.1. */
! /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
[...2236 lines suppressed...]
#endif
! #if YYERROR_VERBOSE
! if (yymsg != yymsgbuf)
! YYSTACK_FREE (yymsg);
! #endif
! /* Make sure YYID is used. */
! return YYID (yyresult);
}
! #line 242 "cmCommandArgumentParser.y"
/* End of grammar */
***************
*** 1657,1658 ****
--- 1842,1845 ----
yyGetParser->Error(message);
}
+
+
Index: cmCommandArgumentParserHelper.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParserHelper.h,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -C 2 -d -r1.11 -r1.11.4.1
*** cmCommandArgumentParserHelper.h 6 Jun 2007 20:20:02 -0000 1.11
--- cmCommandArgumentParserHelper.h 1 Jan 2009 17:49:41 -0000 1.11.4.1
***************
*** 96,99 ****
--- 96,100 ----
void CleanupParser();
+ void SetError(std::string const& msg);
std::vector<char*> Variables;
Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.334.2.1
retrieving revision 1.334.2.2
diff -C 2 -d -r1.334.2.1 -r1.334.2.2
*** cmCTest.cxx 24 Oct 2008 15:18:45 -0000 1.334.2.1
--- cmCTest.cxx 1 Jan 2009 17:49:40 -0000 1.334.2.2
***************
*** 1140,1144 ****
}
}
! if ( *log )
{
*log << "* Run internal CTest" << std::endl;
--- 1140,1144 ----
}
}
! if ( log )
{
*log << "* Run internal CTest" << std::endl;
***************
*** 1147,1151 ****
*retVal = inst.Run(args, output);
! if ( *log )
{
*log << output->c_str();
--- 1147,1151 ----
*retVal = inst.Run(args, output);
! if ( log )
{
*log << output->c_str();
Index: cmCommandArgumentLexer.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentLexer.h,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C 2 -d -r1.5 -r1.5.2.1
*** cmCommandArgumentLexer.h 27 Jul 2007 14:55:24 -0000 1.5
--- cmCommandArgumentLexer.h 1 Jan 2009 17:49:41 -0000 1.5.2.1
***************
*** 26,30 ****
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
! #define YY_FLEX_SUBMINOR_VERSION 33
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
--- 26,30 ----
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
! #define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
***************
*** 48,52 ****
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
! #if __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
--- 48,52 ----
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
! #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
***************
*** 71,75 ****
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
- #endif /* ! C99 */
/* Limits of integral types. */
--- 71,74 ----
***************
*** 102,105 ****
--- 101,106 ----
#endif
+ #endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
***************
*** 111,119 ****
#else /* ! __cplusplus */
! #if __STDC__
#define YY_USE_CONST
! #endif /* __STDC__ */
#endif /* ! __cplusplus */
--- 112,121 ----
#else /* ! __cplusplus */
! /* C99 requires __STDC__ to be defined as 1. */
! #if defined (__STDC__)
#define YY_USE_CONST
! #endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
***************
*** 141,145 ****
#define yy_flex_debug yyg->yy_flex_debug_r
! int cmCommandArgument_yylex_init (yyscan_t* scanner);
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
--- 143,150 ----
#define yy_flex_debug yyg->yy_flex_debug_r
! /* Size of default input buffer. */
! #ifndef YY_BUF_SIZE
! #define YY_BUF_SIZE 16384
! #endif
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
***************
*** 148,159 ****
#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;
#endif
--- 153,159 ----
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
! typedef size_t yy_size_t;
#endif
***************
*** 210,231 ****
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_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 );
void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner );
--- 210,223 ----
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_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 );
void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner );
***************
*** 251,254 ****
--- 243,250 ----
#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. */
***************
*** 262,267 ****
YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner );
! void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,
! yyscan_t yyscanner );
FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner );
--- 258,262 ----
YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner );
! void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner );
***************
*** 326,331 ****
#endif /* !YY_DECL */
! /* yy_get_previous_state - get the state just before
! the EOB char was reached */
#undef YY_NEW_FILE
--- 321,325 ----
#endif /* !YY_DECL */
! /* yy_get_previous_state - get the state just before the EOB char was reached */
#undef YY_NEW_FILE
Index: cmCommandArgumentLexer.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentLexer.cxx,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -C 2 -d -r1.15 -r1.15.2.1
*** cmCommandArgumentLexer.cxx 24 Sep 2007 15:16:13 -0000 1.15
--- cmCommandArgumentLexer.cxx 1 Jan 2009 17:49:40 -0000 1.15.2.1
***************
*** 1,2 ****
--- 1,18 ----
+ /*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+ =========================================================================*/
#include "cmStandardIncludes.h"
***************
*** 12,16 ****
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
! #define YY_FLEX_SUBMINOR_VERSION 33
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
--- 28,32 ----
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
! #define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
***************
*** 34,38 ****
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
! #if __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
--- 50,54 ----
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
! #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
***************
*** 57,61 ****
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
- #endif /* ! C99 */
/* Limits of integral types. */
--- 73,76 ----
***************
*** 88,91 ****
--- 103,108 ----
#endif
+ #endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
***************
*** 97,105 ****
#else /* ! __cplusplus */
! #if __STDC__
#define YY_USE_CONST
! #endif /* __STDC__ */
#endif /* ! __cplusplus */
--- 114,123 ----
#else /* ! __cplusplus */
! /* C99 requires __STDC__ to be defined as 1. */
! #if defined (__STDC__)
#define YY_USE_CONST
! #endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
***************
*** 137,142 ****
#define yy_flex_debug yyg->yy_flex_debug_r
- int cmCommandArgument_yylex_init (yyscan_t* scanner);
-
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
--- 155,158 ----
***************
*** 196,207 ****
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
- /* 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;
#endif
--- 212,218 ----
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
! typedef size_t yy_size_t;
#endif
***************
*** 358,363 ****
yyg->yy_c_buf_p = yy_cp;
! #define YY_NUM_RULES 13
! #define YY_END_OF_BUFFER 14
/* This struct is not used in this scanner,
but its presence is necessary. */
--- 369,374 ----
yyg->yy_c_buf_p = yy_cp;
! #define YY_NUM_RULES 14
! #define YY_END_OF_BUFFER 15
/* This struct is not used in this scanner,
but its presence is necessary. */
***************
*** 367,375 ****
flex_int32_t yy_nxt;
};
! static yyconst flex_int16_t yy_accept[26] =
{ 0,
! 0, 0, 0, 0, 0, 0, 14, 8, 9, 6,
! 5, 13, 10, 4, 11, 12, 8, 0, 3, 6,
! 0, 7, 1, 2, 0
} ;
--- 378,386 ----
flex_int32_t yy_nxt;
};
! static yyconst flex_int16_t yy_accept[30] =
{ 0,
! 0, 0, 0, 0, 0, 0, 15, 9, 10, 7,
! 6, 14, 11, 5, 12, 13, 9, 0, 0, 4,
! 7, 0, 8, 2, 0, 3, 0, 1, 0
} ;
***************
*** 382,393 ****
1, 1, 4, 1, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
! 1, 1, 1, 5, 4, 4, 4, 4, 4, 4,
! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
! 1, 6, 1, 1, 4, 1, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
! 4, 4, 7, 1, 8, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
--- 393,404 ----
1, 1, 4, 1, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
! 1, 1, 1, 5, 4, 4, 4, 4, 6, 4,
! 4, 4, 4, 4, 4, 4, 4, 7, 4, 4,
! 4, 4, 4, 4, 4, 8, 4, 4, 4, 4,
! 1, 9, 1, 1, 4, 1, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
! 4, 4, 10, 1, 11, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
***************
*** 406,442 ****
} ;
! static yyconst flex_int32_t yy_meta[9] =
{ 0,
! 1, 2, 3, 1, 3, 3, 3, 3
} ;
! static yyconst flex_int16_t yy_base[28] =
{ 0,
! 0, 0, 18, 17, 16, 15, 20, 0, 5, 14,
! 7, 25, 25, 25, 0, 25, 0, 3, 25, 0,
! 9, 25, 25, 25, 25, 14, 16
} ;
! static yyconst flex_int16_t yy_def[28] =
{ 0,
! 25, 1, 1, 1, 1, 1, 25, 26, 25, 26,
! 25, 25, 25, 25, 27, 25, 26, 9, 25, 10,
! 25, 25, 25, 25, 0, 25, 25
} ;
! static yyconst flex_int16_t yy_nxt[34] =
{ 0,
! 8, 8, 9, 10, 11, 12, 13, 14, 18, 23,
! 21, 19, 21, 24, 17, 17, 22, 20, 22, 25,
! 16, 16, 15, 15, 7, 25, 25, 25, 25, 25,
! 25, 25, 25
} ;
! static yyconst flex_int16_t yy_chk[34] =
{ 0,
! 1, 1, 1, 1, 1, 1, 1, 1, 9, 18,
! 11, 9, 21, 21, 26, 26, 27, 10, 27, 7,
! 6, 5, 4, 3, 25, 25, 25, 25, 25, 25,
! 25, 25, 25
} ;
--- 417,460 ----
} ;
! static yyconst flex_int32_t yy_meta[12] =
{ 0,
! 1, 2, 3, 4, 3, 4, 4, 4, 3, 5,
! 3
} ;
! static yyconst flex_int16_t yy_base[35] =
{ 0,
! 0, 0, 31, 30, 29, 28, 36, 0, 6, 16,
! 0, 41, 41, 41, 0, 41, 0, 22, 22, 41,
! 18, 18, 41, 41, 7, 41, 4, 41, 41, 20,
! 21, 26, 9, 30
} ;
! static yyconst flex_int16_t yy_def[35] =
{ 0,
! 29, 1, 1, 1, 1, 1, 29, 30, 31, 32,
! 33, 29, 29, 29, 34, 29, 30, 31, 18, 29,
! 32, 33, 29, 29, 18, 29, 18, 29, 0, 29,
! 29, 29, 29, 29
} ;
! static yyconst flex_int16_t yy_nxt[53] =
{ 0,
! 8, 8, 9, 10, 11, 10, 10, 10, 12, 13,
! 14, 19, 22, 28, 27, 20, 17, 17, 17, 17,
! 17, 17, 26, 17, 18, 18, 21, 21, 25, 21,
! 23, 24, 23, 23, 23, 29, 16, 16, 15, 15,
! 7, 29, 29, 29, 29, 29, 29, 29, 29, 29,
! 29, 29
} ;
! static yyconst flex_int16_t yy_chk[53] =
{ 0,
! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
! 1, 9, 33, 27, 25, 9, 10, 10, 21, 21,
! 30, 30, 22, 30, 31, 31, 32, 32, 19, 32,
! 34, 18, 34, 34, 34, 7, 6, 5, 4, 3,
! 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
! 29, 29
} ;
***************
*** 475,478 ****
--- 493,498 ----
Modify cmCommandArgumentLexer.cxx:
+ - add #include "cmStandardIncludes.h" to top of file
+ - put header block at top of file
- remove TABs
- remove "yyscanner" argument from these methods:
***************
*** 480,483 ****
--- 500,504 ----
- remove all YY_BREAK lines occurring right after return statements
- change while ( 1 ) to for(;;)
+ - add "return 0;" to end of cmCommandArgument_yylex
Modify cmCommandArgumentLexer.h:
***************
*** 504,508 ****
! #line 505 "cmCommandArgumentLexer.cxx"
#define INITIAL 0
--- 525,529 ----
! #line 508 "cmCommandArgumentLexer.cxx"
#define INITIAL 0
***************
*** 558,561 ****
--- 579,586 ----
static int yy_init_globals (yyscan_t yyscanner );
+ 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. */
***************
*** 627,631 ****
* we now use fwrite().
*/
! #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif
--- 652,656 ----
* we now use fwrite().
*/
! #define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
***************
*** 721,728 ****
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! #line 62 "cmCommandArgumentLexer.in.l"
! #line 727 "cmCommandArgumentLexer.cxx"
if ( !yyg->yy_init )
--- 746,753 ----
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
! #line 64 "cmCommandArgumentLexer.in.l"
! #line 732 "cmCommandArgumentLexer.cxx"
if ( !yyg->yy_init )
***************
*** 777,781 ****
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 26 )
yy_c = yy_meta[(unsigned int) yy_c];
}
--- 802,806 ----
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 30 )
yy_c = yy_meta[(unsigned int) yy_c];
}
***************
*** 783,787 ****
++yy_cp;
}
! while ( yy_base[yy_current_state] != 25 );
yy_find_action:
--- 808,812 ----
++yy_cp;
}
! while ( yy_base[yy_current_state] != 41 );
yy_find_action:
***************
*** 809,813 ****
case 1:
YY_RULE_SETUP
! #line 64 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 834,846 ----
case 1:
YY_RULE_SETUP
! #line 66 "cmCommandArgumentLexer.in.l"
! {
! //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
! yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
! return cal_ENVCURLY;
! }
! case 2:
! YY_RULE_SETUP
! #line 72 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 815,821 ****
return cal_NCURLY;
}
! case 2:
YY_RULE_SETUP
! #line 70 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 848,854 ----
return cal_NCURLY;
}
! case 3:
YY_RULE_SETUP
! #line 78 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 823,829 ****
return cal_ATNAME;
}
! case 3:
YY_RULE_SETUP
! #line 76 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 856,862 ----
return cal_ATNAME;
}
! case 4:
YY_RULE_SETUP
! #line 84 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 832,838 ****
return cal_DCURLY;
}
! case 4:
YY_RULE_SETUP
! #line 83 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 865,871 ----
return cal_DCURLY;
}
! case 5:
YY_RULE_SETUP
! #line 91 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 841,847 ****
return cal_RCURLY;
}
! case 5:
YY_RULE_SETUP
! #line 90 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 874,880 ----
return cal_RCURLY;
}
! case 6:
YY_RULE_SETUP
! #line 98 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 850,856 ****
return cal_AT;
}
! case 6:
YY_RULE_SETUP
! #line 97 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 883,889 ----
return cal_AT;
}
! case 7:
YY_RULE_SETUP
! #line 105 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 858,864 ****
return cal_NAME;
}
! case 7:
YY_RULE_SETUP
! #line 103 "cmCommandArgumentLexer.in.l"
{
if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) )
--- 891,897 ----
return cal_NAME;
}
! case 8:
YY_RULE_SETUP
! #line 111 "cmCommandArgumentLexer.in.l"
{
if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) )
***************
*** 868,875 ****
return cal_SYMBOL;
}
! case 8:
! /* rule 8 can match eol */
YY_RULE_SETUP
! #line 111 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
--- 901,908 ----
return cal_SYMBOL;
}
! case 9:
! /* rule 9 can match eol */
YY_RULE_SETUP
! #line 119 "cmCommandArgumentLexer.in.l"
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
***************
*** 877,883 ****
return cal_SYMBOL;
}
! case 9:
YY_RULE_SETUP
! #line 117 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
--- 910,916 ----
return cal_SYMBOL;
}
! case 10:
YY_RULE_SETUP
! #line 125 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
***************
*** 885,891 ****
return cal_DOLLAR;
}
! case 10:
YY_RULE_SETUP
! #line 123 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
--- 918,924 ----
return cal_DOLLAR;
}
! case 11:
YY_RULE_SETUP
! #line 131 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
***************
*** 893,899 ****
return cal_LCURLY;
}
! case 11:
YY_RULE_SETUP
! #line 129 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
--- 926,932 ----
return cal_LCURLY;
}
! case 12:
YY_RULE_SETUP
! #line 137 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
***************
*** 901,907 ****
return cal_BSLASH;
}
! case 12:
YY_RULE_SETUP
! #line 135 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
--- 934,940 ----
return cal_BSLASH;
}
! case 13:
YY_RULE_SETUP
! #line 143 "cmCommandArgumentLexer.in.l"
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
***************
*** 909,918 ****
return cal_SYMBOL;
}
! case 13:
YY_RULE_SETUP
! #line 141 "cmCommandArgumentLexer.in.l"
ECHO;
YY_BREAK
! #line 929 "cmCommandArgumentLexer.cxx"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ESCAPES):
--- 942,951 ----
return cal_SYMBOL;
}
! case 14:
YY_RULE_SETUP
! #line 149 "cmCommandArgumentLexer.in.l"
ECHO;
YY_BREAK
! #line 943 "cmCommandArgumentLexer.cxx"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ESCAPES):
***************
*** 1173,1176 ****
--- 1206,1217 ----
ret_val = EOB_ACT_CONTINUE_SCAN;
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmCommandArgument_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
***************
*** 1203,1207 ****
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 26 )
yy_c = yy_meta[(unsigned int) yy_c];
}
--- 1244,1248 ----
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 30 )
yy_c = yy_meta[(unsigned int) yy_c];
}
***************
*** 1232,1240 ****
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 26 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
! yy_is_jam = (yy_current_state == 25);
return yy_is_jam ? 0 : yy_current_state;
--- 1273,1281 ----
{
yy_current_state = (int) yy_def[yy_current_state];
! if ( yy_current_state >= 30 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
! yy_is_jam = (yy_current_state == 29);
return yy_is_jam ? 0 : yy_current_state;
***************
*** 1563,1567 ****
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
!
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
--- 1604,1610 ----
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
! if ( ! yyg->yy_buffer_stack )
! YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
!
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
***************
*** 1581,1584 ****
--- 1624,1629 ----
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
/* zero only the new slots.*/
***************
*** 1875,1878 ****
--- 1920,1959 ----
}
+ /* cmCommandArgument_yylex_init_extra has the same functionality as cmCommandArgument_yylex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to cmCommandArgument_yyalloc in
+ * the yyextra field.
+ */
+
+ int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+ {
+ struct yyguts_t dummy_yyguts;
+
+ cmCommandArgument_yyset_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
+ }
+
static int yy_init_globals (yyscan_t yyscanner)
{
***************
*** 1986,1990 ****
#define YYTABLES_NAME "yytables"
! #line 141 "cmCommandArgumentLexer.in.l"
--- 2067,2071 ----
#define YYTABLES_NAME "yytables"
! #line 149 "cmCommandArgumentLexer.in.l"
Index: cmCommandArgumentParser.y
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParser.y,v
retrieving revision 1.10
retrieving revision 1.10.10.1
diff -C 2 -d -r1.10 -r1.10.10.1
*** cmCommandArgumentParser.y 4 Oct 2006 18:37:41 -0000 1.10
--- cmCommandArgumentParser.y 1 Jan 2009 17:49:41 -0000 1.10.10.1
***************
*** 26,29 ****
--- 26,30 ----
Modify cmCommandArgumentParser.cxx:
- remove TABs
+ - put header block at top of file
*/
***************
*** 63,69 ****
#define YYDEBUG 1
! //#define YYMAXDEPTH 100000
! //#define YYINITDEPTH 10000
!
/* Disable some warnings in the generated code. */
--- 64,70 ----
#define YYDEBUG 1
! /* Configure the parser to support large input. */
! #define YYMAXDEPTH 100000
! #define YYINITDEPTH 10000
/* Disable some warnings in the generated code. */
***************
*** 78,81 ****
--- 79,84 ----
# pragma warning (disable: 4065) /* Switch statement contains default but no
case. */
+ # pragma warning (disable: 4244) /* loss of precision */
+ # pragma warning (disable: 4702) /* unreachable code */
#endif
%}
***************
*** 92,95 ****
--- 95,99 ----
/*-------------------------------------------------------------------------*/
/* Tokens */
+ %token cal_ENVCURLY
%token cal_NCURLY
%token cal_DCURLY
***************
*** 180,183 ****
--- 184,193 ----
Variable:
+ cal_ENVCURLY EnvVarName cal_RCURLY
+ {
+ $<str>$ = yyGetParser->ExpandSpecialVariable($<str>1,$<str>2);
+ //std::cerr << __LINE__ << " here: [" << $<str>1 << "] [" << $<str>2 << "] [" << $<str>3 << "]" << std::endl;
+ }
+ |
cal_NCURLY MultipleIds cal_RCURLY
{
***************
*** 197,200 ****
--- 207,221 ----
}
+ EnvVarName:
+ MultipleIds
+ {
+ $<str>$ = $<str>1;
+ }
+ |
+ cal_SYMBOL EnvVarName
+ {
+ $<str>$ = $<str>1;
+ }
+
MultipleIds:
{
Index: cmCommandArgumentLexer.in.l
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentLexer.in.l,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C 2 -d -r1.10 -r1.10.4.1
*** cmCommandArgumentLexer.in.l 5 Jun 2007 13:19:27 -0000 1.10
--- cmCommandArgumentLexer.in.l 1 Jan 2009 17:49:41 -0000 1.10.4.1
***************
*** 26,29 ****
--- 26,30 ----
Modify cmCommandArgumentLexer.cxx:
- add #include "cmStandardIncludes.h" to top of file
+ - put header block at top of file
- remove TABs
- remove "yyscanner" argument from these methods:
***************
*** 31,34 ****
--- 32,36 ----
- remove all YY_BREAK lines occurring right after return statements
- change while ( 1 ) to for(;;)
+ - add "return 0;" to end of cmCommandArgument_yylex
Modify cmCommandArgumentLexer.h:
***************
*** 57,60 ****
--- 59,63 ----
%option reentrant
%option noyywrap
+ %option nounput
%pointer
%s ESCAPES
***************
*** 63,66 ****
--- 66,75 ----
%%
+ \$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;
Index: cmCommandArgumentParserHelper.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParserHelper.cxx,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -C 2 -d -r1.20 -r1.20.4.1
*** cmCommandArgumentParserHelper.cxx 6 Jun 2007 20:20:02 -0000 1.20
--- cmCommandArgumentParserHelper.cxx 1 Jan 2009 17:49:41 -0000 1.20.4.1
***************
*** 88,93 ****
return this->EmptyVariable;
}
! cmSystemTools::Error("Key ", key,
! " is not used yet. For now only $ENV{..} is allowed");
return 0;
}
--- 88,110 ----
return this->EmptyVariable;
}
! if ( strcmp(key, "CACHE") == 0 )
! {
! if(const char* c = this->Makefile->GetCacheManager()->GetCacheValue(var))
! {
! if(this->EscapeQuotes)
! {
! return this->AddString(cmSystemTools::EscapeQuotes(c).c_str());
! }
! else
! {
! return this->AddString(c);
! }
! }
! return this->EmptyVariable;
! }
! cmOStringStream e;
! e << "Syntax $" << key << "{} is not supported. "
! << "Only ${}, $ENV{}, and $CACHE{} are allowed.";
! this->SetError(e.str());
return 0;
}
***************
*** 217,224 ****
break;
default:
! char buffer[2];
! buffer[0] = symbol;
! buffer[1] = 0;
! cmSystemTools::Error("Invalid escape sequence \\", buffer);
return false;
}
--- 234,242 ----
break;
default:
! {
! cmOStringStream e;
! e << "Invalid escape sequence \\" << symbol;
! this->SetError(e.str());
! }
return false;
}
***************
*** 301,305 ****
cmOStringStream ostr;
ostr << str << " (" << pos << ")";
! this->ErrorString = ostr.str();
}
--- 319,323 ----
cmOStringStream ostr;
ostr << str << " (" << pos << ")";
! this->SetError(ostr.str());
}
***************
*** 319,320 ****
--- 337,346 ----
}
+ void cmCommandArgumentParserHelper::SetError(std::string const& msg)
+ {
+ // Keep only the first error.
+ if(this->ErrorString.empty())
+ {
+ this->ErrorString = msg;
+ }
+ }
More information about the Cmake-commits
mailing list