Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-09 Thread Chet Ramey
On 7/8/22 5:05 PM, Robert Elz wrote: Date:Fri, 8 Jul 2022 12:08:38 -0400 From:Chet Ramey Message-ID: | This is where folks like kre are going to argue. Am I? I was keeping out of this one! It was a different thread discussing the same subject where I saw

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-09 Thread Steffen Nurpmeso
Well i considered this one done upstream. Martin D Kealey wrote in : |On Sat, 9 Jul 2022, 02:08 Chet Ramey, wrote: |> On 7/8/22 11:03 AM, Steffen Nurpmeso wrote: |> |>> So you seem to use your own itoa, and here is (another) bash bug. ... |>> In this hindsight bash should bail with syntax

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Martin D Kealey
On Sat, 9 Jul 2022, 02:08 Chet Ramey, wrote: > On 7/8/22 11:03 AM, Steffen Nurpmeso wrote: > > > So you seem to use your own itoa, and here is (another) bash bug. > > Yeah, that's where stricter integer constant parsing would flag an error. > It's just an extension; bash handles everything POSIX

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Robert Elz
Date:Fri, 8 Jul 2022 12:08:38 -0400 From:Chet Ramey Message-ID: | This is where folks like kre are going to argue. Am I? I was keeping out of this one! As long as valid expressions are parsed correctly, I don't think it really matters all that much what you do

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Chet Ramey
On 7/8/22 11:03 AM, Steffen Nurpmeso wrote: Hello. Chet Ramey wrote in <9b6dfdc2-ade9-16ad-8960-5b2887b35...@case.edu>: |On 7/7/22 12:11 PM, Steffen Nurpmeso wrote: |> Funnily my parser has only one (what i know) problem left, the |> same as bash. On the other hand i found more. | |

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220708150300.spmo7%stef...@sdaoden.eu>: ... |(I post my test -- as of now, i do not yet support ?: --, we What i meant was "i _could_ post my test". I mean, it is just a series of nonsense, and not even complete yet. (In the internet as part of my MUA. Ah, sigh, l

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Steffen Nurpmeso
Hello. Chet Ramey wrote in <9b6dfdc2-ade9-16ad-8960-5b2887b35...@case.edu>: |On 7/7/22 12:11 PM, Steffen Nurpmeso wrote: |> Funnily my parser has only one (what i know) problem left, the |> same as bash. On the other hand i found more. | |The thing about all of this is that these are operat

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-08 Thread Chet Ramey
On 7/7/22 12:11 PM, Steffen Nurpmeso wrote: Hello! Hi. Funnily my parser has only one (what i know) problem left, the same as bash. On the other hand i found more. The thing about all of this is that these are operators, and so delimit tokens. Whitespace is siginficant only when determini

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-07 Thread Steffen Nurpmeso
Hello! Chet Ramey wrote in <1d592238-69c5-88b6-6e08-5d56e3170...@case.edu>: |On 7/6/22 1:10 PM, Steffen Nurpmeso wrote: ... |> I stumbled upon this (bash 5.1.16); i find it "understandable" in |> respect to clarity, but inconsistent, and also in hindsight to the ... |Thanks for the report.

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-07 Thread Chet Ramey
On 7/6/22 1:10 PM, Steffen Nurpmeso wrote: Hello. 'Struggling with a Dijkstra two stack parser i am thankful to be able to compare against bash that uses a completely different and correct parser! I stumbled upon this (bash 5.1.16); i find it "understandable" in respect to clarity, but inconsis

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-06 Thread Steffen Nurpmeso
Andreas Schwab wrote in <87czeiqhb2@igel.home>: |On Jul 06 2022, Steffen Nurpmeso wrote: | |> $ bash -c 'I=10; echo $((1++I)); echo $I' |> bash: line 1: 1++I: syntax error in expression (error token is "++I") |> $ bash -c 'I=10; echo $((1++1)); echo $I' |> 10 |> |> $ bash -c

Re: $(( )): binary/unary VAR/NUM inconsistency

2022-07-06 Thread Andreas Schwab
On Jul 06 2022, Steffen Nurpmeso wrote: > $ bash -c 'I=10; echo $((1++I)); echo $I' > bash: line 1: 1++I: syntax error in expression (error token is "++I") > $ bash -c 'I=10; echo $((1++1)); echo $I' > 10 > > $ bash -c 'I=10;echo "<$(( +10+++I ))>"' > <21> A C compiler would parse all

$(( )): binary/unary VAR/NUM inconsistency

2022-07-06 Thread Steffen Nurpmeso
Hello. 'Struggling with a Dijkstra two stack parser i am thankful to be able to compare against bash that uses a completely different and correct parser! I stumbled upon this (bash 5.1.16); i find it "understandable" in respect to clarity, but inconsistent, and also in hindsight to the announceme