bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] Exclude optimization


From: Sergey Poznyakoff
Subject: Re: [PATCH] Exclude optimization
Date: Mon, 10 Aug 2009 11:56:16 +0300

Bruno Haible <address@hidden> ha escrit:

> Why does it not fit into two regexes / DFAs?

Yes, it would, provided that we translate fnmatch patterns to regexps.

>       EXCLUDE_WILDCARDS on:  'a?b*' -> 'a.b.*'
>       EXCLUDE_WILDCARDS off: 'a?b*' -> 'a[?]b[*]'
>       EXCLUDE_ANCHORED on:  'a?b' -> '^a.b$'
>       EXCLUDE_ANCHORED off: 'a?b' -> '^\([^/]*/\)*a.b$'

There is also FNM_LEADING_DIR, which translates to

        'a?b' -> '^a.b/.*'

> The DFA code from grep and gawk is next to unmaintainable [1].

That is exactly the main obstacle :)

Regards,
Sergey




reply via email to

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