db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kay Röpke (JIRA) <j...@apache.org>
Subject [jira] Updated: (DERBY-791) Expose api for printing Abstract Syntax Trees in production (non-debug) servers
Date Tue, 29 Sep 2009 12:43:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kay Röpke updated DERBY-791:
----------------------------

    Attachment: ASTGrapher.java
                XmlTreeWalker.java

Attached are an updated XmlTreeWalker and a Eclipse Zest visualization of the 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 to 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, and the method is now public so ASTGrapher
can access it).

To compile this you need Zest from the Eclipse GEF project (and the RCP features). The easiest
way to set up the Eclipse project is to create a new Eclipse RCP plugin project and then dropping
in these two Java files. Run ASTGrapher.java as an Application (you do not need to start an
entire RCP instance).
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) servers
> -------------------------------------------------------------------------------
>
>                 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-fromListAndResultColumnList.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=DumpParseTree -Dderby.stream.error.logSeverityLevel=0
org.apache.derby.tools.ij  z.sql
> This can be a useful debugging tool. However, it only works on debug servers built with
the following flags:
> sanity=true
> debug=true
> We should provide some mechanism for printing these trees in production (non-debug) servers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message