aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/syntax.y
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/rc/syntax.y')
-rw-r--r--sys/cmd/rc/syntax.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/cmd/rc/syntax.y b/sys/cmd/rc/syntax.y
index 247cc8a..a580cb0 100644
--- a/sys/cmd/rc/syntax.y
+++ b/sys/cmd/rc/syntax.y
@@ -2,11 +2,13 @@
%token Targs
%token Tbasic Tparen Tblock
+%define parse.error verbose
+
%{
#include "rc.h"
int yylex(void);
- void yyerror(char *);
+ void yyerror(const char *);
%}
/* operator precendence: lowest first */
@@ -67,6 +69,7 @@ cmd:
/* empty */ %prec Twhile { $$ = nil; }
| basic { $$ = maketree1(Tbasic, $1); }
| block
+| assign cmd %prec Tbang { $$ = hangchild1($1, $2, 2); }
| Tif paren nl ifbody { $$ = hangchild1($2, $1, 0); }
basic: