From: Alan Falloon <Al.Falloon@synopsys.com>
To: Ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Yacc limitations
Date: Fri, 23 Sep 2005 11:30:49 -0400 [thread overview]
Message-ID: <43341FA9.90704@synopsys.com> (raw)
In-Reply-To: <43327FEF.7070209@barettadeit.com>
Alex Baretta 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.
>
>
I am not very familiar with SQL, so I may be missing something
important, but a quick google search for 'sql grammar' turned up what
appears to be an LALR grammer already in *yacc syntax at
http://docs.openlinksw.com/virtuoso/GRAMMAR.html
I have also been frustrated in the past with yacc, bison, and ocamlyacc,
but its usually not the LALR restriction as much as the lack of decent
short-hand for common operations like a list of elements (with or
without a separator token) which make the grammar a lot more verbose
than it should really need to be. Also, with the C parser generators, it
was always a huge pain to represent the parse tree in any reasonable
way, but with ocaml and ocamlyacc that is a non-issue.
I do agree that debugging conflicts seems to be harder than it should
be. It would be wonderful if that could be addressed.
As far as the LALR restriction goes, bison has an optional GLR parser
(see http://www.delorie.com/gnu/docs/bison/bison_90.html) that seems
like it could be added to ocamlyacc with a pretty straightforward
translation if anyone had the time and motivation to do it.
--
Alan Falloon
next prev parent reply other threads:[~2005-09-23 15:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-09-22 16:46 yoann padioleau
2005-09-22 17:08 ` brogoff
2005-09-23 9:29 yoann padioleau
2005-09-23 12:51 ` Alex Baretta
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=43341FA9.90704@synopsys.com \
--to=al.falloon@synopsys.com \
--cc=caml-list@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