views:

118

answers:

5
+6  Q: 

embedding pascal

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? (!)

+1  A: 

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.

eed3si9n
A: 

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

dmckee
A: 

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
Not even close! Note that FPC is mostly GCC callable. If it is callable from other C compilers depends on their abilities
Marco van de Voort
+1  A: 

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
It's spelt Lua, not LUA.
lhf
A: 

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

avra