8

Is anyone aware of a Pascal interpreter/compiler which is embeddable in C++ (or anything else other than Pascal) applications? I am cloning (for lack of a better word) an application which uses an Object-Pascal compatible scripting language and needs to be script compatible. Am I going to end up writing an interpreter? (!)

Sam P
  • 131
  • 3
  • So, do you want the Pascal to execute as a runtime script (like a Visual Basic script) or as a compiled library (DLL or .so) that is dynamically loaded, plugin-style? I.e. are you wanting to interpret Pascal at runtime (like Tcl or Scheme), or compile it and execute the binary? – Mike DeSimone Mar 24 '10 at 02:04

6 Answers6

2

There's RemObjects Pascal Script. You can probably call it from C++ Builder.

Pascal Script is a free scripting engine that allows you to use most of the Object Pascal language within your Delphi or Free Pascal projects at runtime.

There's also TMS Scripter Studio.

By building scripting support into your applications, you can provide a high degree of configurability, flexibility and automation control in your applications.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319
2

I think the question is about interpreter/compiler of a language for application user to program and run, if it is the case I may suggest Lua or Pascal Script. Sorry for lack of links, but points are required for that.

EDIT: Fixed links and Lua spelling

too
  • 3,009
  • 4
  • 37
  • 51
1

PaxCompiler can be embedded in C++ Builder. More info at http://www.paxcompiler.com.

avra
  • 3,690
  • 19
  • 19
0

NIH Image had a pascal like embedded language. Don't know if it is available, easily extractable, or useful for your purposes.

dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
0

The Free Pascal compiler supports Object Pascal and it says you can call a Pascal library from a C program. With luck this will be as good as embedding.

That what you're looking for? (If not, you can translate Standard Pascal to C with p2c, a Pascal-to-C translator that is available from Debian, among other places. But having used p2c, I can't recommend it, and I don't think it understands Object Pascal.)

Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
0

https://github.com/BenLand100/CPascal

You can extend it for what ever you are trying to build.

Ozz Nixon
  • 159
  • 1
  • 8