fix recogniation of IN token in for command nested within case command

This commit is contained in:
Chet Ramey
2024-04-15 10:11:38 -04:00
parent 136cdf8108
commit a06616a689
7 changed files with 88 additions and 12 deletions
+3
View File
@@ -15,3 +15,6 @@ bash5: -c: line 1: `for()'
in
done
ok 1
x
x
x
+35
View File
@@ -63,4 +63,39 @@ in
foo) echo "ok 1";;
esac' $bashname
# POSIX grammar rule 6 with <linebreak> consisting of multiple newlines and
# nested case and for commands
case x in x)
for x
in x
do
echo $x
done
esac
# need to recognize IN here
case x in x)
for x
in x
do
echo $x
done
esac
# recognize both IN and DO
case x in x)
for x
in x
do
echo $x
done
esac