Has anyone ever implemented embedding a "virtual host" or "virual machine"
environment inside your C/C++ programs so that end-users could write small
snippets of customized code, compile it using your custom compiler, and if
the compiled byte-code file exists, it gets loaded and ran by the embedded
virtual host engine?
My thought was to develop a basic-like compiler system that the user could
write a file called TASKA.MSC which looks like:
// File: TASKA.MSC
// Simple Task A Example
Dim userdata as TUserData
Clear userdata
if GetUserData(userdata) then
// do something with the data
// specific to this end-user install
end if
Then run this through my compiler:
mysc.exe taska.msc
This would create something like taska.mxc which is a compiled byte-code
binary file of the instructions found in the 4GL base source file. The
virtual host environment would be inclusive inside my program or a DLL which
basically is a virtual machine environment that loads the MXC file, and runs
the binary version instead of having to verify the 4GL syntax, compile it,
and then run it. All the virtual environment does is execute it (very much
like java and its JVM).
Anyone have any thoughts on:
1) How to create such a compiler
2) How to create the host environment to execute the compiled binary?
Thanks
-- 4 2925
"ccrabfo" <cc*****@bellsouth.net> wrote Has anyone ever implemented embedding a "virtual host" or "virual machine" environment inside your C/C++ programs so that end-users could write small snippets of customized code, compile it using your custom compiler, and if the compiled byte-code file exists, it gets loaded and ran by the embedded virtual host engine?
...
Anyone have any thoughts on: 1) How to create such a compiler 2) How to create the host environment to execute the compiled binary?
A number of commercial and free solutions already exist. Commercial
solutions tend to emulate VBA and are fairly expensive. Free solutions
include embedding Perl, Python, LISP, or other freely available
interpreters.
If you want to implement this yourself, you'll save yourself a lot of hassle
if you write an interpreter instead of a compiler. How to do that, however,
is both off-topic for this newsgroup and beyond the reasonable scope for any
posting. You could start with the following book: http://search.barnesandnoble.com/boo...sbn=0471597538
Claudio Puviani
"ccrabfo" <cc*****@bellsouth.net> wrote Has anyone ever implemented embedding a "virtual host" or "virual machine" environment inside your C/C++ programs so that end-users could write small snippets of customized code, compile it using your custom compiler, and if the compiled byte-code file exists, it gets loaded and ran by the embedded virtual host engine?
...
Anyone have any thoughts on: 1) How to create such a compiler 2) How to create the host environment to execute the compiled binary?
A number of commercial and free solutions already exist. Commercial
solutions tend to emulate VBA and are fairly expensive. Free solutions
include embedding Perl, Python, LISP, or other freely available
interpreters.
If you want to implement this yourself, you'll save yourself a lot of hassle
if you write an interpreter instead of a compiler. How to do that, however,
is both off-topic for this newsgroup and beyond the reasonable scope for any
posting. You could start with the following book: http://search.barnesandnoble.com/boo...sbn=0471597538
Claudio Puviani
On Fri, 9 Apr 2004 15:11:40 -0400, ccrabfo <cc*****@bellsouth.net> wrote: Has anyone ever implemented embedding a "virtual host" or "virual machine" environment inside your C/C++ programs so that end-users could write small snippets of customized code, compile it using your custom compiler, and if the compiled byte-code file exists, it gets loaded and ran by the embedded virtual host engine?
Don't know what your exact requirements are but you could try LUA [1]
[1] http://www.lua.org/
--
Mike Higginbottom http://www.peak41.co.uk
On Fri, 9 Apr 2004 15:11:40 -0400, ccrabfo <cc*****@bellsouth.net> wrote: Has anyone ever implemented embedding a "virtual host" or "virual machine" environment inside your C/C++ programs so that end-users could write small snippets of customized code, compile it using your custom compiler, and if the compiled byte-code file exists, it gets loaded and ran by the embedded virtual host engine?
Don't know what your exact requirements are but you could try LUA [1]
[1] http://www.lua.org/
--
Mike Higginbottom http://www.peak41.co.uk This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tim Freeman |
last post by:
Doing an independent study with Dave Beazley this quarter, Atul Varma
has written a C compiler on his own in Python. It generates annotated
x86 assembly code from arbitrary C files.
Quoting...
|
by: ccrabfo |
last post by:
Has anyone ever implemented embedding a "virtual host" or "virual machine"
environment inside your C/C++ programs so that end-users could write small
snippets of customized code, compile it using...
|
by: Bjorn |
last post by:
I'm using interfaces in C++ by declaring classes with only pure virtual
methods. If then someone wants to implement the interface they
needs to inherit from the class. If the implementing class...
|
by: Mohd Hanafiah Abdullah |
last post by:
Axiomatic Solutions Sdn Bhd announces the availability of AMPC version 1.2.
You can purchase AMPC online now at:
http://www.axiomsol.com/hedesu/shopping/index.php
Major Changes
-------------...
|
by: Minti |
last post by:
Hi there everybody, I was just wondering that too many people choose
to use
language like Java because of its architecture independence, this AI
is
achieved because Java is as such a...
|
by: Ardhendu Nandan |
last post by:
I am trying to compile Gcc compiler in Windows O/S.I have downloaded
entire source Code of this compiler at tries to run it in DEVCPP but I
am gating some linker error and some header files missing...
|
by: Stu Carter |
last post by:
Hi,
ENV: Windows 2003 Server SP1 (+all updates), VS 2003, .Net 1.1 SP1
We've got an ASP.Net web application using State Service. All is fine until
we tried to use the app through a virtual...
|
by: Bunny.Joy |
last post by:
Hi,
I know that some granddaddy-level C++ compiler can compile C++ code
into a C intermediate. Apart from that, however, I can not find any
modern compiler to do that. And in fact, I think, this...
|
by: Henry |
last post by:
I am looking for a copy of Borland C++ 5.0.1. I have a project at work
that was written using this version, and cannot open the project files
with a later (or an earlier) version. If you know...
|
by: ckmoied |
last post by:
Hi guys,
I want to know if there is any checklist available that one can follow before moving the databases from one server to another one.
I am a newbie in SQL stuff and facing the following...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |