summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-09-08 14:24:25 +0000
committerOri Bernstein <ori@eigenstate.org>2021-09-08 14:24:25 +0000
commit7ea6821a838490b594c1c1c8261e1fa29dfce133 (patch)
treec62365b4695dd0385fbd6123fd7709aab7a5277a
parent41369692bf818fdee290d357bdb27fdb71487b92 (diff)
rc: revert 2f8a59f4b5bfe028c022855acc19666d69eed909
this patch doesn't pull its weight; it's not worth it.
-rw-r--r--sys/src/cmd/rc/syn.y10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/src/cmd/rc/syn.y b/sys/src/cmd/rc/syn.y
index 542dcba78..051c9e88e 100644
--- a/sys/src/cmd/rc/syn.y
+++ b/sys/src/cmd/rc/syn.y
@@ -17,7 +17,7 @@
struct tree *tree;
};
%type<tree> line paren brace body cmdsa cmdsan assign epilog redir
-%type<tree> cmd simple first word comword keyword words comwords
+%type<tree> cmd simple first word comword keyword words
%type<tree> NOT FOR IN WHILE IF TWIDDLE BANG SUBSHELL SWITCH FN
%type<tree> WORD REDIR DUP PIPE
%%
@@ -68,10 +68,8 @@ cmd: {$$=0;}
| assign cmd %prec BANG {$$=mung3($1, $1->child[0], $1->child[1], $2);}
| BANG cmd {$$=mung1($1, $2);}
| SUBSHELL cmd {$$=mung1($1, $2);}
-| FN comwords brace {$$=tree2(FN, $2, $3);}
-| FN comwords SUBSHELL brace
- {$$=tree2(FN, $2, mung1($3, $4));}
-| FN comwords {$$=tree1(FN, $2);}
+| FN words brace {$$=tree2(FN, $2, $3);}
+| FN words {$$=tree1(FN, $2);}
simple: first
| simple word {$$=tree2(ARGLIST, $1, $2);}
| simple redir {$$=tree2(ARGLIST, $1, $2);}
@@ -92,5 +90,3 @@ comword: '$' word {$$=tree1('$', $2);}
keyword: FOR|IN|WHILE|IF|NOT|TWIDDLE|BANG|SUBSHELL|SWITCH|FN
words: {$$=(struct tree*)0;}
| words word {$$=tree2(WORDS, $1, $2);}
-comwords: {$$=(struct tree*)0;}
-| comwords comword {$$=tree2(WORDS, $1, $2);}