Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 52853 invoked from network); 29 Sep 2009 12:43:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Sep 2009 12:43:40 -0000 Received: (qmail 80867 invoked by uid 500); 29 Sep 2009 12:43:40 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 80801 invoked by uid 500); 29 Sep 2009 12:43:40 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 80788 invoked by uid 99); 29 Sep 2009 12:43:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Sep 2009 12:43:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Sep 2009 12:43:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 29482234C004 for ; Tue, 29 Sep 2009 05:43:16 -0700 (PDT) Message-ID: <1527684453.1254228196154.JavaMail.jira@brutus> Date: Tue, 29 Sep 2009 05:43:16 -0700 (PDT) From: =?utf-8?Q?Kay_R=C3=B6pke_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-791) Expose api for printing Abstract Syntax Trees in production (non-debug) servers In-Reply-To: <1565118498.1136324040773.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-791?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Kay R=C3=B6pke updated DERBY-791: ---------------------------- Attachment: ASTGrapher.java XmlTreeWalker.java Attached are an updated XmlTreeWalker and a Eclipse Zest visualization of t= he short class names of the AST. They are laid out in a tree fashion. Even though this mini application is far from perfect, it might be useful t= o someone. It should be trivial to add more information to the graph (like = operator names, literal values, etc). For XmlTreeWalker the only difference to Rick's version is that its execute= method will accept a visitor object instead of always using this (well, an= d the method is now public so ASTGrapher can access it). To compile this you need Zest from the Eclipse GEF project (and the RCP fea= tures). The easiest way to set up the Eclipse project is to create a new Ec= lipse RCP plugin project and then dropping in these two Java files. Run AST= Grapher.java as an Application (you do not need to start an entire RCP inst= ance). The RCP project only serves to properly set up the build path, nothing more= . > Expose api for printing Abstract Syntax Trees in production (non-debug) s= ervers > -------------------------------------------------------------------------= ------ > > Key: DERBY-791 > URL: https://issues.apache.org/jira/browse/DERBY-791 > Project: Derby > Issue Type: Improvement > Components: SQL > Reporter: Rick Hillegas > Attachments: ASTGrapher.java, derby-791-01-aa-fromListAndResultCo= lumnList.diff, XmlTreeWalker.java, XmlTreeWalker.java, XmlTreeWalker.java, = XmlTreeWalker.java, z.xml > > > Currently you can print Abstract Syntax Trees to derby.log by setting the= DumpParseTree tracepoint at server startup. E.g.: > java -cp $CLASSPATH -Dderby.debug.true=3DDumpParseTree -Dderby.stream.err= or.logSeverityLevel=3D0 org.apache.derby.tools.ij z.sql > This can be a useful debugging tool. However, it only works on debug serv= ers built with the following flags: > sanity=3Dtrue > debug=3Dtrue > We should provide some mechanism for printing these trees in production (= non-debug) servers. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.