bug-bash
[Top][All Lists]
Advanced

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

Re: inconstancy with RS = "(\r?\n){2}"


From: Alex fxmbsw7 Ratchev
Subject: Re: inconstancy with RS = "(\r?\n){2}"
Date: Mon, 26 Jul 2021 16:08:40 +0200

compute_min_length_from_regex .. maybe also max
compute_binary_speedup_from_regex
then have a in buffer of min, then per char
then on fill up or char add, crop to max - min , then
binary_regex_function_if on that buffer

this is optimized form of per char :
per read char, do optional crop, match for buf by regex ( RS )

On Mon, Jul 26, 2021, 16:03 Wolfgang Laun <wolfgang.laun@gmail.com> wrote:

> The fundamental problem with a regex as RS is that you need to determine
> two things: first, you need to know that the regex matches some character
> sequence of the input stream and, second, that it does not also match any
> subsequent characters in the input stream. For certain regular expressions
> (including simple strings) it is possible to know that a match implies that
> subsequent characters can definitely not match. For other regular
> expressions it is not possible to answer the second question. It requires a
> lot of effort to determine whether a certain regular expression is in  the
> first group or in the second group. gawk uses a simple test to distinguish
> these two categories. The second category is never empty, even if you would
> implement the best possible analysis.
>
> /(\r?\n){2}/ is in gawk's second category, because it contains "magic"
> characters.
>
> You may have to implement a FSM, as I suggested early on.
>
> Wolfgang
>
>
>
>
>
>
> On Mon, 26 Jul 2021 at 15:15, Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
> wrote:
>
>> ---------- Forwarded message ---------
>> From: Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
>> Date: Mon, Jul 26, 2021, 15:13
>> Subject: Re: inconstancy with RS = "(\r?\n){2}"
>> To: Aharon Robbins <arnold@skeeve.com>
>>
>>
>> but the RS issue remains
>> oh well up to better times somewhen else
>> thanks :)
>>
>> On Mon, Jul 26, 2021, 15:12 <arnold@skeeve.com> wrote:
>>
>> > I'm sorry.
>> >
>> > I give up.
>> >
>> > You will have to use another approach. Maybe using gawk's built-in
>> > networking will help.
>> >
>> > Good luck.
>> >
>> > Arnold
>> >
>> > Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:
>> >
>> > > and no it doesnt work
>> > > also on the stderr cmd i had to quit nc ( didnt try control d ) and
>> then
>> > > the rest appeared, on the tcpserv side, .. seems bug nothing done
>> > > i fetched git clone new and did bootstrap and further
>> > >
>> > > On Mon, Jul 26, 2021, 15:07 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>
>> > wrote:
>> > >
>> > > > i just got now to it
>> > > > in my testing on terminal still same bug, on testing that gawk >
>> stderr
>> > > > cmd even more newlines were needed to make it print ( on the tcpserv
>> > term )
>> > > > that makes it invalid for my httpd and the bug but ill just try now
>> too
>> > > >
>> > > > On Mon, Jul 26, 2021, 13:24 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com
>> >
>> > > > wrote:
>> > > >
>> > > >> thank you big time ! ill just test now
>> > > >> sorry for not knowing much git
>> > > >>
>> > > >> On Mon, Jul 26, 2021, 13:17 <arnold@skeeve.com> wrote:
>> > > >>
>> > > >>> Please do
>> > > >>>
>> > > >>>         make distclean
>> > > >>>         git pull
>> > > >>>         git checkout test-socket-patch
>> > > >>>         ./bootstrap.sh && ./configure && make
>> > > >>>
>> > > >>> I applied the patch and pushed it to git in that branch.
>> > > >>>
>> > > >>> Arnold
>> > > >>>
>> > > >>
>> >
>>
>
>
> --
> Wolfgang Laun
>
>


reply via email to

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