bug-bash
[Top][All Lists]
Advanced

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

Re: function grammar


From: Linda Walsh
Subject: Re: function grammar
Date: Tue, 20 Jul 2010 14:06:41 -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



Ken Irving wrote:
So maybe the declaration could be fixed to show that, e.g., as either of:

    name () compound-command [redirection]
    function name [()] compound-command [redirection]

I can't see how to put that in one construct...
BNF would use:

< 'function' <NAME> > | < <NAME> '()' > <compound-command> [redirection]

(ignoring that it would probably also specify <SPACE> where needed

maybe using bash syntax:

+(function _name_ | _name_ () ) compound-command [redirection]




reply via email to

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