From f7a9b7fe3a8d9fa124d5d279db4d2a2ffb3686b3 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Mon, 30 Sep 2002 13:25:00 +0000 Subject: [PATCH] Allow a left parenthesis before patterns in case blocks. POSIX requires us to accept this, but I've never seen a script that uses it. --- bin/sh/parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 8a2e988c85e3..69d64055b37f 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -433,6 +433,8 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : "")); *cpp = cp = (union node *)stalloc(sizeof (struct nclist)); cp->type = NCLIST; app = &cp->nclist.pattern; + if (lasttoken == TLP) + readtoken(); for (;;) { *app = ap = (union node *)stalloc(sizeof (struct narg)); ap->type = NARG;