Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamllex problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] ocamllex problem
On Fri, 2005-08-05 at 11:53 +1200, Jonathan Roewen wrote:
> Yes, I'm retarded. Ignore me ;-)

No way .. you picked something I didn't know:

> >        | ':'((letter|' ')* as s)       { STRING s }

I check the manual .. yup, you can match
subgroups like that..

How does that work??? The algorithm for handling
this for a DFA is non-trivial. Any pointers to
the algorithm used?

Alain Frisch pointed me at some nasty papers on
this, one with a regexp -> NFA conversion and the
other with a NFA-> DFA conversion, but I couldn't
figure out how to do the direct regexp->DFA conversion,
I'd sure like to find an algorithm for that..

-- 
John Skaller <skaller at users dot sourceforge dot net>