bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]