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 RAA09766; Sun, 19 Sep 2004 17:51:00 +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 RAA01602 for ; Sun, 19 Sep 2004 17:50:59 +0200 (MET DST) Received: from appliedminds.com (mail.appliedminds.com [65.104.119.58]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8JFov2V013456 for ; Sun, 19 Sep 2004 17:50:58 +0200 Received: by appliedminds.com (CommuniGate Pro PIPE 4.2) with PIPE id 597459; Sun, 19 Sep 2004 08:50:55 -0700 X-Spam-Status: Scanner Called Received: from [127.0.0.1] (HELO am-relay00.amthinking.net) by appliedminds.com (CommuniGate Pro SMTP 4.2) with ESMTP id 597458; Sun, 19 Sep 2004 08:50:42 -0700 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: binary Mime-Version: 1.0 From: James Lamanna To: jamesl@appliedminds.com, skaller Subject: Re: [Caml-list] Calling parser from inside a parser rule Reply-To: jamesl@appliedminds.com X-Mailer: AtMail 4.0 X-Origin: 24.205.67.40 Cc: Jon Harrop , caml-list X-Uidl: 10955659202580217camel@pelicanwigram Date: Sun, 19 Sep 2004 08:50:42 -0700 Message-ID: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on am-relay00.appliedminds.com X-Spam-Status: No, hits=-100.0 required=5.7 tests=USER_IN_WHITELIST autolearn=no version=2.63 X-Miltered: at concorde with ID 414DAAE1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 recursion:01 token:01 rec:01 sep:01 cope:02 parser:02 parser:02 recurse:02 essentially:02 wrote:03 lexbuf:03 lexbuf:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat Sep 18 20:52 , skaller sent: >On Sun, 2004-09-19 at 03:46, James Lamanna wrote: >> { >> let f = open_in $2 in >> let lexbuf = Lexing.from_channel f in >> let rec parse_file _ = >> try >> List.rev_append (main Lexer.token lexbuf) (parse_file () ) >> with _ -> [] >> in >> parse_file () >> } >> >> which obviously doesn't work >> because main (the parser main function) isn't defined yet. > >Do you mean, how to cope with the lack recursion across >translation units? > Essentially. I want to be able to recurse into my parser. Thanks. -- James Lamanna ------------------- 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