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 16:24:20 +0200	[thread overview]
Message-ID: <20050626142419.GA436@first.in-berlin.de> (raw)
In-Reply-To: <a80eebd40506260625605331a6@mail.gmail.com>

On Sun, Jun 26, 2005 at 03:25:36PM +0200, Sen Horak wrote:
> Ok, but that still doesn't answer my question (on how to connect the
> stdin channel to a <> compatible char stream).


Yes, sorry, I was a littlebid off-topic.
But you asked, if the stream-parsers are
deprecated.
And you also asked, if most people are using ocamllex/ocamlyacc.
So I thought it was for your interest too,
to hear such opinions about selecting ocamllex/ocamlyacc.

For later I will try the other parer-stuff too, but for now,
where I look to get some projects running, it's best to do it
such a "compatible" way.
So rapid development can be done in OCaml very fast. And when all
goes well, the software will be ported back to C, if not possible
to show the people that it's better to let it as it is (and in OCaml).

If this did not interest you, sorry.



> 
> > 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.

Well ocampp4? The first time I hear from 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.

Ah, ok. Fine. ;-)

> 
> Of course, if you want to write a more complex parser, it's better to
> do it in lex/yacc.

Ah, ok. So then I decided the right way. :)

Sometimes it seems to mee, that people who are writing about
the stream-parsers on this list, would ´choose this because it's
good for doing hard parser stuff.
So I maybe misunderstood this.

As I planned (for a long time, but now started to lift up my ass and
start with it) to implement own languages (Domain Specific Languages),
so I need a tool for doing the lex-/parse-stuff.

I will start with simple things, but I'm shure it will be complex
short time later... :)

And as maybe said before, I'm happy to have OCaml on my side. :)

BTW: is there something like a converter from OCaml to C, so
that I can write OCaml-code but for people who wants it in C
it can be converted automatically?
(Well, they should install ocaml instead... but....)

Ciao,
   Oliver


  reply	other threads:[~2005-06-26 14:24 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 ` [Caml-list] " Oliver Bandel
2005-06-26 13:25   ` Sen Horak
2005-06-26 14:24     ` Oliver Bandel [this message]
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=20050626142419.GA436@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).