Brad King
ad3d5c59b3
cmListFileLexer: Fix leak on error before EOF
...
Teach cmListFileLexerDestroy to call cmListFileLexerSetToken with a NULL
token to free the token string buffer. Without this, if an error occurs
before the token cleanup happens when EOF is reached, then the token
string buffer may leak.
2013-09-17 10:27:08 -04:00
Brad King
c50f7ede20
cmListFileLexer: Modify flex output to avoid Borland warning
...
Remove the "yyscanner = NULL" assignment from the end of the
yylex_destroy function because Borland warns that the value is never
used.
2013-08-08 13:26:28 -04:00
Brad King
58e524165d
Warn about arguments not separated by whitespace
...
Teach the lexer to return tokens for whitespace. Teach the parser to
tolerate the space tokens where whitespace is allowed. Also teach the
parser to diagnose and warn about cases of quoted arguments followed
immediately by another argument. This was accidentally allowed
previously, so we only warn.
Update the RunCMake.Syntax test case StringNoSpace expected stderr to
include the warnings.
2013-08-08 13:26:27 -04:00
Brad King
28685ade7a
cmListFileLexer: Split normal and legacy unquoted arguments
...
Match legacy arguments separately. Add macros to simplify and clarify
matching rules.
2013-08-08 13:26:26 -04:00
Brad King
1eafa3edaf
cmListFileLexer: Fix line number after backslash in string
...
If a line inside a string ends in a backslash count the following
newline character as a line increment. Add a test covering this case to
verify that subsequent line numbers are correct.
2013-08-08 13:26:26 -04:00
Sean McBride
1399825cf9
Remove some uses of obsolete 'register' storage specifier
...
Remove the keyword from all Source/* files outside of KWSys.
2013-06-28 16:37:49 -04:00
Kitware Robot
7bbaa4283d
Remove trailing whitespace from most CMake and C/C++ code
...
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace. Wipe out all remnants of trailing whitespace
everywhere except third-party code.
Run the following shell code:
git ls-files -z -- \
bootstrap doxygen.config '*.readme' \
'*.c' '*.cmake' '*.cpp' '*.cxx' \
'*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
'*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Brad King
96afb12087
Convert CMake to OSI-approved BSD License
...
This converts the CMake license to a pure 3-clause OSI-approved BSD
License. We drop the previous license clause requiring modified
versions to be plainly marked. We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Bill Hoffman
7491f52992
ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail
2009-06-25 16:41:57 -04:00
Brad King
3d6100d7c6
COMP: Fix warnings produced by the change in include order from the re-organization of lexer code.
2006-08-09 09:45:04 -04:00
Brad King
a3836e09a2
COMP: Moved duplicate flex-generated lexer warning suppression and cross-platform support code to a single cmStandardLexer.h included by all lexer sources. Added fix for macro redefinitions on Borland 5.8 compiler.
2006-08-08 14:00:28 -04:00
Brad King
ab61137eb1
COMP: Fix and/or disable warnings for Borland 5.6 build.
2006-08-01 11:38:42 -04:00
Brad King
dbe997e63b
BUG: When an unquoted argument contains a pair of matching double quotes spaces and tabs should be allowed in-between. This allows arguments like -DFOO='"bar zot"' to work.
2005-09-19 17:20:48 -04:00
Brad King
bccf040b00
BUG: Unquoted arguments can have quotes that are not at the beginning, but only an even number of them.
2005-08-01 16:49:37 -04:00
Brad King
28bb8e04c0
COMP: Defining YY_NO_INPUT to remove compilation of unused yyinput function. It was producing a warning about unreachable code.
2005-03-15 08:14:35 -05:00
Brad King
89a8261f68
ENH: Mangled lexer symbols to begin in cmListFileLexer_yy instead of just yy to avoid conflict with other lexers that may be added.
2005-01-19 12:06:24 -05:00
Brad King
bc26a216b4
BUG#1179: Fix for syntax in unquoted arguments.
2004-09-20 08:51:12 -04:00
Brad King
486a26d3db
BUG#1049: Added error message when file ends in an unterminated string.
2004-08-31 18:39:42 -04:00
Brad King
2716ac3966
BUG: Fixed parsing of unquoted arguments to allow double-quotes within the argument.
2004-06-18 10:51:10 -04:00
Brad King
5473791b4b
ENH: Added cmListFileLexer_SetString method to allow a string to be parsed as input.
2004-04-21 16:23:58 -04:00
Brad King
cf42225c0b
ERR: Removed YY_BREAK statements after return statements because they are unreachable.
2003-12-09 09:16:40 -05:00
Brad King
c85e16450d
ERR: Added missing static keyword to cmListFileLexerSetToken and cmListFileLexerAppend definitions.
2003-12-09 09:11:35 -05:00
Brad King
6df489c471
ERR: We must define YY_NO_UNISTD_H to build on windows.
2003-12-08 13:40:26 -05:00
Brad King
00ae7ea261
ENH: Using lex-based tokenizer and a simple recursive-descent parser in place of the old hand-coded parser for CMake listfiles.
2003-12-08 13:36:59 -05:00