13960Re: "ocaml_beginners":: RE: Problem with CAML
- Sep 24, 2013Did you intend to implement a DFA with CAML? I happened to implement a simple one (but with OCaml) as an entry for practicing OCaml. https://github.com/ChingfanTsou/oc-regexp2013/9/23 <jejebrazorf@...>
I've been trying for days but I can't do a lot..anyone could help me with this prog?
ps. the french book is good but maybe it's too difficoult
--- In email@example.com, <jejebrazorf@...> wrote:
Thanks! I'll try then I'll post the code here
--- In firstname.lastname@example.org, <philippe.veber@...> wrote:
you can have a look at chapter 16 of "le langage caml" , which gives a good overview on deterministic automata with caml. The book is in french, but the code snippets are, well in caml :o).
hope this helps,
ph.2013/9/15 <jejebrazorf@...>Hi, I have a problem with the CAML language..I need to write a CAML prog ( not OCAML) that given three 3-letter words serch if the letters are present in the given words and in that case it will return true otherwise false. The program must use the deterministic automata.
Do you have any idea? thanksProgram without automa:let string_check c1 c2 string = (index_char string c1)>0 && (index_char string c2)>0;;let rec progCaml a b s_list =match s_list with -> false| x::xs -> try(string_check a b x)withNot_found -> progCaml a b xs;;
- << Previous post in topic Next post in topic >>