Loading ...
Sorry, an error occurred while loading the content.
 

Re: "ocaml_beginners"::[] Problem with CAML

Expand Messages
  • Philippe Veber
    Hi, you can have a look at chapter 16 of le langage caml [1], which gives a good overview on deterministic automata with caml. The book is in french, but the
    Message 1 of 10 , Sep 14, 2013
      Hi,

      you can have a look at chapter 16 of "le langage caml" [1], 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.

      [1] http://caml.inria.fr/distrib/books/llc.pdf


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

      Program 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)
              with
                    Not_found -> progCaml a b xs;;



    • jejebrazorf
      Thanks! I ll try then I ll post the code here --- In ocaml_beginners@yahoogroups.com, wrote: Hi, you can have a look at chapter 16 of le
      Message 2 of 10 , Sep 15, 2013

        Thanks! I'll try then I'll post the code here 



        --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

        Hi,

        you can have a look at chapter 16 of "le langage caml" [1], 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.

        [1] http://caml.inria.fr/distrib/books/llc.pdf


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

        Program 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)
                with
                      Not_found -> progCaml a b xs;;



      • 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
        Message 3 of 10 , Sep 23, 2013

          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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

          Thanks! I'll try then I'll post the code here 



          --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

          Hi,

          you can have a look at chapter 16 of "le langage caml" [1], 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.

          [1] http://caml.inria.fr/distrib/books/llc.pdf


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

          Program 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)
                  with
                        Not_found -> progCaml a b xs;;



        • Chingfan Tsou
          Did you intend to implement a DFA with CAML? I happened to implement a simple one (but with OCaml) as an entry for practicing OCaml.
          Message 4 of 10 , Sep 24, 2013
            Did 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-regexp


            2013/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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

            Thanks! I'll try then I'll post the code here 



            --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

            Hi,

            you can have a look at chapter 16 of "le langage caml" [1], 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.

            [1] http://caml.inria.fr/distrib/books/llc.pdf


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

            Program 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)
                    with
                          Not_found -> progCaml a b xs;;




          • jejebrazorf
            Yes, I need to implement a DFA with CAML..the problem is in the first post ---In ocaml_beginners@yahoogroups.com, wrote: Did you intend to
            Message 5 of 10 , Sep 25, 2013

              Yes, I need to implement a DFA with CAML..the problem is in the first post



              ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

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


              2013/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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

              Thanks! I'll try then I'll post the code here 



              --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

              Hi,

              you can have a look at chapter 16 of "le langage caml" [1], 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.

              [1] http://caml.inria.fr/distrib/books/llc.pdf


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

              Program 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)
                      with
                            Not_found -> progCaml a b xs;;




            • Chingfan Tsou
              I really don t know the differences between CAML and OCaml, but have you check this out? Hopefully helpful http://swtch.com/~rsc/regexp/regexp1.html 2013/9/25
              Message 6 of 10 , Sep 25, 2013
                I really don't know the differences between CAML and OCaml, but have you check this out? Hopefully helpful http://swtch.com/~rsc/regexp/regexp1.html


                2013/9/25 <jejebrazorf@...>
                 

                Yes, I need to implement a DFA with CAML..the problem is in the first post



                ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

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


                2013/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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

                Thanks! I'll try then I'll post the code here 



                --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

                Hi,

                you can have a look at chapter 16 of "le langage caml" [1], 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.

                [1] http://caml.inria.fr/distrib/books/llc.pdf


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

                Program 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)
                        with
                              Not_found -> progCaml a b xs;;





              • jejebrazorf
                Link doesn t work! :( ---In ocaml_beginners@yahoogroups.com, wrote: I really don t know the differences between CAML and OCaml, but have you
                Message 7 of 10 , Sep 25, 2013

                   Link doesn't work! :(



                  ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

                  I really don't know the differences between CAML and OCaml, but have you check this out? Hopefully helpful http://swtch.com/~rsc/regexp/regexp1.html


                  2013/9/25 <jejebrazorf@...>
                   

                  Yes, I need to implement a DFA with CAML..the problem is in the first post



                  ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

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


                  2013/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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

                  Thanks! I'll try then I'll post the code here 



                  --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

                  Hi,

                  you can have a look at chapter 16 of "le langage caml" [1], 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.

                  [1] http://caml.inria.fr/distrib/books/llc.pdf


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

                  Program 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)
                          with
                                Not_found -> progCaml a b xs;;





                • Chingfan Tsou
                  That s too bad. I don t know what happened. Try google this: Regular Expression Matching Can Be Simple And Fast . Good luck! 2013/9/25
                  Message 8 of 10 , Sep 25, 2013
                    That's too bad. I don't know what happened. Try google this:    "Regular Expression Matching Can Be Simple And Fast". Good luck!


                    2013/9/25 <jejebrazorf@...>
                     

                     Link doesn't work! :(



                    ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

                    I really don't know the differences between CAML and OCaml, but have you check this out? Hopefully helpful http://swtch.com/~rsc/regexp/regexp1.html


                    2013/9/25 <jejebrazorf@...>

                     

                    Yes, I need to implement a DFA with CAML..the problem is in the first post



                    ---In ocaml_beginners@yahoogroups.com, <caojingfan@...> wrote:

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


                    2013/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 ocaml_beginners@yahoogroups.com, <jejebrazorf@...> wrote:

                    Thanks! I'll try then I'll post the code here 



                    --- In ocaml_beginners@yahoogroups.com, <philippe.veber@...> wrote:

                    Hi,

                    you can have a look at chapter 16 of "le langage caml" [1], 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.

                    [1] http://caml.inria.fr/distrib/books/llc.pdf


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

                    Program 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)
                            with
                                  Not_found -> progCaml a b xs;;






                  • jejebrazorf
                    UP
                    Message 9 of 10 , Dec 12, 2013

                      UP

                    Your message has been successfully submitted and would be delivered to recipients shortly.