473,466 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Script Engine

Hi all,

Anybody knows where can I find some information about script engine theory?

I have the requirement:
Our product has some template files, and there placeholder/variabled
embedded inside template (like %CurrentTime%, %HoursRemaining% and so on).
There are also some other variables (like %Coupon%) whose value is based on
values of other variables.
For example
if (%HoursRemaining% < 5) {
%Coupon% = "Hello 1";
} else if (%HoursRemaining% < 10) {
%Coupon% = "Hello 2";
} else {
%Coupon% = "";
}

What we need is to build some generic solution to handle this type of
requirements, what I am thinking is to create some type of very simple
script to embed inside template.

So my question is, where can I start to build my script engine? Any
reference/sample I can look?

--
WWW: http://www.imagestation.com/members/hardywang
ICQ: 3359839
yours Hardy
Oct 11 '06 #1
1 2984

Hardy Wang napisal(a):
Hi all,

Anybody knows where can I find some information about script engine theory?
I have never heard of "script engine theory" but from what you've
written you need to know something about parsing theory. While the
topic, in its full extent, is quite tricky and requires a lot of
math/CS knowledge, your requirement is simple enough that you should
get away with just a good tool
I have the requirement:
Our product has some template files, and there placeholder/variabled
embedded inside template (like %CurrentTime%, %HoursRemaining% and so on).
There are also some other variables (like %Coupon%) whose value is based on
values of other variables.
For example
if (%HoursRemaining% < 5) {
%Coupon% = "Hello 1";
} else if (%HoursRemaining% < 10) {
%Coupon% = "Hello 2";
} else {
%Coupon% = "";
}

What we need is to build some generic solution to handle this type of
requirements, what I am thinking is to create some type of very simple
script to embed inside template.

So my question is, where can I start to build my script engine? Any
reference/sample I can look?
I'd recommend AntLr: http://www.antlr.org/ . It's been stable for quite
a long time, it also generates C# code, and in my opinion has gentle
learning curve. Read the docs, give yourself a minute of thinking and
go on. Good luck

Oct 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jianchiwei | last post by:
question: I run c:\python23\Lib\site-packages\win32comext\axscript\client\pyscript.py and it told me Registered: Python Registration of Python ActiveX Scripting Engine complete. But, when I...
5
by: Vince C. | last post by:
Hi. I'd like to trap ADO Recordset object events in my ASP script (either VBS or JS, no preference). I've tried (in VBS) writing a Sub rs_RecordChangeComplete( adReason, cRecords, pError,...
3
by: Ed Brandmark | last post by:
I have a tag of the form <SCRIPT LANGUAGE="JavaScript1.1" SRC="foo.js"..... and was wondering if this delays the loading of my page until that file foo.js downloads. It seems that if I place...
16
by: fernandez.dan | last post by:
Hey I'm sorry if this is not the appropriate news group for this question. I was wondering if anyone has any recommendation for embbedding a script engine in a c++ application. I want to feed my...
38
by: | last post by:
I have a script... ----- <SCRIPT language="JavaScript" type="text/javascript"> <!-- function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this = makeArray.arguments; } ...
1
by: Carl Waldbieser | last post by:
Has anyone had any experience embedding a CPython engine in a .NET application? In the COM/ActiveX world, it was pretty easy to use Mark Hammond's win32 modules to create a script engine component...
9
by: sam.s.kong | last post by:
Hello! I have a JavaScript code like the following. <script> var s = "</script>"; ....
1
by: Andrus | last post by:
I'm creating WinForms ERP application. This application need to run custom scripts in may places like: retrieving list of invoices before adding invoice before saving invoice after saving...
3
by: traceable1 | last post by:
Is there a way I can set up a SQL script to run when the instance starts up? SQL Server 2005 SP2 thanks!
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.