Re: regex-quote.c syntax support

2011-03-08 Thread Bruno Haible
Reuben Thomas wrote: > I like the balance between having a documented "quote task" data > structure that can be constructed manually, while having constructor > functions for the POSIX, PCRE and GNU cases, so as to make casual use > risk-free. Thanks for the review. > The only thing I find confus

Re: regex-quote.c syntax support

2011-03-07 Thread Reuben Thomas
On 6 March 2011 13:51, Reuben Thomas wrote: > On 6 March 2011 13:41, Bruno Haible wrote: >> >>> RE_NO_BK_REFS -> [:digit:] >> >> I don't know what you mean by that? '[' and ']' are already in the list of >> characters to be escaped. So no need to look at RE_NO_BK_REFS, right? > > I'm not sure wha

Re: regex-quote.c syntax support

2011-03-06 Thread Reuben Thomas
On 6 March 2011 13:41, Bruno Haible wrote: > >> RE_NO_BK_REFS -> [:digit:] > > I don't know what you mean by that? '[' and ']' are already in the list of > characters to be escaped. So no need to look at RE_NO_BK_REFS, right? I'm not sure what it has to do with '[' and ']', but indeed if the inpu

Re: regex-quote.c syntax support

2011-03-06 Thread Bruno Haible
Hello Reuben, > > Before we can decide on this, IMO some analysis is needed: > > > >  - What are the possible effects of reg_syntax_t on the string of > >    characters to be escaped? I can see > >      RE_BK_PLUS_QM                   ->    +? > >      RE_INTERVALS, RE_NO_BK_BRACES   ->    {} > >

Re: regex-quote.c syntax support

2011-03-05 Thread Reuben Thomas
On 5 March 2011 14:51, Bruno Haible wrote: > Hello Reuben, > >> regex-quote seems only to support two syntaxes at the moment > > Yes. POSIX specifies two syntaxes. regex.h suggests that in practice there are a couple more: RE_SYNTAX_POSIX_EGREP RE_SYNTAX_POSIX_AWK each of which is different fro

Re: regex-quote.c syntax support

2011-03-05 Thread Bruno Haible
Hello Reuben, > regex-quote seems only to support two syntaxes at the moment Yes. POSIX specifies two syntaxes. > and it does it in a rather odd way: by a single boolean flag. Rather it's an 'int' with the same meaning as the cflags argument that you pass to regcomp(). > I wonder if there's sc

regex-quote.c syntax support

2011-03-03 Thread Reuben Thomas
regex-quote seems only to support two syntaxes at the moment, and it does it in a rather odd way: by a single boolean flag. I wonder if there's scope to change this. The obvious representation of syntaxes from a GNU point of view would be a bitmask of type reg_syntax_t as passed to re_set_syntax.