caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: yoann padioleau <padator@wanadoo.fr>
Cc: Alex Baretta <alex@barettadeit.com>, Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Yacc limitations
Date: Thu, 22 Sep 2005 10:08:31 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0509220949330.26704@shell2.speakeasy.net> (raw)
In-Reply-To: <27582143.1127407593127.JavaMail.www@wwinf1503>

On Thu, 22 Sep 2005, yoann padioleau wrote:
> > I am getting very much annoyed with the obtusity of the LALR-yacc parser
> > generators. I have unsurmountable difficulties at teaching ocamlyacc how
> > to parse SQL decently.
> >
> > What is the "way to go" in terms of parser generators for Ocaml? I'd
> > like to see if there is some level of agreement in the community on this
> > issue.

It would be great to see an all OCaml parser generator, something really fancy,
like an Earley parser. I say "all OCaml", as opposed to, say an OCaml backend
for some existing tool like ANTLR, because code cannibalization is good.
Anyways, if you're looking to do something like this, an ocamllex compatible,
mostly yacc like earley style parser generator would be interesting. Or one
that generates the scanner too. To get people to move beyond yacc you need
to offer something that's both better and (mostly) compatible. All IMO of
course.

> I personnaly use ocamlyacc and even if there is some difficulties, I like it.

I use it because I know yacc, and lots of people I work with know yacc, it
comes with OCaml, and there's a lot of available documentation. I wouldn't say
I like it, but I don't hate it and it's good enough and I'm too lazy to learn
anything else right now.

> All the ocaml project that I know that need some complex parsing use ocamlyacc.
> Some people also use streams but are limited to write LL(1) grammars.

No, they make it easy to write recursive descent parsers "inline", and it's
pretty easy (too easy) to hack recursive descent parsers to handle greater
lookaheads. Neat stuff, but not widely used as far as I can see.

-- Brian


  reply	other threads:[~2005-09-22 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-22 16:46 yoann padioleau
2005-09-22 17:08 ` brogoff [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-23  9:29 yoann padioleau
2005-09-23 12:51 ` Alex Baretta
2005-09-22  9:57 Alex Baretta
2005-09-22 13:09 ` [Caml-list] " Christophe Raffalli
2005-09-26 11:54   ` Pierre Boulet
     [not found] ` <4332ACF2.6020702@univ-savoie.fr>
2005-09-22 14:05   ` Alex Baretta
2005-09-22 16:37 ` Christophe TROESTLER
2005-09-23  6:05 ` Jake A. Kirilenko
2005-09-23 15:30 ` Alan Falloon

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=Pine.LNX.4.58.0509220949330.26704@shell2.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=alex@barettadeit.com \
    --cc=caml-list@inria.fr \
    --cc=padator@wanadoo.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).