[darcs-users] Regular Expression libraries and linker errors
Jason Dagit
dagit at codersbase.com
Tue Oct 6 02:51:22 UTC 2009
On Mon, Oct 5, 2009 at 6:12 PM, Trent W. Buck <twb at cybersource.com.au>wrote:
> Nathan Gray <kolibrie at graystudios.org> writes:
>
> > On Sat, Oct 03, 2009 at 01:32:38AM -0700, Jason Dagit wrote:
> >> Specifically, our current list looks like:
> >> \.(foo|FOO)$
> >>
> >> I think we should transform that to:
> >> \.[fF][oO][oO]$
> >>
> >> I think that better captures the case-insensitive intent that we had.
> >
> > If we want case-insensitive, can't we use a case-insensitive flag?
> >
> > (?i)\.foo$
> >
> > That's how it's written for Perl. I'm not sure of the syntax outside
> > of Perl.
>
> AIUI we currently use EREs, so are restricted to the functionality
> mentioned in regex(7). That has no equivalent for (?i) other than
> [fF][oO]...
>
Since we read in the file and then process it a bit before handing it the
regular expression implementation we could actually implement what Nathan
describes. Someone would need to profile it to see if it's worth it or
somehow argue that users lives are going to be much much easier.
Alternatively, it's something that our hypothetical regex optimizer could
detect and handle in whatever way is considered efficient by it.
Having said that, I would actually argue against adding support for
case-insensitive matches in this way because it's the sort of change that
requires us to bump the repository format causing incompatibilities between
darcsen. So the benefits would need to be clear. Otherwise what do we tell
the people that are inconvenienced by the change?
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20091005/f0a26efa/attachment.htm>
More information about the darcs-users
mailing list