caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Stream parser/make_lexer
Date: Sun, 26 Jun 2005 14:18:47 +0200	[thread overview]
Message-ID: <20050626121847.GA322@first.in-berlin.de> (raw)
In-Reply-To: <a80eebd40506260312508f0408@mail.gmail.com>

On Sun, Jun 26, 2005 at 12:12:40PM +0200, Sen Horak wrote:
[...]
> Also, is the make_lexer/stream parser way of building a parser
> deprecated? I find it a convenient way to build small parsers quickly.
> Or do most ocaml programmers just use ocamllex/ocamlyacc for
> everything?

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.

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.

So during the next days and weeks I think I will develop
some software twice: in C and the same program also in OCaml.
This will yield insights to how much easier and safer it is to develop
in OCaml than in C.

I just yesterday got a "Bus error" because one function
was not/bad implemented in the C version. I didn't ported
that stuff to OCaml now, but it is planned.
And OCaml had warned me that there is a problem.

(But, btw: using -Wall from gcc would have warned me, but
 OCaml wouldn't compile the code...)
 
So, using ocamllex/ocymlyacc has some advantages that are
not in the programming field itself... but in the working
environment / where you want to use your software.

It's really hard to start with OCaml and then restrictions
say that you have to use C instead... but that's how it is.

Ciao,
   Oliver


  reply	other threads:[~2005-06-26 12:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26 10:12 Sen Horak
2005-06-26 12:18 ` Oliver Bandel [this message]
2005-06-26 13:25   ` [Caml-list] " Sen Horak
2005-06-26 14:24     ` Oliver Bandel
2005-06-26 13:52 ` Virgile Prevosto
2005-06-27 11:24   ` Sen Horak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050626121847.GA322@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).