You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2013/01/11 20:34:14 UTC
[jira] [Updated] (DERBY-4415) Make it easy to plug custom AST
printers into the compiler
[ https://issues.apache.org/jira/browse/DERBY-4415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Hillegas updated DERBY-4415:
---------------------------------
Attachment: ASTInspector.java
Attaching a new version of the ASTInspector. This version was tweaked to function as a custom, optional tool. If other people find this tool to be useful, we could productize it and document it. To load and unload the XmlASTPrinter, you now do the following:
call syscs_util.syscs_register_tool( 'customTool', true, 'ASTInspector', 'XmlASTPrinter' );
call syscs_util.syscs_register_tool( 'customTool', false, 'ASTInspector' );
Here's a little script which shows how to use this tool:
connect 'jdbc:derby:memory:dummy;create=true';
create table t( a int );
call syscs_util.syscs_register_tool( 'customTool', true, 'ASTInspector', 'XmlASTPrinter' );
select * from t;
call syscs_util.syscs_register_tool( 'customTool', false, 'ASTInspector' );
-- now look for the output in derbyAST.xml
> Make it easy to plug custom AST printers into the compiler
> ----------------------------------------------------------
>
> Key: DERBY-4415
> URL: https://issues.apache.org/jira/browse/DERBY-4415
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Priority: Minor
> Fix For: 10.6.1.0
>
> Attachments: ASTInspector.java, ASTInspector.java, ASTInspector.java, derby-4415-01-aa-customASTprinters.diff, derby-4415-01-ab-customASTprinters.diff, XmlASTPrinter.java, XmlASTPrinter.java, XmlASTPrinter.java, XmlASTPrinter.java
>
>
> It would be nice to be able to tell the compiler to use user-written formatters for pretty-printing Derby's abstract syntax trees. For instance, it would be nice to be able to plug in the AST printers attached to DERBY-791, including the Eclipse-based tree grapher written by Kay Röpke.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira