I am trying to understand the POSIX shell standard here
From reading it, appears to me in the following shell command:
echo $(FOO=bar foobar) there are two tokens (for the top level shell, not the subshell): echo and $(FOO=bar foobar)
This is a useful type of command and not contrived at all, so it should be defined what the results are. But when you try to parse it using the grammar given in the standard, the second token is unspecified by Rule 7b of the grammar - because it contains = but before that, is not a valid name.
Are the results of such a "normal" command really not specified? Or what am not understanding??
7bonly applies to words before the first WORD. Here, the first WORD isecho. The question would still stand for$(foo=bar; echo echo) barcmd_wordandcmd_nameto command name itself, and in the rule itself, also talks about command names.