[PATCH] Print entire AST when "-p" option used

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[PATCH] Print entire AST when "-p" option used

Tom Copeland
Hello all -

Here's a small patch to the grammar which causes it to print the entire
AST when the "-p" parameter is passed in.



$ svn diff src/bsh/bsh.jjt
Index: src/bsh/bsh.jjt
--- src/bsh/bsh.jjt     (revision 41)
+++ src/bsh/bsh.jjt     (working copy)
@@ -159,7 +159,7 @@
                        while( !parser.Line()/*eof*/ )
                                if ( print )
System.out.println( parser.popNode() );
+                                       parser.popNode().dump("");

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
Beanshell-developers mailing list
[hidden email]