• Advertisement

Archived

This topic is now archived and is closed to further replies.

Scripting library

This topic is 6449 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I''m need to do a parser for my own scripting system to add AI to a RPG creator that I''m doing. Anyone knows of one (or more) libraries to do that (to understand the scripts)? Library for DJGPP and to understand C scripts. Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
I''m afraid that you''re on your own there, I suggest that you use the good old stdio.h , stdlib.h string.h functions for parsing your script. You could like have a function that parses one line of text and puts the strings in their variables etc, like it puts the "function" into the function string, var1 into the variable string etc, then you''d jsut check what function it is and pass the variables to it?

Sounds simple but you need to code it well and it might take a weekend...

Dæmin
(Dominik Grabiec)
sdgrab@eisa.net.au

CyberPunk RPG
http://www.eisa.net.au/~sdgrab/index.html

Share this post


Link to post
Share on other sites
Just looking for a parser ?
Run a search for "lex" and "yacc" in any search engine.

Be reading you,
David

Share this post


Link to post
Share on other sites
Well, actually i was talking about a library like SeeR (more or less). Just a library like it, not to do my own parser. Is it out there in the net?

Share this post


Link to post
Share on other sites
I do not understand. What is the SeeR library ?
If you are looking for a C interpreter, I am pretty sure there are some. You can start by looking for csh.
However, I am not sure I understand why anybody would like interpreted C.

Be reading you,
David

Share this post


Link to post
Share on other sites
Interpreted C could be useful in letting designers, or even end users customise your game, without needing a compiler, to to stop the game, etc.

Share this post


Link to post
Share on other sites
...and that's what I'm trying to do with my creator.

I haven't said it better!

What I'm trying to do is something like a mini-"compiler" for the creator, something like Quake-C, and that's the reason why I'm looking for a library to understand C scripts and let me do whatever I want in my creator without need of "real" C-compiler. I hope this is clear...

Edited by - TheDeath on May 26, 2000 12:00:32 PM

Share this post


Link to post
Share on other sites
Well, at first just interpreted, but if the library has the option to compile it (like SeeR - look in www.allegro.cc in ai & scripting), better!

Share this post


Link to post
Share on other sites
As was mentioned before, yacc and lex would be a good start. They''re a free lexxer and parser, which gets half your job done. Then all you need to do is write the code which actually executes the tokens from the script (a virtual machine).
As to the question of compiled vs. interpreted, it''s a fairly moot point. If you save the tokens, and later execute them directly, it''s compiled. If you parse the script, then execute the tokens, it''s interpretted. Big whoop, eh? You don''t have to create native code (in fact, I''d advise against it) in order to have a compiled language.

Share this post


Link to post
Share on other sites
Ok, I would REALLY like to use yacc (bison) and lex (flex) but, I NEED HELP ON USING IT! They look like a mess. Does anyone knows of a VERY easy tutorial? please! my ICQ is 69513633

Share this post


Link to post
Share on other sites

  • Advertisement