Archived

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

Samith

Writing a scripting engine

Recommended Posts

Samith    2460
The tutorials for doing this on flipCode seem pretty good, but they use a tool called "flex" and "bison" and I''m not sure how good it is to use this. Is it just standard that anyone who is writing a scripting engine uses these, or should I learn to make my own lexical analyzer?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
First of all, stay away from implementing your own scripting
language since there are very powerful, robust and widely used
ones available (e.g. Lua, Ruby, Python, various flavours of C, ...).

If you decide to write your own language anyway, then you
<b>should</b> use flex and bison. Writing your own lexical
parser is one step on the long road leading to your own
scripting language (you will also need a virtual machine,
a compiler or an interpreter).

I honestly don''t see any reason in wasting your time with
writing yet-another-scripting-language, put aside the
educational aspects of course

Share this post


Link to post
Share on other sites
JasonA    152
From what I''ve heard, LUA seems to be one of the best. I plan to learn it as well, and there are some great tutorials about it on this site.

Share this post


Link to post
Share on other sites
Samith    2460
I don''t really want to make my own language, really I just want to be able to script events in a game or something, maybe even something Unreal Tournament-ish, where I can script certain functions for things in a game (like, in an RTS, maybe I would have each unit have it''s own script for movement/attacking, so I can get unique units without having to hardcode each units attack functions or whatever)

Share this post


Link to post
Share on other sites