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 TAA23598; Mon, 1 Sep 2003 19:28:31 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 TAA18417 for ; Mon, 1 Sep 2003 19:28:30 +0200 (MET DST) Received: from cetus.henchmonkey.org (p67-70.acedsl.com [66.114.67.70]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h81HSTT00581 for ; Mon, 1 Sep 2003 19:28:29 +0200 (MET DST) Received: from katre by cetus.henchmonkey.org with local (Exim 3.36 #1 (Debian)) id 19tsTc-0006Ja-00 for ; Mon, 01 Sep 2003 13:28:28 -0400 Date: Mon, 1 Sep 2003 13:28:28 -0400 To: caml-list@inria.fr Subject: [Caml-list] Calling ocamlyacc from ocamlyacc Message-ID: <20030901172828.GA24208@henchmonkey.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i From: katre X-Loop: caml-list@inria.fr X-Spam: no; 0.00; expressing:01 compiler:01 compiler:01 ocaml:01 parser:02 parser:02 hack:03 docs:03 ocamlyacc:05 ocamlyacc:05 ocamllex:05 specify:06 source:07 source:07 lexer:09 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I am currently involved in a project to re-build a compiler for an old system from the mid-1980's, where we have the original compiler docs, we have the original source files in the language used, but the actual compiler itself is lost. This is an interesting pursuit, and I am making use of it to learn ocaml. However, due to the nature of this language, which is not very regular at all, I am having trouble expressing a parser in ocamlyacc that isn't a large hack. What would be ideal would be to have one main parser, and then one sub-parser that I could call only for a specified domain. However, all the source code is in one place. Is there a way to specify a separate parser and lexer (using ocamllex and ocamlyacc), and then to jump into them from an ocamlyacc action? Thanks for the help, John ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners