From adc1546e595db0136b7e306811ecfea48ed779a4 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 14 Sep 2021 14:14:29 +0200 Subject: [PATCH] Revert ".control and `B' parser, fix precedence of '-' versus '^'" This reverts commit b32ae9f79bf1e58b6e76edd1839ef81f258201f1. --- src/frontend/parse-bison.y | 2 +- src/spicelib/parser/inpptree-parser.y | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/parse-bison.y b/src/frontend/parse-bison.y index fc74616e1..0736466de 100644 --- a/src/frontend/parse-bison.y +++ b/src/frontend/parse-bison.y @@ -90,8 +90,8 @@ %right ',' %left '-' '+' %left '*' '/' '%' -%left NEG /* negation--unary minus */ %right '^' /* exponentiation */ +%left NEG /* negation--unary minus */ %left '[' ']' %initial-action /* initialize yylval */ diff --git a/src/spicelib/parser/inpptree-parser.y b/src/spicelib/parser/inpptree-parser.y index 1dde6a591..7247d5d4b 100644 --- a/src/spicelib/parser/inpptree-parser.y +++ b/src/spicelib/parser/inpptree-parser.y @@ -63,8 +63,8 @@ %left TOK_LE TOK_LT TOK_GE TOK_GT %left '-' '+' %left '*' '/' -%left NEG '!' /* negation--unary minus, and boolean not */ %left '^' /* exponentiation */ +%left NEG '!' /* negation--unary minus, and boolean not */ %initial-action /* initialize yylval */ {