473,388 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 2978

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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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...
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...
0
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 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.