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 KAA18199; Fri, 19 Oct 2001 10:05:47 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 KAA18071 for ; Fri, 19 Oct 2001 10:05:46 +0200 (MET DST) Received: from dido.engr.internet.org.ph ([203.176.75.250]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9J85h527335 for ; Fri, 19 Oct 2001 10:05:44 +0200 (MET DST) Received: by dido.engr.internet.org.ph (Postfix, from userid 502) id 5B4DF1742A; Fri, 19 Oct 2001 16:04:26 +0800 (PHT) Date: Fri, 19 Oct 2001 16:04:26 +0800 From: "Rafael 'Dido' Sevilla" To: Caml List Subject: [Caml-list] putting stuff in an ocamlyacc-generated mli file Message-ID: <20011019160426.A11610@team.ph.inter.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've been trying to streamline the error handling for my ocamlyacc-based compiler, and have this exception defined in my parser.mly: exception Undef_sym of string; This is raised whenever the compiler encounters an undefined symbol. The file that actually uses the compiler, compiler.ml does something like: try let result = Parser.main Lexer.token lexbuf in ... with Parser.Undef_sym x -> Printf.fprintf stderr "Undefined symbol %s" x Unfortunately, compiling the compiler with this causes it to choke saying that Parser.Undef_sym is not found. It's not in the generated parser.mli file, of course. So apart from editing that (automatically generated) file manually, how do I get ocamlyacc to put them there? -- Rafael R. Sevilla +63(2) 8177746 ext. 8311 Programmer, Inter.Net Philippines +63(917) 4458925 http://dido.engr.internet.org.ph/ OpenPGP Key ID: 0x5CDA17D8 ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr