0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Please *think* when defining operator priorities.

(-: num_of_parser_conflicts -= 42 :-)
This commit is contained in:
Martin Mares 2000-03-04 21:19:10 +00:00
parent ee76a92a80
commit a58dad6238
2 changed files with 2 additions and 5 deletions

View File

@ -41,6 +41,7 @@ CF_DECLS
} }
%token END CLI_MARKER INVALID_TOKEN %token END CLI_MARKER INVALID_TOKEN
%token GEQ LEQ NEQ
%token <i> NUM ENUM %token <i> NUM ENUM
%token <i32> RTRID %token <i32> RTRID
%token <a> IPA %token <a> IPA
@ -50,7 +51,7 @@ CF_DECLS
%type <i> expr bool pxlen %type <i> expr bool pxlen
%type <time> datetime %type <time> datetime
%nonassoc '=' '<' '>' '~' '.' %nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
%left '+' '-' %left '+' '-'
%left '*' '/' '%' %left '*' '/' '%'
%left '!' %left '!'

View File

@ -39,8 +39,6 @@ CF_KEYWORDS(FUNCTION, PRINT, PRINTN, CONST, UNSET, RETURN,
%nonassoc THEN %nonassoc THEN
%nonassoc ELSE %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 <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 <f> filter filter_body where_filter
%type <i> type break_command pair %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:
'(' term ')' { $$ = $2; } '(' term ')' { $$ = $2; }
| term '+' term { $$ = f_new_inst(); $$->code = '+'; $$->a1.p = $1; $$->a2.p = $3; } | term '+' term { $$ = f_new_inst(); $$->code = '+'; $$->a1.p = $1; $$->a2.p = $3; }