Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   advanced user output (http://www.programmingforums.org/showthread.php?t=13129)

l2u May 8th, 2007 12:03 PM

advanced user output
 
Hello

I want to allow user to use advanced output feature with my application. In other words I want to have some simple scripting language inside c++ application so that user could call c++ functions from this simple scripting language.

Is there anything similar available?
I know for boost python, but to embed python interpreter in c++ makes binary for about 1mb bigger. I want to keep my exe as smallest as possible.

User should be able to do something like this (for instance):

:

%c = random(2,5);
%b = "some text";
output = "this is" . %b . "... some random number: " . %c;


And when my c++ aplication would parse this script, it would make the output string:
"this is some text... some random number: 3"

Thanks for help

Game_Ender May 8th, 2007 4:01 PM

If you want to embed a small scripting language take a look a Lua, Squirrel, or AngelScript. You should be able to accomplish something simple with those languages.

l2u May 8th, 2007 5:09 PM

I hope there will be something in boost soon.

Game_Ender May 9th, 2007 2:04 PM

Boost.Python is great but it is not light weight, don't wait for Boost. All the libraries I listed only require a couple of lines of code to integrate in the way you want. Why don't you give something like Squirrel a try.

Seif May 9th, 2007 2:37 PM

lua is a good choice imho. sorry to slightly go off course a bit, but would you happen to recommend any good IDE's for lua, Game_Ender ?

Game_Ender May 9th, 2007 9:06 PM

Can't do that, I have not used any of the light weight alternatives listed above. I have only done some research on them and seen examples of there integration in other projects (Code::Blocks for example). I personally use Boost.Python (its what Python-Ogre uses). I do know that WGE (a C++ and Squirrel game engine) has integrated squirrel debugging.

Seif May 9th, 2007 9:16 PM

Aye same man. I'm writing an agent based modelling toolset for my final project, and was hoping to create custom states to be codable in lua script.... but alas times against me for that functionality.

still, its something i would like to implement after when i got some more time. I had a bash installing a couple of IDE's but had no joy what so ever.


All times are GMT -5. The time now is 2:22 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC