Hi all,
I have a bunch of .vbs files that are currently executed,
server-side, from C++ apps. We're in the process of porting
it to Java. The VBScript scripts are changing independently
of the rest of the code base, and much more frequently. They
are pretty straightforward, involving some formulas and
calculations.
Currently we have a very simple translator that converts
vbs into Java classes, but it's lacking (mostly, it's
not a true parser, so it screws up operator precedence).
The goal would be accomplished by any one of the following,
so I'd like suggestions:
1. A VBScript engine/interpreter in pure Java
2. A VBScript-to-Javascript converter (platform independence
is not an issue here, since it'll only be done in
development environment), so that then I can use Rhino
(mozilla's Javascript engine) to run it.
2a. In fact, a VBScript-to-any-other-script converter,
such that a pure Java interpreter exists for that other
script.
3. A VBScript parser I can use to translate
VBScript to Java.
Thanks.
sali - 08 Aug 2005 20:56 GMT
> Hi all,
>
[quoted text clipped - 8 lines]
> vbs into Java classes, but it's lacking (mostly, it's
> not a true parser, so it screws up operator precedence).
if the operator precedence handling is the main fault, why don't use some
intermediate tool just to fill enough levels of "()" to force right
evaluation order? when have them inserted it is easy to follow resolution
order.
> The goal would be accomplished by any one of the following,
> so I'd like suggestions:
[quoted text clipped - 14 lines]
>
> Thanks.
Ira Baxter - 20 Aug 2005 17:41 GMT
> I have a bunch of .vbs files that are currently executed,
> server-side, from C++ apps. We're in the process of porting
[quoted text clipped - 23 lines]
> 3. A VBScript parser I can use to translate
> VBScript to Java.
Our DMS Software Reengineering Toolkit is used to construct
such translators. It has a VBScript front end (full parser)
and a Java back-end. All you need to do is write the translation rules :-}
These are written in source to source format
("if you see this pattern, transform it to that") where the patterns
are surface syntax over the abstract syntax trees.
See http://www.semanticdesigns.com/Products/Front Ends

Signature
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com