Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Writing a Script Parser

Author
Message
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 15th Oct 2008 01:19 Edited at: 15th Oct 2008 03:19
Here's a thread tracking the progress of Kaos-Script, revision 2.

Starting from scratch, using std::vector and an "explode" function (like PHP's), and files.

Syntax:

Seperated into "blocks" of variables. Very simple, but I will implement functions later, if I can.

Variables are simple as well. Left side of an "=" sign is the variable name (any characters), right side is what it is. No type definitions, sorry. You can use Block.GetFloat/Int/String.

Three basic types are supported, float, int, and string.

Variables are seperated by ;. The parser will filter out new lines and tabs.

Anything outside the blocks are ignored. Everything must be in a block.

Very high level programmer's interface. Basically, you create a KaosScript object and give it a file, it generates a std::vector of blocks, you can then do kaosscript.GetBlock("block name").GetInt("variable name") and so on.

CC is welcome.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 15th Oct 2008 01:26 Edited at: 15th Oct 2008 01:28
Here's a sample of Kaos-Script.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 15th Oct 2008 03:02
I like it! I've been thinking about working on some scripting for ObjectGDK, so this could inspire me.

Login to post a reply

Server time is: 2024-09-30 09:32:04
Your offset time is: 2024-09-30 09:32:04