Commit a58dad62 authored by Martin Mareš's avatar Martin Mareš
Browse files

Please *think* when defining operator priorities.

(-: num_of_parser_conflicts -= 42 :-)
parent ee76a92a
......@@ -41,6 +41,7 @@ CF_DECLS
}
%token END CLI_MARKER INVALID_TOKEN
%token GEQ LEQ NEQ
%token <i> NUM ENUM
%token <i32> RTRID
%token <a> IPA
......@@ -50,7 +51,7 @@ CF_DECLS
%type <i> expr bool pxlen
%type <time> datetime
%nonassoc '=' '<' '>' '~' '.'
%nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
%left '+' '-'
%left '*' '/' '%'
%left '!'
......
......@@ -39,8 +39,6 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, CONST, UNSET, RETURN,
%nonassoc THEN
%nonassoc ELSE
%token GEQ LEQ NEQ
%type <x> term block cmds cmd function_body constant print_one print_list var_list var_listn dynamic_attr function_call
%type <f> filter filter_body where_filter
%type <i> type break_command pair
......@@ -298,8 +296,6 @@ function_call:
}
;
/* NEQ, LEQ and GEQ are responsible for 42 shift/reduce conflicts */
term:
'(' term ')' { $$ = $2; }
| term '+' term { $$ = f_new_inst(); $$->code = '+'; $$->a1.p = $1; $$->a2.p = $3; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment