From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 991331F0371 for ; Sat, 9 Feb 2008 19:20:11 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 42900B305 for ; Sat, 9 Feb 2008 19:18:44 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 42BB88FC62 for ; Sat, 9 Feb 2008 19:18:48 +0900 (JST) X-Virus-Scanned: amavisd-new at funfun.nagaokaut.ac.jp Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by localhost (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uubP8qwS8-sV for ; Sat, 9 Feb 2008 19:18:48 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 082BD8FC2C for ; Sat, 9 Feb 2008 19:18:48 +0900 (JST) Received: from carbon.ruby-lang.org (carbon.ruby-lang.org [221.186.184.68]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 9BCDE630060 for ; Sat, 9 Feb 2008 19:18:45 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by carbon.ruby-lang.org (Postfix) with ESMTP id 55A913C225D61; Sat, 9 Feb 2008 19:18:33 +0900 (JST) Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by carbon.ruby-lang.org (Postfix) with SMTP id AB6A73C225D40 for ; Sat, 9 Feb 2008 19:18:28 +0900 (JST) Received: (qmail 25789 invoked from network); 9 Feb 2008 10:18:36 -0000 Received: from unknown (HELO ?172.20.20.11?) (layh@sbcglobal.net@64.149.29.198 with plain) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 9 Feb 2008 10:18:36 -0000 Delivered-To: ruby-core@ruby-lang.org Date: Sat, 9 Feb 2008 19:18:29 +0900 Posted: Sat, 09 Feb 2008 04:20:17 -0600 From: Charles Thornton Reply-To: ruby-core@ruby-lang.org Subject: Re: IRHG -- Dumping T-Nodes To: ruby-core@ruby-lang.org Message-Id: <47AD7E61.8070909@hawthorne-press.com> In-Reply-To: <27F3D33F-E637-4861-BBE7-53E75AED2471@segment7.net> References: <47AD5EC9.6030603@hawthorne-press.com> <27F3D33F-E637-4861-BBE7-53E75AED2471@segment7.net> X-ML-Name: ruby-core X-Mail-Count: 15447 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-core-ctl@ruby-lang.org; help= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.10) Gecko/20070226 CentOS/1.0.8-0.2.el4.centos SeaMonkey/1.0.8 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on carbon.ruby-lang.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=7.0 tests=ARIN,AWL,BAYES_20, CONTENT_TYPE_PRESENT autolearn=disabled version=3.1.7 X-Original-To: ruby-core@ruby-lang.org X-YMail-OSG: YduYTDUVM1lTN209AnX4h5KEG.t_WHov3F48wUEkNZ4BSw2BDrVc_ls3spPWYId_DDn7cj2A9w-- X-Yahoo-Newman-Property: ymail-3 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-Id: ruby-core.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: Eric Hodel wrote: > On Feb 9, 2008, at 24:03 AM, Charles Thornton wrote: > >> OK - Here is the problem >> >> I want to modify 1.8.6 source to allow >> the printing of the completed T_NODE >> structure (the AST?) in my own format. >> >> I assume that I can write a Ruby Callable >> extension that can dump the T_NODE >> structure at the time of my call. >> >> Can this be done, and can someone >> give the bare essentials on how to do it. > > Look at the ParseTree gem. > > > > I have been looking a 'rubynode' . The problem is I don't have a clear idea of the actual structure of the AST. I assume that their is a tree structure of Nodes What I need to know is the BASIC outline of structures, the head ot the AST, and how NODES a linked or referenced. I know the a T_NODE object can point a other T_NODE object (u1,u2,u3), But beyond that I am floundering a bit. Chuck T.