Archived

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

masterconjurer

Creating a Scripting Language

Recommended Posts

u could make a VERY slow scripting language in VB, and i really doubt a Compiler is Possible seeing VB is kinda a scripting language as it iz.

Learn C++ man, whey smoother, its pretty easy to get into, just dont give up at pointers and ur gonna be sweet =)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.gamedev.net/reference/articles/article1633.asp

There are also several other articles that deal with scripting in the "Articles and Resources" section on this website. Check them out.

Share this post


Link to post
Share on other sites
quote:
Original post by: silvermace
and i really doubt a Compiler is Possible seeing VB is kinda a scripting language as it iz



You can write a compiler in any language you like, all you''re doing is converting one type of file into another (i.e. source code in machine language). There''s no reason why you couldn''t write a C++ compiler in COBOL, for example. The code your program compiles won''t be any slower, because the generated code has nothing whatsoever to do with the language the compiler was written in.



codeka.com - Just click it.

Share this post


Link to post
Share on other sites
I am playing around with scripting some AI behaviour and other stuff in a 3d world. The bulk of the program is written in C++ but uses lua for the scripted components.

Lua is designed to be embedded, is easy to use, and will probably be a hell of a lot more fun than writing your own.

Share this post


Link to post
Share on other sites
If you want to implement your own scripting engine, then go to the tutorials section on flipcode.com, and there is a whole series (8 part''s i think) that shows you the steps needed to implement one. If its ok to use third party libraries, then you can go with lua etc. If you are working on a university project and have to do everything on your own (like in my case), then those tutorials will be helpfull.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I didn''t check out the links provided by the other posters here, but personally I like the tools Lex (or Flex) and Yacc (or Bison). You use those tools to define the syntax of your language and to control the parsing. These tools generate C code that you can include in whatever project you need it in.

Besides the C++ compiler itself, I''d say these tools have been the most useful to me in my work as a SW engineer! Every programmer should know how to use them! Besides creating your own language, they are very useful whenever structured files need to be parsed for whatever purpose.

Share this post


Link to post
Share on other sites