Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Luc Maranget <luc.maranget@i...>
Subject: Re: [Caml-list] ANNOUNCE: mod_caml 1.0.6 - includes security patch
> On Mon, Jan 19, 2004 at 11:13:53AM +0100, Luc Maranget wrote:
> > I am not exactly sure I understand your needs. But you should probably have a
> > look at ocamllex.
> 
> Coming from a Perl background, ocamllex is a very heavyweight solution
> for the simple problem of doing quick string matches.  The
> Regexp/OCaml package looks very good indeed - shame it can't be part
> of the standard syntax!
> 
> Rich.
> 
> -- 
> Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
> Merjis Ltd. http://www.merjis.com/ - improving website return on investment
> PTHRLIB is a library for writing small, efficient and fast servers in C.
> HTTP, CGI, DBI, lightweight threads: http://www.annexia.org/freeware/pthrlib/

Normally, using camlp4 you can insert regexp matchings
in ``standard'' syntax. Although the current manual of
camlp4 does not tell much about that.
Furthermore the code is at the moment broken in the CVS tree...


To me, the extra burden of having to preprocess the lexer
source is not that heavy in a big program, where you have Makefiles
anyway.  Besides some expressivity bonuses (but beware, such
expressivity often comes with fuzziness) one advantage of the library
approach is the possibility to give regexps dynamically (eg by reading external
files).  Few applications  take advantage of this.


Of course all my nice reasoning fails when you consider ``scripting'',
but even then, the idea of putting regexps in strings leads to unncessary
complications (ie many backslashes).
A more convenient way would be by some regexp data type either
abstract or concrete.
Such an API should probably be added to supported ocaml regexp packages.

Cheers,

-- Luc

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners