bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH for Dlang support 1/4] Changed rule that was interpreting +number


From: Adela Vais
Subject: [PATCH for Dlang support 1/4] Changed rule that was interpreting +number as -number
Date: Tue, 1 Sep 2020 21:54:34 +0300

---
 examples/d/calc.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/d/calc.y b/examples/d/calc.y
index b0dee929..15b4f7c7 100644
--- a/examples/d/calc.y
+++ b/examples/d/calc.y
@@ -61,7 +61,7 @@ exp:
 | exp "-" exp          { $$ = $1 - $3; }
 | exp "*" exp          { $$ = $1 * $3; }
 | exp "/" exp          { $$ = $1 / $3; }
-| "+" exp  %prec UNARY { $$ = -$2; }
+| "+" exp  %prec UNARY { $$ = $2; }
 | "-" exp  %prec UNARY { $$ = -$2; }
 | "(" exp ")"          { $$ = $2; }
 ;
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]