The BeanShell parser can be used to parse a script and then walk through the
abstract syntax tree. Unfortunately, all of the node objects have package
protected access, which means that you really cannot use this feature from user
code. Even the example in the documentation for the bsh.Parser class will not
work due to class protection.
I propose to change the protection to public for all nodes classes. In
addition, I would like one small change to the parser so that informal comments
are not skipped, but instead are included in comments nodes (just like JavaDoc
comments). This should not have any side effects.
One of the motivations for this is to develop two-way editing tools. Another
motivation is to investigate source code translation tools, perhaps to
automatically convert BeanShell scripts to other languages (like Groovy).
Original issue reported on code.google.com by moor...@gmail.com on 15 Oct 2010 at 7:07
Original issue reported on code.google.com by
moor...@gmail.com
on 15 Oct 2010 at 7:07