Solved

Need code to parse script code in Delphi

Posted on 1998-10-02
5
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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