Re: BeanShell Dialects: proposal for future syntax extension mechanism... (Patrick Niemeyer)

Timothy Wall <[email protected]> Wed, 2 Feb 2005 08:00:05 -0500
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
In my context, I've got a parser separate from beanshell in order to do 
conversion of arguments from strings to actual objects, sort of a 
mini-eval.

For example, I want the user to be able to write scripts with simple 
string arguments instead of building more complex objects.

actionClick("mybutton", "(100, 100)");

I convert "mybutton" into a java.awt.Component through a complex lookup 
procedure ("mybutton" actually maps to an aggregate of attributes which 
are matched against existing Components to find an appropriate match), 
and "(100, 100)" (or some other location specification) into a custom 
Location class, which actually depends on the class of the Component in 
the first argument.

In this case, simply having a hook into argument evaluation (knowing 
the expected target class) would work.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl