From 21498ff9a434117516477b83c6c380b0c26a6037 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Fri, 12 Jun 2020 02:12:41 -0700 Subject: [PATCH] parser: update rule to process newlines to include states that eat WS Newlines should generally be treated as whitespace. Expand the list of states using the newline rule to include almost all rules that eat WS. There are two exceptions assign and comment which have special handling of newlines. this fixes the failures not ok 71543 - ./simple_tests//vars/vars_simple_assignment_13.sd: quoted commas should not trigger an error not ok 71544 - ./simple_tests//vars/vars_simple_assignment_14.sd: quoted commas should not trigger an error found by introducing nodefault MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/569 Signed-off-by: John Johansen Acked-by: Steve Beattie --- parser/parser_lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/parser_lex.l b/parser/parser_lex.l index b2318f667..424f8e1cb 100644 --- a/parser/parser_lex.l +++ b/parser/parser_lex.l @@ -705,7 +705,7 @@ include/{WS} { } } -{ +{ \r?\n { DUMP_PREPROCESS; current_lineno++;