Quantcast

[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
|  
Report Content as Inappropriate

[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.

Yours,

tom

$ 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 @@
                        parser.setRetainComments(true);
                        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
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Beanshell-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-developers
Loading...