Hello. My micro patch for allow $(( )) as 0
--- arith_yacc.orig.c 2020-12-23 11:58:12.000000000 +0400
+++ arith_yacc.c 2021-01-29 23:47:01.854997852 +0400
@@ -292,10 +292,17 @@
intmax_t arith(const char *s)
{
intmax_t result;
+ int l0;
arith_buf = arith_startbuf = s;
- result = assignment(yylex(), 0);
+ l0 = yylex();
+ if (l0 == 0) {
+ /* $(( )) */
+ yylval.val = 0;
+ l0 = ARITH_NUM;
+ }
+ result = assignment(l0, 0);
if (last_token)
yyerror("expecting EOF");
--w
vodz
