Why { is parsed differently depending on the context?
From:
Peng Yu
Subject:
Why { is parsed differently depending on the context?
Date:
Thu, 14 Feb 2019 11:05:57 -0600
Hi,
`echo {` treats `{` as WORD.
`{ echo; }` treats `{` as a token of `{`.
`{a` treats `{a` as a WORD.
I don't see the point why yylex() treat `{` context dependently.
Wouldn't it better just treat a bare `{` as a token of `{`?
What is the reasoning behind the current design of the syntax?
--
Regards,
Peng