diff options
author | Brad King <brad.king@kitware.com> | 2013-10-14 19:24:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-17 13:06:59 (GMT) |
commit | 56457837e28de29d4f94b0cc9c47ef314d8f05e1 (patch) | |
tree | 89c9eb6855fab9b6b6169b8086c523a731367f38 /Source/cmListFileLexer.in.l | |
parent | 8f2b0c330706fe479fb0804b3526bf28503cd52a (diff) | |
download | CMake-56457837e28de29d4f94b0cc9c47ef314d8f05e1.zip CMake-56457837e28de29d4f94b0cc9c47ef314d8f05e1.tar.gz CMake-56457837e28de29d4f94b0cc9c47ef314d8f05e1.tar.bz2 |
cmListFileLexer: Allow command names with one letter (#14181)
Teach the lexer to treat a single letter as an identifier instead of an
unquoted argument. Outside of a command invocation, the parser treats
an identifier as a command name and an unquoted argument as an error.
Inside of a command invocation, the parser treats an identifier as an
unquoted argument. Therefore this change to the lexer will make what
was previously an error case work with no other behavioral change.
Diffstat (limited to 'Source/cmListFileLexer.in.l')
-rw-r--r-- | Source/cmListFileLexer.in.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l index bd3c1eb..89f2917 100644 --- a/Source/cmListFileLexer.in.l +++ b/Source/cmListFileLexer.in.l @@ -107,7 +107,7 @@ LEGACY {MAKEVAR}|{UNQUOTED}|\"({MAKEVAR}|{UNQUOTED}|[ \t])*\" return 1; } -[A-Za-z_][A-Za-z0-9_]+ { +[A-Za-z_][A-Za-z0-9_]* { lexer->token.type = cmListFileLexer_Token_Identifier; cmListFileLexerSetToken(lexer, yytext, yyleng); lexer->column += yyleng; |