Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14281 > unrolled thread
| Started by | Piotr Grzybowski <narsil.pl@gmail.com> |
|---|---|
| First post | 2018-06-27 16:33 +0200 |
| Last post | 2018-06-27 16:33 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] Piotr Grzybowski <narsil.pl@gmail.com> - 2018-06-27 16:33 +0200
| From | Piotr Grzybowski <narsil.pl@gmail.com> |
|---|---|
| Date | 2018-06-27 16:33 +0200 |
| Subject | Re: ./parse.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] |
| Message-ID | <mailman.2619.1530109999.1292.bug-bash@gnu.org> |
On 27 Jun 2018, at 14:57, Chet Ramey wrote:
> On 6/27/18 6:59 AM, Piotr Grzybowski wrote:
>
>> +function_newline_list: '(' ')' | function_newline_list '\n'
>> + ;
>> +
>
> This would appear to allow constructs like
>
> foo()
> () ()
> {
> function body
> }
only by the look of things ;-) (thats what I meant in P.S.) actually those tokens are not allowed:
bash-5.0$ cat /tmp/m.sh
foo()
() ()
{
function body
}
bash-5.0$ . /tmp/m.sh
bash: /tmp/m.sh: line 2: syntax error near unexpected token `)'
bash: /tmp/m.sh: line 2: `() ()'
I am sure function_newline_list can be rewritten in a better way though.
cheers,
pg
Back to top | Article view | gnu.bash.bug
csiph-web