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 LAA18413; Tue, 10 Aug 2004 11:52:30 +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 LAA13764 for ; Tue, 10 Aug 2004 11:52:29 +0200 (MET DST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i7A9qSRM008295 for ; Tue, 10 Aug 2004 11:52:28 +0200 Received: (qmail 26482 invoked by uid 65534); 10 Aug 2004 09:52:28 -0000 Received: from p4523e3d4.np.schlund.de (EHLO schluck.use.schlund.de) (212.227.35.69) by mail.gmx.net (mp009) with SMTP; 10 Aug 2004 11:52:28 +0200 X-Authenticated: #20477425 From: Michael Reply-To: micha-1@fantasymail.de To: "caml" Subject: [Caml-list] stream parser problem/question Date: Tue, 10 Aug 2004 11:52:17 +0200 User-Agent: KMail/1.6.1 X-Techauftrag: 007 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200408101152.17727.micha-1@fantasymail.de> X-Miltered: at concorde with ID 41189ADC.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; token:01 token:01 parser:02 parser:02 tree:02 tree:02 parsers:03 elegant:04 parse:04 hint:04 processed:94 queue:05 queue:05 ocamllex:05 slight:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I'm using ocamllex/yacc to translate a little language into a parse-tree, then processing the tree and putting the output into a queue. Then I iterate over the queue, generating a new one and so on until finished. My question is, instead of outputing the processed parse-tree into a queue, is ist better/more elegant to generate a stream and then using a stream parser to process that stream and eventual generating a new stream,... until finished? Are stream parsers useful for my purpose? Are there penalties using them? Another slight issue is, that I don't see how to generate a token stream (with Stream.from) of my parse tree (because of the tree-stucture, I get confused how to get the right next token); maybe someone can give me a hint? cheers, Michael ------------------- 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