ref: d79699d880ff79a6f538731498f75f629f3051e8
parent: 2875475106b50c1b537de512ce7605169820cc53
author: Ori Bernstein <[email protected]>
date: Thu Jun 28 17:55:13 EDT 2012
Allow chaining prefix expressions.
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -445,14 +445,14 @@
shiftop : Tbsl | Tbsr;
prefixexpr
- : Tinc postfixexpr {$$ = mkexpr($1->line, Opreinc, $2, NULL);}
- | Tdec postfixexpr {$$ = mkexpr($1->line, Opredec, $2, NULL);}
- | Tstar postfixexpr {$$ = mkexpr($1->line, Oderef, $2, NULL);}
- | Tband postfixexpr {$$ = mkexpr($1->line, Oaddr, $2, NULL);}
- | Tlnot postfixexpr {$$ = mkexpr($1->line, Olnot, $2, NULL);}
- | Tbnot postfixexpr {$$ = mkexpr($1->line, Obnot, $2, NULL);}
- | Tminus postfixexpr {$$ = mkexpr($1->line, Oneg, $2, NULL);}
- | Tplus postfixexpr {$$ = $2;} /* positive is a nop */
+ : Tinc prefixexpr {$$ = mkexpr($1->line, Opreinc, $2, NULL);}
+ | Tdec prefixexpr {$$ = mkexpr($1->line, Opredec, $2, NULL);}
+ | Tstar prefixexpr {$$ = mkexpr($1->line, Oderef, $2, NULL);}
+ | Tband prefixexpr {$$ = mkexpr($1->line, Oaddr, $2, NULL);}
+ | Tlnot prefixexpr {$$ = mkexpr($1->line, Olnot, $2, NULL);}
+ | Tbnot prefixexpr {$$ = mkexpr($1->line, Obnot, $2, NULL);}
+ | Tminus prefixexpr {$$ = mkexpr($1->line, Oneg, $2, NULL);}
+ | Tplus prefixexpr {$$ = $2;} /* positive is a nop */
| postfixexpr
;