Solved

Need code to parse script code in Delphi

Posted on 1998-10-02
5
258 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
Comment Utility
Could you elaborate on what kind of script you need?

Regards Jacco
0
 
LVL 1

Author Comment

by:Gerhard100198
Comment Utility
Edited text of question
0
 
LVL 2

Expert Comment

by:Thaddy
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

771 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

12 Experts available now in Live!

Get 1:1 Help Now