Cases to test in syntax error:
| ls
| ls
|ls
ls >
ls >>
ls <
ls <<
ls |
ls > (with extra space in the end)
ls >> (with extra space in the end)
ls < (with extra space in the end)
ls << (with extra space in the end)
ls | (with extra space in the end)
ls <>
ls < >
ls ><
ls > | ls
ls > <
Cases to test in syntax error: | ls | ls |ls ls > ls >> ls < ls << ls | ls > (with extra space in the end) ls >> (with extra space in the end) ls < (with extra space in the end) ls << (with extra space in the end) ls | (with extra space in the end) ls <> ls < > ls >< ls > | ls ls > <