Solved

Need code to parse script code in Delphi

Posted on 1998-10-02
5
267 Views
Last Modified: 2010-04-06
I need working source code for a Delphi scripting parser.

In the simplest form I would like to be able to create variable in the script and run functions and procedures

Example:

x := 1;
y := 'Nothing';
z := Copy(y, x, 4);
Result := z;

Idealy I would like to be able to define functions in the script similar to what we do in Delphi

Example:

ScriptStart;

TempStr := 'This is a test string';

TempStr := MyCopy(TempStr);

Result := TempStr;

function Mycopy(S: String): String;
begin
  Result := Copy(S,3,3);
end;

ScriptEnd;
0
Comment
Question by:Gerhard100198
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Jacco
ID: 1341488
Could you elaborate on what kind of script you need?

Regards Jacco
0
 
LVL 1

Author Comment

by:Gerhard100198
ID: 1341489
Edited text of question
0
 
LVL 2

Expert Comment

by:Thaddy
ID: 1341490
What do you mean? a Delphi scripting parser?
Sergey Kurinn et al. have written a freeware delphi interpreter that's more than pretty good. www.dreamcompany.com
If you mean windows scripting host (vb/jscript a.o.) then I've written an article about how to use the msscript.ocx control with delphi in sdgn magazine (in dutch, code commented in english). It's not a parser, but it enables you to integrate scripting in your applications pretty seamlessly. If you want the code just mail me (thaddy@cyco.nl)
Also, if you want a really GREAT scripting engine with sourcecode,including multiple parsers:delphi, vb, sql,perl,jscript, the afore mentioned Sergey et. al. have written it( not the freeware, but far more than that). Just pay him $395 and it saves you at least a month's work.(dream scripter)


0
 
LVL 1

Author Comment

by:Gerhard100198
ID: 1341491
Thaddy, you've mentioned a freeware version of DreamScripter. I've been to their home page but see only reference to an evaluation version.
0
 
LVL 2

Accepted Solution

by:
Thaddy earned 20 total points
ID: 1341492
http://www.torry.ru/vcl/vcltools/delphin.zip
is the complete freeware delphi parser with source.
If you want to use vbscript or javascript instead, mail me and I'll give you the source to my article
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question