Browse thread
Thread safe Str
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-01-12 (07:59) |
From: | skaller <skaller@u...> |
Subject: | Re: [Caml-list] Thread safe Str |
On Wed, 2005-01-12 at 07:53, Martin Jambon wrote: > On 11 Jan 2005, skaller wrote: > > See the ulex package for a model. The problem with micmatch > > is precisely that it does use Str. > > It uses either Str or PCRE. > You can also integrate ulex by yourself if it is possible. I'm not sure .. ulex doesn't use NFA's does it? AFIAK it doesn't support captures. The problem with micmatch is that it probably doesn't do what can be done with a system supported in the core language, linear matching over all cases. Felix does do it: in this code regmatch .. with | re1 => .. | re2 => .. | re3 =>.. endmatch the input characters (from ...) are read exactly once, not only is there no backtracking, since a DFA is used, but it isn't a sequence of comparisons (it's a DFA based tokeniser, the token selecting the RHS expression). I would guess micmatch does not support that, although it probably could. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net