Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] lazyness, exceptions?, ocaml syntax rule-of-thumbs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-27 (07:50)
From: Kontra, Gergely <kgergely@m...>
Subject: Re: [Caml-list] lazyness, exceptions?, ocaml syntax rule-of-thumbs
>   I cannot find a function, which checks, whether a string can match
>   a regexp, and return true or false. Search_forward, again, I think
>   should be return an option, and not trowing an exception.
>Have a look at pcre

Well, Str has almost, what I need, actually I can write the match
function, but I hoped there is a function, which returns a boolean to
indicate, whether a string contains a regexp...
Well the str library is not so intuitive... perhaps I should download

>   But the thing most of the time I was spending with was the actual
>   ocaml syntax.  I cannot feel the precedences, where to put ;-s and
>   ;;-s.
>If you're annoyed by the not-enough-parenthesized syntax of OCaml, you
>could try the revised syntax (see camlp4).  There are pretty-printers
>that can convert from one syntax in the other.
Wow, so I can even write my own syntax!
Has anybody an SML syntax description? Well, I must dive into a correct
syntax description.

>Nothing about the algorithm; i/o is imperative, but i/o is
>imperative, isn't it ?  Perhaps Str.last_chars will raise an exception
>if what is less than 5 chars long ?

I guess trouble. That's why I was looking for a RE solution...

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email:,          |
|  URL:    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
Magyar php mirror es magyar php dokumentacio:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: