From: Francois Pottier <Francois.Pottier@inria.fr>
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] menhir
Date: Sat, 28 Apr 2007 18:50:58 +0200 [thread overview]
Message-ID: <20070428165058.GA31584@yquem.inria.fr> (raw)
In-Reply-To: <1177756336.11923.18.camel@rosella.wigram>
Hello,
On Sat, Apr 28, 2007 at 08:32:16PM +1000, skaller wrote:
> Second, I got a "rather a lot" of states have end-of-stream conflicts.
> What's that about?
That's precisely about "overshooting" the end of the token stream (reading
one too many tokens). The issue is described in the manual.
> Third the generated ml file was 4.5 Meg. Ocamlopt on amd64 hung for so long
> I almost posted a bug report for Ocamlopt, but finally it finished.
Yup, I am somewhat disappointed that ocamlopt does not seem to have linear
time complexity, but I shouldn't complain too loud, my boss may be listening
:)
An option to generate tables like ocamlyacc would clearly be useful.
> Basically: when Ocamlyacc reduces a production, it sometimes
> ends on the last token, and sometimes it overshoots by 1.
I don't know the details of your grammar, but our (perhaps naive) view is that
you should modify your grammar to avoid end-of-stream conflicts (and Menhir's
conflict reports will help you do that). Then, Menhir will not overshoot.
> The semantics used are: when the exprx is processed the
> action arranges to push the terminator token back
> into the token stream.
How is this done? It is possible that this hack is not compatible with Menhir,
because Menhir keeps a local cache of the next token, which is not properly
updated when you push your old token back.
--
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/
next prev parent reply other threads:[~2007-04-28 16:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-28 10:32 menhir skaller
2007-04-28 16:50 ` Francois Pottier [this message]
2007-04-28 19:47 ` [Caml-list] menhir Markus Mottl
2007-04-28 21:15 ` Jon Harrop
2007-04-29 4:43 ` skaller
2007-04-29 7:27 ` Christophe Raffalli
2007-05-01 15:57 ` Francois Pottier
2007-05-01 17:11 ` skaller
2007-05-01 17:34 ` Francois Pottier
2007-05-01 23:42 ` skaller
2007-05-02 5:38 ` Francois Pottier
2007-05-02 5:50 ` Francois Pottier
2007-05-02 8:41 ` skaller
2007-05-02 12:30 ` Francois Pottier
2007-05-02 16:29 ` skaller
2007-05-02 18:35 ` Francois Pottier
2007-05-03 1:30 ` skaller
2007-05-03 8:43 ` Joel Reymont
2007-05-01 17:15 ` skaller
2007-05-01 17:31 ` Francois Pottier
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=20070428165058.GA31584@yquem.inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@inria.fr \
--cc=skaller@users.sourceforge.net \
/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