rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 2c905bca704d5f9e874adcea920264a6ace8f3e1
parent ca70bc5a3fe38275efedac55cea0564d80d8f5b4
Author: tjg <tjg>
Date:   Fri, 18 Aug 2000 10:44:58 +0000

another attempt at the equals hack

Diffstat:
Mparse.y | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/parse.y b/parse.y @@ -127,8 +127,8 @@ sword : comword | keyword { $$ = mk(nWord,$1, NULL); } word : sword - | word '=' { $$ = mk(nConcat,$1,mk(nWord,"=",NULL)); } - | word '=' sword { $$ = mk(nConcat,$1,mk(nConcat,mk(nWord,"=",NULL),$3)); } + | word '=' { if (interactive) { $$ = mk(nConcat,$1,mk(nWord,"=",NULL)); } else { yyerror("syntax error"); YYERROR; } } + | word '=' sword { if (interactive) { $$ = mk(nConcat,$1,mk(nConcat,mk(nWord,"=",NULL),$3)); } else { yyerror("syntax error"); YYERROR; } } | word '^' sword { $$ = mk(nConcat,$1,$3); } comword : '$' sword { $$ = mk(nVar,$2); }