Skip to content

Commit

Permalink
eparse.y: drop overspecified associativity for assignment
Browse files Browse the repository at this point in the history
Parser infelicity is detected by bison --warnings as:

    ./eparse.y:51.1-6: warning: useless precedence and associativity for '=' [-Wprecedence]
       51 | %right  <str> '='
          | ^~~~~~
    ./eparse.y:62.1-5: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
       62 | %left   <str> UNARY
          | ^~~~~
    ./eparse.y:51.1-6: warning: useless precedence and associativity for '=' [-Wprecedence]
       51 | %right  <str> '='
          | ^~~~~~
    ./eparse.y:62.1-5: warning: useless associativity for UNARY, use %precedence [-Wprecedence]
       62 | %left   <str> UNARY
          | ^~~~~

Benerated parser did not change the output.
  • Loading branch information
trofi committed Sep 1, 2022
1 parent 4cf4c6e commit 89c9422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/eparse.y
Expand Up @@ -48,7 +48,7 @@ static void yyerror(char *);
}

%left <str> ','
%right <str> '='
%token <str> '='
%left <str> LOR
%left <str> LAND
%left <str> '|'
Expand All @@ -59,7 +59,7 @@ static void yyerror(char *);
%left <str> SHL SHR
%left <str> '+' '-'
%left <str> '*' '/' '%'
%left <str> UNARY
%precedence <str> UNARY

%token <val> ISYM
%token <val> SYM
Expand Down

0 comments on commit 89c9422

Please sign in to comment.