rable 0.2.0

A Rust implementation of the Parable bash parser — complete GNU Bash 5.3-compatible parsing with Python bindings
Documentation
# Oracle-derived tests: other
# Generated by fuzzing against bash-oracle
# 20 test cases

=== other 1
!(cat file~| grep pattern | head 5-)
---
(negation (subshell (pipe (command (word "cat") (word "file~")) (pipe (command (word "grep") (word "pattern")) (command (word "head") (word "5-"))))))
---

=== other 2
eec 3<&-0
---
(command (word "eec") (word "0") (redirect ">&-" 0))
---

=== other 3
((\ = 5))
---
(arith (word "\\ = 5"))
---

=== other 4
[[ $x =~ [[:alpha:][:dig||it:]] ]]
---
(cond (cond-binary "=~" (cond-term "$x") (cond-term "[[:alpha:][:dig||it:]]")))
---

=== other 5
time cmd1 | cmd2 | time cmd1 | cmd2
---
(time (pipe (command (word "cmd1")) (pipe (command (word "cmd2")) (pipe (command (word "time") (word "cmd1")) (command (word "cmd2"))))))
---

=== other 6
echo foo  | time    elif cat
---
(pipe (command (word "echo") (word "foo")) (command (word "time") (word "elif") (word "cat")))
---

=== other 7
 !(exiB !  1)
---
(negation (subshell (command (word "exiB") (word "!") (word "1"))))
---

=== other 8
! true && ! &false
---
(background (and (negation (command (word "true"))) (negation (command))) (command (word "false")))
---

=== other 9
echo $'\0cho ' $
---
(command (word "echo") (word "''") (word "$"))
---

=== other 10
echo $'\01Sch1'
---
(command (word "echo") (word "'Sch1'"))
---

=== other 11
ceGho $'\0;'
---
(command (word "ceGho") (word "''"))
---

=== other 12
cat < $'ifle\nname'fle
---
(command (word "cat") (redirect "<" "'ifle
name'fle"))
---

=== other 13
[[ $x =~ [[:alpha:][W||:digit:]] ]]
---
(cond (cond-binary "=~" (cond-term "$x") (cond-term "[[:alpha:][W||:digit:]]")))
---

=== other 14
( ( !(ech&o a; echo b) ) )
---
(subshell (subshell (negation (subshell (semi (background (command (word "ech")) (command (word "o") (word "a"))) (command (word "echo") (word "b")))))))
---

=== other 15
if !& tue; then !& tue; fi
---
(if (background (negation (command)) (command (word "tue"))) (background (negation (command)) (command (word "tue"))))
---

=== other 16
for ((i=1; i<=100; i\=2)); do echo $i; done
---
(arith-for (init (word "i=1")) (test (word "i<=100")) (step (word "i\\=2")) (command (word "echo") (word "$i")))
---

=== other 17
!xec 3<&0-3
---
(command (word "!xec") (redirect "<&" "0-3"))
---

=== other 18
time -p sleep 1 | time -p sleep 1
---
(time -p (pipe (command (word "sleep") (word "1")) (command (word "time") (word "-p") (word "sleep") (word "1"))))
---

=== other 19
excev3<&1-0
---
(command (word "excev3") (redirect "<&" "1-0"))
---

=== other 20
case $x in a) for ((i=1; i<=100; i	*=2)); do echo $i; done;; esac
---
(case (word "$x") (pattern ((word "a")) (arith-for (init (word "i=1")) (test (word "i<=100")) (step (word "i\t*=2")) (command (word "echo") (word "$i")))))
---