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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: lehalle@miriad <charles.lehalle@m...>
Subject: [Caml-list] ocamllex parametrized parse regexp
Hi,

I try to use ocamllex like this (I want to have one of the parsing regexp  
to be read from an external file) :


{
   open Printf;;

}
let digit = ['0'-'9']

let mark = ...read in a file...

rule oaddress outcan = parse
   | mark as bemark
       {
         printf "MARK(%s)" bemark;
         oaddress outcan lexbuf
       }
   | _ as d
       { printf "Unk[%c]\n" d;
         oaddress outcan lexbuf
       }
   | eof
       {
         fprintf outcan "END";
       }

Is it possible or useless to try somethink like that ?

-- 
Charles-Albert Lehalle --- MIRIAD Technologies
Responsable Développements Algorithmiques et Applications
mailto:charles.lehalle@miriadtech.com
keyserver: http://pgp.mit.edu/
tel : 0156431816 - fax: 0156431828
8 av Hoche - 75008 PARIS - FRANCE

-------------------
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