Browse thread
Stream parser/make_lexer
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-06-26 (13:25) |
From: | Sen Horak <sen.horak@g...> |
Subject: | Re: [Caml-list] Stream parser/make_lexer |
Ok, but that still doesn't answer my question (on how to connect the stdin channel to a <> compatible char stream). > I sometimes used the Stream-Module. > But in the last time I switched more to ocamllex/ocamlyacc. > The reason is, that I find them a good tool for many things. > But I didn't tried the camlp4-stuff. It may be more easy to > write complicated parsers with thema and maybe more elegant. The documentation says that the parser interface is no longer supported by proper ocaml, so we need to preprocess with ocampp4. > But one reason to use ocamllex/ocamlyacc is that they are > similar to lex/yacc, and therfore, if programming in a > commercial field, porting the Ocaml-software back to C > (even if not really happy about this), is easier. The parser interface seems to be a nice thing if you want to "script" in ocaml - that is, if you want to write quick and dirty solutions to problems that you would ordinarily do in Perl/PYthon etc. Of course, if you want to write a more complex parser, it's better to do it in lex/yacc. SH