From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A43BDBC69 for ; Wed, 2 May 2007 07:50:44 +0200 (CEST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l425obp7007198; Wed, 2 May 2007 07:50:37 +0200 Received: by yquem.inria.fr (Postfix, from userid 18965) id 1AAEEBC69; Wed, 2 May 2007 07:50:37 +0200 (CEST) Date: Wed, 2 May 2007 07:50:37 +0200 From: Francois Pottier To: skaller Cc: caml-list@inria.fr Subject: Re: [Caml-list] menhir Message-ID: <20070502055037.GC726@yquem.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <1177756336.11923.18.camel@rosella.wigram> <20070428165058.GA31584@yquem.inria.fr> <1177821783.25394.37.camel@rosella.wigram> <20070501155705.GA29617@yquem.inria.fr> <1178039464.8967.10.camel@rosella.wigram> <20070501173409.GB7308@yquem.inria.fr> <1178062950.8967.39.camel@rosella.wigram> <20070502053815.GA726@yquem.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20070502053815.GA726@yquem.inria.fr> User-Agent: Mutt/1.5.9i X-Miltered: at concorde with ID 463826AD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 wrote:01 token:01 token:01 cristal:01 caml-list:01 pottier:01 pottier:01 francois:02 francois:02 fpottier:02 sentence:04 sentence:04 stream:04 stream:04 On Wed, May 02, 2007 at 07:38:15AM +0200, I wrote: > Internally, the construction of the automaton uses a pseudo-token, > written #, which stands for the end of the token stream. This token > can appear in conflict explanation messages. Actually, I should say: # stands for the end of a sentence that we are trying to recognize. That is, if S is a start symbol, then Menhir builds a new start symbol S' with the production S' -> S #. As a result, when we reach a state where a reduce action ("reduce production p") has lookahead symbol #, this means: "in this state, perhaps we have consumed a sentence derived from S; in that case, we should reduce production p and not read anything more". It does not mean that we have reached the end of the physical token stream, only that we have reached the end of what we were supposed to read. -- François Pottier Francois.Pottier@inria.fr http://cristal.inria.fr/~fpottier/