Re: Re: BeanShell Dialects: proposal for future syntax extension mechanism... (Patrick Niemeyer)
Alexey Zinger <inline_four-/[email protected]> Wed, 2 Feb 2005 10:38:43 -0800 (PST)
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, I suspect most people do something like this preprocessing technique. In my own spreadsheet app, I easily isolate my own stuff to preprocess using special syntax that does not conflict with Bean Shell or straight Java. It would of course be nice if there was a way to preprocess as a syntax hook to the scripting engine. --- Timothy Wall <[email protected]> wrote: > 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 > _______________________________________________ > Beanshell-developers mailing list > Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/beanshell-developers > ===== Alexey Briggs & Stratton 1988 Kawasaki EX500 (CCS) http://bsheet.sourceforge.net __________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com ------------------------------------------------------- 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