bug-bash
[Top][All Lists]
Advanced

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

BUG: grammar handler needs to be fixed to recognize Bash syntax.... (was


From: Linda Walsh
Subject: BUG: grammar handler needs to be fixed to recognize Bash syntax.... (was Re: function grammar)
Date: Tue, 20 Jul 2010 14:09:45 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

The following function is legal syntax, but yields an error:

function good_dir [[ -n $1 && -d $1 && -r $1  && -x $1 ]]

bash: syntax error near unexpected token `[['
----

To which Andreas comments that it's a grammar bug:


Andreas Schwab wrote:
Bernd Eggink <monoped@sudrala.de> writes:

"If the function reserved word is supplied,  the  parentheses  are
optional."

While the grammer has the right rules for this the handling inside of
special_case_tokens isn't right up to it, it only recognizes '{'
following 'function WORD'.

Andreas.




reply via email to

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