From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA24056; Fri, 2 Mar 2001 14:36:19 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA24036 for caml-list@pauillac.inria.fr; Fri, 2 Mar 2001 14:36:19 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA22402 for ; Fri, 2 Mar 2001 14:07:50 +0100 (MET) Received: from batman.labri.u-bordeaux.fr (batman.labri.u-bordeaux.fr [147.210.8.5]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f22D7of02756 for ; Fri, 2 Mar 2001 14:07:50 +0100 (MET) Received: from labri.fr (reveille@serveur3-1 [147.210.8.180]) by batman.labri.u-bordeaux.fr (8.8.7/8.8.7) with ESMTP id OAA15077; Fri, 2 Mar 2001 14:11:43 +0100 (MET) Message-ID: <3A9F9B1F.F0C860E0@labri.fr> Date: Fri, 02 Mar 2001 14:07:43 +0100 From: Laurent Reveillere Organization: LaBRI, University of Bordeaux, FRANCE X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-14smp i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: Jean-Christophe Filliatre CC: caml-list@inria.fr Subject: Re: [Caml-list] Problem when parsing References: <3A9F79EC.56C757EA@labri.fr> <15007.39415.612361.167527@pc803> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jean-Christophe Filliatre wrote: > > Laurent Reveillere writes: > > I wrote a small parser for iso C which does nothing (for now). > > The lexer and parser files are well compiled by ocamllex and ocamlyacc. > > But when I run the generated program, I have the following error : > > > > Fatal error: uncaught exception Failure(lexing: empty token) > > This exception is raised by the lexer when input does not match any of > the lexer rules. So it has probably to do with your lexer rules, not > with your parser rules. > > Hope this helps, > -- > Jean-Christophe FILLIATRE > mailto:Jean-Christophe.Filliatre@lri.fr > http://www.lri.fr/~filliatr Yes, I fixed the problem. The error came from the fact that I forgot a rule for eof in my lexer. Still, I would like to know why the eof special char is not match by a rule like | _ -> raise (Failure "unknown token") -- Lauren ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr