VB6 Parser/Lexer/Scripter

£可爱£侵袭症+ 提交于 2019-12-03 09:01:32
Hans Olsson

If you're willing to use VBScript rather than VB6 you might be able to just use the MSScriptControl to run the commands rather than creating your own. Here's an article discussing using it from a .Net app, though it's an ActiveX control so should give you quite a bit of flexibility.

The control can be downloaded from here.

Use the Microsoft® Windows® Script Control because it is easy to integrate into existing VB6 applications. The control supports VBScript, JScript, or any other "Active Script" implementation.

I have used the Windows Script Control in four projects and it works extremely well. Very easy to integrate. I wish Microsoft would have given us a replacement in .NET, and made it as easy to use. (I understand the control is not needed in .NET, but having the ability to simply create an object that handles everything is nice.)

Windows Script Control

The Microsoft® Windows® Script Control is an ActiveX® control that provides developers with an easy way to make their applications scriptable. This, in turn, enables users to extend application functionality through scripts, much as they do with macros today.

lhf

Unless you're doing it for your own instruction, you may want to try using Lua: VB6 - Lua Integration

Dario

I've actually seen some quite reasonable implementations of compilers/interpreters in VB6[1] - It's not the language I would choose (few functional features, insufficent static type system), but with experience, you can outweigh these drawbacks and be quite productive - So why not.

You can use the GOLD parser generator that supports VB6 as a start.

[1]: Somewhere on PSC or in this download repository I think ...

Note that there is the MSScriptControl too.

rlb.usa

There also appears to be an additonal alternative for VB6:

SadScript is an variant of VB6 most prominently used for VB6 as an scripting engine in MMORPGS .

See here for more : What is sadscript? Can I use it in vb.net? Why hasn't anyone I have asked heard of it?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!