[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gawk] Change in the order of precedence for the redirection operato
From: |
Aharon Robbins |
Subject: |
Re: [gawk] Change in the order of precedence for the redirection operator? |
Date: |
Mon, 05 Dec 2005 22:27:28 +0200 |
I haven't decided yet whether I'll be changing gawk back, or not.
If & when I do, I'll revise the doc.
Thanks,
Arnold
> Date: Thu, 01 Dec 2005 11:14:53 +0100
> From: Karel Zak <address@hidden>
> Subject: Re: [gawk] Change in the order of precedence for the redirection
> operator?
> To: Stepan Kasal <address@hidden>
> Cc: Tony Leneis <address@hidden>, address@hidden
>
> On Thu, 2005-10-27 at 10:53 +0200, Stepan Kasal wrote:
> > Hello,
> >
> > > > gawk 'BEGIN { "echo " "date" | getline; print }'
> >
> > as I supposed, this incompatibility was introduced by my patches, which
> > fixed
> > other bugs in the parser.
> >
> > I wrote two patches; please apply gawk-20051027-pars1.patch first, and
> > then gawk-20051027-pars2.patch .
> >
> > gawk-20051027-pars2.patch fixes the bug quoted above.
> >
> > gawk-20051027-pars1.patch is a small cleanup of the grammar, which prepares
> > it for the other patch. Moreover, it fixes a bug that some expressions
> > were not parsed correctly; see the new test file for details.
> >
> > Arnold, will you accept these patches?
>
> You should fix docs too. There is:
>
> http://www.gnu.org/software/gawk/manual/html_node/Getline_002fPipe.html#Getline_002fPipe
>
> According to POSIX, `expression | getline' is ambiguous if expression contains
> unparenthesized operators other than `$'-for example, `"echo " "date" |
> getline'
> ^^^^^^^^^^^^^^^^^^^^^^
> is ambiguous because the concatenation operator is not parenthesized. You
> should
> ^^^^^^^^^^^^
> write it as `("echo " "date") | getline' if you want your program to be
> portable
> to other awk implementations.
>
>
> Karel
>
> --
> Karel Zak <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gawk] Change in the order of precedence for the redirection operator?,
Aharon Robbins <=