From: Yitzhak Mandelbaum <yitzhakm@CS.Princeton.EDU>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Caml-list List <caml-list@inria.fr>
Subject: Re: [Caml-list] Array.make exception and parser
Date: Tue, 4 Jan 2011 12:03:22 -0500 [thread overview]
Message-ID: <E0FC5EA3-865C-4F18-B8B6-6A9C64C78E69@CS.Princeton.EDU> (raw)
In-Reply-To: <AANLkTikOo8eQHGY=qTh3f8KYe8r1MFxveO_jwVfBUSP9@mail.gmail.com>
Daniel,
You're right about those transformations. Yet, when your grammar has hundreds of nonterminals, most or all with semantic actions attached, the transformations you describe can be quite tedious and error-prone. Tools can certainly help here, but that would require people being familiar with them. Its usually easier just to take Yacc for a spin than to go that effort.
I'm not trying to advocate for one approach over another. I was just trying to answer your question about why people do the things they do.
Also, if you have any further questions, may I suggest we take it off the caml-list? I think we've wandered off-topic here. :-)
-- Yitzhak
On Jan 4, 2011, at 11:42 AM, Daniel Bünzli wrote:
>> A short answer (among many) to your particular question: it often requires a lot off effort just to discover whether " a recursive descent parser with some
>> combinators fits perfectly,"
>
> Well I don't know what "a lot of effort" means to you. But IIRC my
> compiler course it's a matter of taking your EBNF grammar, eliminating
> left recursion and left factoring the grammar. If you can't do that
> with your grammar then you cannot parse it with LL(k).
>
> Best,
>
> Daniel
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
-----------------------------
Yitzhak Mandelbaum
next prev parent reply other threads:[~2011-01-04 17:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 13:41 Jean Krivine
2011-01-04 14:56 ` Daniel Bünzli
2011-01-04 14:57 ` Daniel Bünzli
2011-01-04 14:57 ` Török Edwin
2011-01-04 15:14 ` Jean Krivine
2011-01-04 15:31 ` Daniel Bünzli
2011-01-04 16:22 ` Yitzhak Mandelbaum
2011-01-04 16:42 ` Daniel Bünzli
2011-01-04 17:03 ` Yitzhak Mandelbaum [this message]
2011-01-04 17:04 ` Jean Krivine
2011-01-04 17:22 ` Daniel Bünzli
2011-01-04 15:38 ` bluestorm
2011-01-04 17:43 ` Jean Krivine
[not found] ` <1125074892.441923.1294163043602.JavaMail.root@zmbs2.inria.fr>
2011-01-04 17:53 ` Francois Pottier
[not found] ` <1259991756.440008.1294155536392.JavaMail.root@zmbs2.inria.fr>
2011-01-04 17:45 ` Francois Pottier
2011-01-04 19:30 ` Daniel Bünzli
2011-01-04 19:52 ` Yitzhak Mandelbaum
2011-01-04 20:36 ` Daniel Bünzli
[not found] ` <1263353434.442766.1294169448342.JavaMail.root@zmbs2.inria.fr>
2011-01-04 20:31 ` Francois Pottier
2011-01-04 20:40 ` Lukasz Stafiniak
2011-01-04 21:03 ` Török Edwin
2011-01-05 3:24 ` Yitzhak Mandelbaum
2011-01-05 14:12 ` Boris Yakobowski
2011-01-05 21:12 ` Boris Yakobowski
2011-01-05 13:37 ` Xavier Leroy
2011-01-05 13:46 ` Jean Krivine
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=E0FC5EA3-865C-4F18-B8B6-6A9C64C78E69@CS.Princeton.EDU \
--to=yitzhakm@cs.princeton.edu \
--cc=caml-list@inria.fr \
--cc=daniel.buenzli@erratique.ch \
/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