summaryrefslogtreecommitdiffstats
path: root/Source/LexerParser/cmGccDepfileLexer.in.l
diff options
context:
space:
mode:
Diffstat (limited to 'Source/LexerParser/cmGccDepfileLexer.in.l')
-rw-r--r--Source/LexerParser/cmGccDepfileLexer.in.l11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/LexerParser/cmGccDepfileLexer.in.l b/Source/LexerParser/cmGccDepfileLexer.in.l
index aa2351e..6336b5f 100644
--- a/Source/LexerParser/cmGccDepfileLexer.in.l
+++ b/Source/LexerParser/cmGccDepfileLexer.in.l
@@ -48,8 +48,15 @@ NEWLINE \r?\n
// A newline ends the current file name and the current rule.
yyextra->newEntry();
}
-:{WSPACE}+ {
- // A colon followed by space ends the rules and starts a new dependency.
+:{NEWLINE} {
+ // A colon ends the rules
+ yyextra->newDependency();
+ // A newline after colon terminates current rule.
+ yyextra->newEntry();
+ }
+:({WSPACE}+|\\{NEWLINE}) {
+ // A colon followed by space or line continuation ends the rules
+ // and starts a new dependency.
yyextra->newDependency();
}
{WSPACE}+ {