diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/rc/syn.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/rc/syn.y b/src/cmd/rc/syn.y index c7de3531..5123ce4a 100644 --- a/src/cmd/rc/syn.y +++ b/src/cmd/rc/syn.y @@ -2,6 +2,7 @@ %term WORD REDIR DUP PIPE SUB %term SIMPLE ARGLIST WORDS BRACE PAREN PCMD PIPEFD /* not used in syntax */ /* operator priorities -- lowest first */ +%left LOW %left IF WHILE FOR SWITCH ')' NOT %left ANDAND OROR %left BANG SUBSHELL @@ -9,6 +10,7 @@ %left '^' %right '$' COUNT '"' %left SUB +%left '=' %{ #include "rc.h" #include "fns.h" @@ -78,6 +80,7 @@ first: comword word: keyword {lastword=1; $1->type=WORD;} | comword | word '^' word {$$=tree2('^', $1, $3);} +| word '=' word %prec LOW {$$=tree2('^', tree2('^', $1, token("=", WORD)), $3);} comword: '$' word {$$=tree1('$', $2);} | '$' word SUB words ')' {$$=tree2(SUB, $2, $4);} | '"' word {$$=tree1('"', $2);} |