From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0VLQK2Z029249 for ; Tue, 31 Jan 2012 22:26:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuEFADlbKE9KfVK2kGdsb2JhbAAoGoIoZYF+qF91CCIBAQEBCQkNBxQEIYILAg8dARseAxIQDwIFIQIRAhIRAQUBLwgBAR6HXQYpmFuCXQqLJEiCcIR/P4hxAgULgSSHcYFmAQIFAQIBBQICAggBAQQNBAYBRAMBgnEZBAMMAxQFVwoLPIIGgRYElSCFV4E5hwc9hAA X-IronPort-AV: E=Sophos;i="4.71,598,1320620400"; d="scan'208";a="142271494" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 31 Jan 2012 22:26:15 +0100 Received: by werm13 with SMTP id m13so698992wer.27 for ; Tue, 31 Jan 2012 13:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=notXxg9/ZYGJ9AeVSrgR6FQapaKWm4iHqyqsBhDCERo=; b=n0yK6hg8/8E0ULRXnnNCM7nDkocmyIYQ5b7TaQmVfoAJmIhYO2O3U4j+qpr2ylzNq/ EjT7FYWYE7vC7WjNFaEt3IAg1SLFknAZNYuJMvejiWoByzL7BnPMNSRcuStyJ9Y+KVuC MjdRPsRgPVe3nhYBB029CPfx7A8mvdnvL+yr0= Received: by 10.216.131.95 with SMTP id l73mr9737253wei.39.1328045175124; Tue, 31 Jan 2012 13:26:15 -0800 (PST) Received: from [172.27.6.159] ([213.106.240.92]) by mx.google.com with ESMTPS id fv6sm66747277wib.8.2012.01.31.13.26.14 (version=SSLv3 cipher=OTHER); Tue, 31 Jan 2012 13:26:14 -0800 (PST) Message-ID: <4F285C76.10301@gmail.com> Date: Tue, 31 Jan 2012 21:26:14 +0000 From: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= <5764c029b688c1c0d24a2e97cd764f@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Caml-list] how (within camlp4 printer) can I traverse AST ? Hello, I would like to write a (camlp4 pluggable) printer. My starting-point is this: http://brion.inria.fr/gallium/index.php/Setup_a_new_printer It was easy to figure out that "ast" arguments have type "Ast.sig_item" or "Ast.str_item" respectively which are both abstract types http://camlunity.ru/doc/camlp4-3.12/Camlp4.Sig.Ast.html so I cannot try to match them---I cannot use any of the constructors defined in: http://camlunity.ru/doc/camlp4-3.12/Camlp4.Sig.Camlp4Ast.html What is thus a proper way of traversing ASTs?