From 03eabd9c1219cd52f8556a362fd9ce65577077bf Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Thu, 1 Oct 2015 17:36:18 -0300 Subject: [PATCH] Fix shift/reduce conflict in the sec lang grammar. --- src/parser/seclang-parser.yy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index ca3c7c97..176584a5 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -144,7 +144,6 @@ using ModSecurity::Variables::Variable; PIPE ; -%left SPACE CONFIG_VALUE_RELEVANT_ONLY CONFIG_VALUE_ON CONFIG_VALUE_OFF %token QUOTATION_MARK %token DIRECTIVE %token CONFIG_DIR_REQ_BODY_LIMIT @@ -250,19 +249,20 @@ using ModSecurity::Variables::Variable; %type act %type *> actings + %printer { yyoutput << $$; } <*>; + %% %start input; input: - %empty - | input line + input line + | line | SPACE ; line: expression - | SPACE expression | expression SPACE ; @@ -352,6 +352,7 @@ actings: } ; + expression: audit_log | DIRECTIVE SPACE variables SPACE OPERATOR SPACE actings