caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Francois.Pottier@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] menhir
Date: Wed, 02 May 2007 09:42:30 +1000	[thread overview]
Message-ID: <1178062950.8967.39.camel@rosella.wigram> (raw)
In-Reply-To: <20070501173409.GB7308@yquem.inria.fr>

On Tue, 2007-05-01 at 19:34 +0200, Francois Pottier wrote:
> > So basically, menhir is saying "what happens if you hit
> > end of stream here? What should be done?" and the answer
> > is "it can't happen".
> 
> What I am trying to say is, Menhir doesn't ask this question. It asks:
> "what happens if I reach that state? should I request a lookahead token
> from the lexer, or shouldn't I?"

Perhaps I do not fully understand but:

I do not use 'eof' (end-of-stream pseudo token).
I get this for an unused token:

"Warning: the token WHENCE is unused."

and I should get the same for eof IMHO (but possibly 
suppressed message since it's not a user defined
token).

What i actually get is 145 end-of-stream conflicts .. 
but i get no conflicts on WHENCE.

That is, instead of treating the token set precisely as the
set of user tokens + eof, menhir is treating eof specially
and not consistently with other tokens.

There's no conflict: in every one of these states if 'eof'
turns up its a syntax error, exactly the same as if WHENCE
turns up. 

I'm not sure i fully understand the 'do we need lookahead'
issue: I would have thought: you need a fetch if your action is 
shift, and not if it is a reduce.



-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


  reply	other threads:[~2007-05-01 23:42 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 ` [Caml-list] menhir Francois Pottier
2007-04-28 19:47   ` 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 [this message]
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=1178062950.8967.39.camel@rosella.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=Francois.Pottier@inria.fr \
    --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;
as well as URLs for NNTP newsgroup(s).