From 2f04bf6498f1e75e349ba1f77be8fc23c3bb8140 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 (cherry picked from commit 21498ff9a434117516477b83c6c380b0c26a6037) --- 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 d2511be43..9b585dfc9 100644 --- a/parser/parser_lex.l +++ b/parser/parser_lex.l @@ -708,7 +708,7 @@ include/{WS} { } } -{ +{ \r?\n { DUMP_PREPROCESS; current_lineno++;