Solved

Need code to parse script code in Delphi

Posted on 1998-10-02
5
260 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 83
How to debug For loops? 3 45
creating threads in delphi 1 82
Not able to call Delphi XE10 dll function from Delphi 6.0 4 17
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now