[ast-developers] Shell diagnistocs for faulty pattern in s=${x//~(E)pattern/x} or [[ $x ==~(E)pattern ]] ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Roland Mainz
On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler wrote: [snip] > if the pattern did have a syntax error regcomp() would report it to the caller > so reporting an error or not is not a regex issue I know... see below... > so it doesn't make sense to add something to ~(...) to check syntax > because

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread ольга крыжановская
Comments in line: On Sun, Jun 24, 2012 at 4:35 AM, ольга крыжановская wrote: > I already used testregex. Still no clue why it works there but fails in ksh. > > I've reworked the regex the expression below but it still does not > capture name="value". Full script uploaded to > http://pastebin.com/

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Glenn Fowler
On Sun, 24 Jun 2012 04:35:45 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote: > I already used testregex. Still no clue why it works there but fails in ksh. it was a hint to post it :) post the testregex test case(s) and I'll look at it > I've reworked the regex the expression below but it st

[ast-developers] Pass exactly one \ from ksh to _ast_regcomp()?

2012-06-23 Thread ольга крыжановская
How can I make ksh to pass exactly ONE back slash to _ast_regcomp()? So far I tried it without success, either it passes 0 or 2 back slashes to _ast_regex(): (dbx) run -c '[[ x1 == ~(E)\: ]]' (dbx) print (char*)0xfd7fff0bd4f0 (char *) 18446741324914480368U = 0xfd7fff0bd4f0 "~(E):" (dbx) r

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread ольга крыжановская
I already used testregex. Still no clue why it works there but fails in ksh. I've reworked the regex the expression below but it still does not capture name="value". Full script uploaded to http://pastebin.com/raw.php?i=SPyqBMrj dummy="${xmltext//~(Ex-p)(?: ()+?| # xml comments (<

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Glenn Fowler
On Sat, 23 Jun 2012 21:27:58 -0400 Glenn Fowler wrote: > On Sat, 23 Jun 2012 22:38:36 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= > wrote: > > I do not see a mistake in the regular expression itself. Either it's a > > hard to spot quoting issue or a full bug in ksh93 or libast regex. > > Glenn,

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Glenn Fowler
On Sat, 23 Jun 2012 22:38:36 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote: > I do not see a mistake in the regular expression itself. Either it's a > hard to spot quoting issue or a full bug in ksh93 or libast regex. > Glenn, what do you think? to rule out any possible ksh quoting conflict

Re: [ast-developers] Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread ольга крыжановская
On Sat, Jun 23, 2012 at 10:09 AM, Glenn Fowler wrote: > > On Sat, 23 Jun 2012 09:09:56 +0200 Lionel Cons wrote: >> On 23 June 2012 06:22, Roland Mainz wrote: >> > On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler >> > wrote: >> >> On Sat, 23 Jun 2012 03:40:15 +0200 Roland Mainz wrote: >> >>> On Sat

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread ольга крыжановская
I have attached a debugger to ksh to see which pattern _ast_recomp will see (dbx) print (char*)0xfd7fff0777b0 dbx: warning: unknown language, 'c' assumed (char *) 18446741324914194352U = 0xfd7fff0777b0 "~(Ex)(?:\n^I()+?|^I# xml comments\n^I(<[[:alnum:]_-:]+\n^I^I(?: # attributes\n^I^I^I[[:s

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread ольга крыжановская
I do not see a mistake in the regular expression itself. Either it's a hard to spot quoting issue or a full bug in ksh93 or libast regex. Glenn, what do you think? Olga On Sat, Jun 23, 2012 at 9:08 AM, Lionel Cons wrote: > On 23 June 2012 06:40, Roland Mainz wrote: >> On Sat, Jun 23, 2012 at 6

Re: [ast-developers] Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Glenn Fowler
On Sat, 23 Jun 2012 09:09:56 +0200 Lionel Cons wrote: > On 23 June 2012 06:22, Roland Mainz wrote: > > On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler wrote: > >> On Sat, 23 Jun 2012 03:40:15 +0200 Roland Mainz wrote: > >>> On Sat, Jun 23, 2012 at 2:34 AM, Roland Mainz > >>> wrote: > >>> > Here'

[ast-developers] Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Glenn Fowler
On Sat, 23 Jun 2012 06:22:23 +0200 Roland Mainz wrote: > On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler wrote: > > On Sat, 23 Jun 2012 03:40:15 +0200 Roland Mainz wrote: > >> On Sat, Jun 23, 2012 at 2:34 AM, Roland Mainz > >> wrote: > >> > Here's another issue with regex. We wrote the following

Re: [ast-developers] Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Lionel Cons
On 23 June 2012 06:22, Roland Mainz wrote: > On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler wrote: >> On Sat, 23 Jun 2012 03:40:15 +0200 Roland Mainz wrote: >>> On Sat, Jun 23, 2012 at 2:34 AM, Roland Mainz >>> wrote: >>> > Here's another issue with regex. We wrote the following script to >>> >

Re: [ast-developers] More fun with regex in ksh ... / was: Re: Advanched regex (to parse XML fragments) not working...

2012-06-23 Thread Lionel Cons
On 23 June 2012 06:40, Roland Mainz wrote: > On Sat, Jun 23, 2012 at 6:22 AM, Roland Mainz > wrote: >> On Sat, Jun 23, 2012 at 5:55 AM, Glenn Fowler wrote: >>> On Sat, 23 Jun 2012 03:40:15 +0200 Roland Mainz wrote: On Sat, Jun 23, 2012 at 2:34 AM, Roland Mainz wrote: > Here's a

Re: [ast-developers] read: -N: limit exceeded

2012-06-23 Thread Lionel Cons
On 22 June 2012 21:52, David Korn wrote: > Subject: Re: [ast-developers] read: -N: limit exceeded > > >> Why is this limit? And can the limit be increased to at least 2**32 on >> 64bit platforms? >> >> Lionel >> > > It was that way to reserve compatibility with the sh_readline() > interac