shithub: hammer

Download patch

ref: 1ed1ea5a5c5fe9701feb49382ca0912e044e2144
parent: 7eeec043baf3b51f0ddcf408410a689832bb89ed
author: Jacob Moody <moody@posixcafe.org>
date: Fri Nov 17 19:33:53 EST 2023

<= >=

--- a/n.y
+++ b/n.y
@@ -48,7 +48,7 @@
 	long ival;
 }
 
-%token FUNC DEF IF FOR MOD USE OR AND NOTEQ EQ SHIFTL SHIFTR STRUCT ELSE ARROWR ARROWL
+%token FUNC DEF IF FOR MOD USE OR AND NOTEQ EQ SHIFTL SHIFTR STRUCT ELSE ARROWR ARROWL GTEQ LTEQ
 %token TYPE NAME NUM
 
 %token	<sval>	NAME TYPE;
@@ -122,6 +122,8 @@
 |	compexpr '<' shifexpr
 |	compexpr NOTEQ shifexpr
 |	compexpr EQ shifexpr
+|	compexpr LTEQ shifexpr
+|	compexpr GTEQ shifexpr
 |	shifexpr
 
 
@@ -176,6 +178,8 @@
 	"||", OR,
 	"!=", NOTEQ,
 	"==", EQ,
+	"<=", LTEQ,
+	">=", GTEQ,
 	"<<", SHIFTR,
 	">>", SHIFTL,
 	"struct", STRUCT,