fab2da9b21
Don't ignore unexpected reserved words after ';' Don't allow any random token type as a case stmt pattern, only a word. Those are ancient ash bugs and do not affect correct scripts. Don't ignore redirects in a case stmt list where the list is nothing but redirects (if the pattern matches, the redirects should be performed). That was introduced when a redirect only case stmt list was allowed (older shells had generated a syntax error.) Random cleanups/refactoring taken from or inspired by the FreeBSD sh parser ... use makename() consistently to create a NARG node - we were using it in a couple of places but most NARG node creation was open coded. Introduce consumetoken() (from FreeBSD) to handle the fairly common case where exactly one token type must come next, and we need to check that, and skip past it when found (or error) and linebreak() (new) to handle places where optional \n's are permitted. Both previously open coded. Simplify list() by removing its second arg, which was only ever used when handling the end of a `` (old style command substitution). Simply move the code from inside list() to just after its call in the `` case (from FreeBSD.) |
||
---|---|---|
.. | ||
cat | ||
chio | ||
chmod | ||
cp | ||
csh | ||
date | ||
dd | ||
df | ||
domainname | ||
echo | ||
ed | ||
expr | ||
hostname | ||
kill | ||
ksh | ||
ln | ||
ls | ||
mkdir | ||
mt | ||
mv | ||
pax | ||
ps | ||
pwd | ||
rcmd | ||
rcp | ||
rm | ||
rmdir | ||
sh | ||
sleep | ||
stty | ||
sync | ||
test | ||
Makefile | ||
Makefile.inc |