English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] stream parser problem/question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-08-10 (09:52)
From: Michael <micha-1@f...>
Subject: [Caml-list] stream parser problem/question

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 
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?


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