Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Two quick questions.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-02 (07:36)
From: Jeremy Fincher <tweedgeezer@h...>
Subject: [Caml-list] Two quick questions.
First: I looked at the source code to the Printf module to see exactly how 
Printf.printf does type checking on the format strings, since I'd like to 
implement something similar (for reimplementing the "struct" python module, 
which uses format strings to pack/unpack arbitrary binary data) but I 
honestly had no idea how it worked.  Is something like what Printf.printf 
does way too "deep magic" for a newbie to O'Caml to do, or are there any 
good explanations of how it does what it does?

Second: Are there any good examples of using ocamllex/ocamlyacc to build 
abstract syntax trees?  I've seen ASTs built from streams in the Caml-light 
manual, and I've seen examples of ocamllex/ocamlyacc used to parse simple 
languages that don't really need an AST, but I can't find any examples (with 
explanations, of course :)) of ocamllex/ocamlyacc being used to actually 
create abstract syntax trees for a given grammar.

Get your FREE download of MSN Explorer at

Bug reports:  FAQ:
To unsubscribe, mail  Archives: