[apparmor] [PATCH] parser - more regex unittests and fixes (was Re: [PATCH] [parsers] allow for nested alternations expressions)

Steve Beattie steve at nxnw.org
Thu Nov 7 18:02:46 UTC 2013


On Wed, Nov 06, 2013 at 04:38:09PM -0800, John Johansen wrote:
> On 11/06/2013 04:19 PM, Steve Beattie wrote:
> > On Mon, Nov 04, 2013 at 05:42:29PM -0800, Seth Arnold wrote:
> >> I suspect there is more work to be done in this block of code; '[' may
> >> need a corresponding if (incharclass == 1) test, unless this is supposed
> >> to work: [[]  /* character class with a [ inside the class */
> > 
> err that is perfectly valid pcre, [ in a character class is only special if
> its part of a posix character class.
> 
> http://perldoc.perl.org/perlrecharclass.html#Bracketed-Character-Classes
> Special Characters Inside a Bracketed Character Class subsection of
> Bracketed Character Classes
> 
> and ] has the exception that it isn't special if its the first character
> within the character set to match (where a leading ^ isn't the first character
> to match because it indicates inverting the class
>   ie.
>    []]
>    [^]]
> are valid

Okay, patch withdrawn for consideration. How much of pcre's character
classes are you hoping to support?  Because there's a bunch of it
that we don't (POSIX character classes, etc.)...

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20131107/17e778cf/attachment.pgp>


More information about the AppArmor mailing list