diff options
author | Brad King <brad.king@kitware.com> | 2014-08-18 14:18:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-08-18 14:18:20 (GMT) |
commit | 02b3cba9df973026487ed9739ff6ca1825814ad1 (patch) | |
tree | 2f647cdd9a7a9c6be13fe4864bd8084c96a1a5a3 /Source/cmListFileLexer.in.l | |
parent | 55d6aa36a522f2dd7849ccd53d9e743a88f8c7a1 (diff) | |
download | CMake-02b3cba9df973026487ed9739ff6ca1825814ad1.zip CMake-02b3cba9df973026487ed9739ff6ca1825814ad1.tar.gz CMake-02b3cba9df973026487ed9739ff6ca1825814ad1.tar.bz2 |
cmListFileLexer: Fix lexing of single '[' character (#15092)
The lexer changes in commit v3.0.0-rc1~495^2 (Add Lua-style long
brackets and long comments to CMake language, 2013-08-06) accidentally
left out matching '[' as a single character in an unquoted argument.
Add a lexer rule to match it and extend the RunCMake.Syntax test to
cover this case.
Diffstat (limited to 'Source/cmListFileLexer.in.l')
-rw-r--r-- | Source/cmListFileLexer.in.l | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l index ed4bf6b..a520c72 100644 --- a/Source/cmListFileLexer.in.l +++ b/Source/cmListFileLexer.in.l @@ -212,6 +212,13 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t[=])*\" return 1; } +\[ { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + \" { lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; cmListFileLexerSetToken(lexer, "", 0); |