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 LAA20207; Fri, 2 Mar 2001 11:56:25 +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 LAA19635 for caml-list@pauillac.inria.fr; Fri, 2 Mar 2001 11:56:24 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA19257 for ; Fri, 2 Mar 2001 11:46:07 +0100 (MET) Received: from batman.labri.u-bordeaux.fr (batman.labri.u-bordeaux.fr [147.210.8.5]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f22Ak6924475 for ; Fri, 2 Mar 2001 11:46:06 +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 LAA09233 for ; Fri, 2 Mar 2001 11:50:01 +0100 (MET) Message-ID: <3A9F79EC.56C757EA@labri.fr> Date: Fri, 02 Mar 2001 11:46:04 +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: caml-list@inria.fr Subject: [Caml-list] Problem when parsing Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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) If I replace the following rule in the parser : translation_unit: external_declaration { () } | translation_unit external_declaration { () } ; by translation_unit: external_declaration { () } ; the test file is parsed with no problem. The test file is just "int x;" Any idea ... I know that this error is raised by lex_engine in byterun/lexing.c but I do not understand why !!! -- Laurent ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr