Fix shift/reduce conflict in the sec lang grammar.

This commit is contained in:
Felipe Zimmerle 2015-10-01 17:36:18 -03:00
parent 941b9e75c4
commit 03eabd9c12

View File

@ -144,7 +144,6 @@ using ModSecurity::Variables::Variable;
PIPE
;
%left SPACE CONFIG_VALUE_RELEVANT_ONLY CONFIG_VALUE_ON CONFIG_VALUE_OFF
%token <std::string> QUOTATION_MARK
%token <std::string> DIRECTIVE
%token <std::string> CONFIG_DIR_REQ_BODY_LIMIT
@ -250,19 +249,20 @@ using ModSecurity::Variables::Variable;
%type <Action *> act
%type <std::vector<Action *> *> 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