embedding pascal [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
开发者_StackOverflow Improve this questionIs 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? (!)
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.
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
PaxCompiler can be embedded in C++ Builder. More info at http://www.paxcompiler.com.
NIH Image had a pascal like embedded language. Don't know if it is available, easily extractable, or useful for your purposes.
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.)
https://github.com/BenLand100/CPascal
You can extend it for what ever you are trying to build.
精彩评论