From e1e97a4822e1ba84d57e88cdbe75680117886f49 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 3 Oct 2021 15:51:42 +0200 Subject: [PATCH] Revert "Revert ".control and `B' parser, fix precedence of '-' versus '^'"" This reverts commit adc1546e595db0136b7e306811ecfea48ed779a4. --- 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 0736466de..fc74616e1 100644 --- a/src/frontend/parse-bison.y +++ b/src/frontend/parse-bison.y @@ -90,8 +90,8 @@ %right ',' %left '-' '+' %left '*' '/' '%' -%right '^' /* exponentiation */ %left NEG /* negation--unary minus */ +%right '^' /* exponentiation */ %left '[' ']' %initial-action /* initialize yylval */ diff --git a/src/spicelib/parser/inpptree-parser.y b/src/spicelib/parser/inpptree-parser.y index 7247d5d4b..1dde6a591 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 '^' /* exponentiation */ %left NEG '!' /* negation--unary minus, and boolean not */ +%left '^' /* exponentiation */ %initial-action /* initialize yylval */ {