Even in the latest bash, 4.0.33, $() parsing is still broken:
$ bash -c 'echo $(echo \|)'
bash: -c: line 0: unexpected EOF while looking for matching `)'
bash: -c: line 1: syntax error: unexpected end of file
And yes, this is bash built with GNU bison, not Berkeley yacc.
--
Christian "naddy" Weisgerber naddy@mips.inka.de