On Tue, Oct 11, 2022, 3:12 PM Greg Wooledge wrote:
> On Tue, Oct 11, 2022 at 12:38:44PM -0700, Koichi Murase wrote:
> > As far as I know, glob/extglob
> > does not have constructs that cannot be represented by formal regular
> > languages so should always be able to be represented by NFAs and thu
2022年10月11日(火) 13:12 Greg Wooledge :
> On Tue, Oct 11, 2022 at 12:38:44PM -0700, Koichi Murase wrote:
> > As far as I know, glob/extglob
> > does not have constructs that cannot be represented by formal regular
> > languages so should always be able to be represented by NFAs and thus DFAs.
>
> It's
On Tue, Oct 11, 2022 at 12:38:44PM -0700, Koichi Murase wrote:
> As far as I know, glob/extglob
> does not have constructs that cannot be represented by formal regular
> languages so should always be able to be represented by NFAs and thus DFAs.
It's been too many decades since I studied this stuf
2022年10月11日(火) 16:22 Martin D Kealey :
> However I note that it's not always possible to make a Deterministic FSA
> when you have repeatable groups which themselves don't have fixed lengths
> (like a+(a|abbba|aabb*aba)b);
This is not true. Any non-deterministic finite automaton (NFA) can be
transl
On 10/11/22 1:26 AM, Phi Debian wrote:
On the contrary I see nor reference saying the 'pattern matching for
pathname expansion can also be used by extension to any strings, but now I
understand it is.
The conditional command is explicit about it:
"When the == and != operators are used, the
On Tue, Oct 11, 2022 at 9:02 AM Martin D Kealey
wrote:
> Broadly I meant translating into a "preferably" Deterministic
> (stackless/non-backtracking) Finite State Automaton.
>
> However I note that it's not always possible to make a Deterministic FSA
> when you have repeatable groups which themse
Broadly I meant translating into a "preferably" Deterministic
(stackless/non-backtracking) Finite State Automaton.
However I note that it's not always possible to make a Deterministic FSA
when you have repeatable groups which themselves don't have fixed lengths
(like a+(a|abbba|aabb*aba)b); either
iner ==> infer sorry about typo's
Hum, may be I was over optimistic regarding alloca(), it seems it core
dumps as well :-), i.e never return NULL.
I was mentioning alloca() because I use to do my own stacksize check using
getrlimit() and getting the max stack size, and measuring the distance
between the stack_base and the recursio
On Tue, Oct 11, 2022 at 7:23 AM Martin D Kealey
wrote:
>
> 4) compile globs into state machines, the same way that regexes get
> compiled, so that they can be matched without needing any recursion.
>
> -Martin
>
Do you mean the NFA colud trade recursion for malloc()'d backtracking point
record?
On Mon, Oct 10, 2022 at 9:08 PM Chet Ramey wrote:
> That's not the point. The point is that shell pattern matching is used in
> contexts other than filename globbing, and the shell shouldn't broadly
> impose a filename-only restriction on those uses.
>
> Chet
>
Ok got it, I was confused because
On Sun, 9 Oct 2022 at 18:07, Phi Debian wrote:
> I was looking at a bug on ksh93 that is "core dumps doing glob pattern on
> long string" and it happen that bash
> suffer the same.
>
> $ [[ $(printf '%010d' 0) == +(0) ]]
>
> I see 3 way of fixing this
>
> 1) [...] string should be limited to
On 10/10/22 12:59 PM, Phi Debian wrote:
Ok, I agry that PATH_MAX should not be considered, because not defined
every where (OS's)
That's not the point. The point is that shell pattern matching is used in
contexts other than filename globbing, and the shell shouldn't broadly
impose a filename
Ok, I agry that PATH_MAX should not be considered, because not defined
every where (OS's)
If you decide a limit let me know I would use the same for ksh93 :)
for the time being we core dump :)
Cheers.
On 10/9/22 4:07 AM, Phi Debian wrote:
I was looking at a bug on ksh93 that is
"core dumps doing glob pattern on long string" and it happen that bash
suffer the same.
$ [[ $(printf '%010d' 0) == +(0) ]]
I see 3 way of fixing this
1) [[ string == pattern ]] is for glob pattern, so string sh
@Oğuz A simple look at the core dump will suffice to convince you that the
stack has overflowed. As Koichi stated, both ksh and bash do implement de
'simple' recursive approach.
My question was only about the strategy that bash would follow, to converge
with bash, i.e we can still both core dump,
2022年10月9日(日) 18:37 Oğuz :
> I'm not familiar with how extended globs are implemented in either shell
> but this doesn't look like something that'd involve recursion.
For the particular pattern +(0), you might think it is possible to
implement it without recursion, but the extglob engine needs to
9 Ekim 2022 Pazar tarihinde Phi Debian yazdı:
>
> $ [[ $(printf '%010d' 0) == +(0) ]]
>
> I see 3 way of fixing this
>
I'm not familiar with how extended globs are implemented in either shell
but this doesn't look like something that'd involve recursion.
--
Oğuz
18 matches
Mail list logo