Robert Elz graciously pointed out that 2.9.4 implictly says that ( is in fact 
an operator, which solves my problem.  Thank you to Robert!



----- Original Message -----
From: Mark Galeck <mark_gal...@pacbell.net>
To: "austin-group-l@opengroup.org" <austin-group-l@opengroup.org>
Sent: Monday, September 5, 2016 1:52 PM
Subject: how is '(' recognized by the shell standard as a token?

Hello,

when '(' appears in the shell input, how does the section 2.3 Token 
Recognition, of the shell standard, recognize it?

'(' can be start of a subshell, or function, or optional start of a `case` 
pattern, but nowhere do I see any indication that this is an operator, or 
reserved word.  Hence it seems to me, that when following section 2.3, no 
earlier rule than 9 would apply, so either by rule 9 or 11, '(' is part of a 
word.

But that is not how dash behaves:

$ f( 
dash: Syntax error: newline unexpected (expecting ")") 
$

instead of trying to execute 'f('


So how is '(' recognized?


Thank you,

Mark

Reply via email to