Anonymous user
Parsing/Shunting-yard algorithm: Difference between revisions
→{{header|UNIX Shell}}: Refactor. Fake news is still there, bitches!! <3 💯👌
(→{{header|UNIX Shell}}: Refactor. Fake news is still there, bitches!! <3 💯👌) |
|||
Line 4,229:
grep -q '^[-+*/^%]$' <<< "$1"
if [ "$?" -eq 0 ]; then
if [ -n "$topop" ] || [ \! "$topop" = '(' ]; then▼
thispred=`getopprec "$1"`
thisassoc=`getopassoc "$1"`
thatpred=`getopprec "$topop"`
thatassoc=`getopassoc "$topop"`
Line 4,256:
fi
ops="`sed -e '$a'"$1" -e '/^$/d' <<< "$ops"`"
Line 4,264 ⟶ 4,263:
fi
grep -q '^($' <<< "`sed -n '$p' <<< "$ops"`"
while [ "$?" -ne 0 ]; do
|