Jump to content
  • Advertisement
Sign in to follow this  
Yore

Scripting language and data structure

This topic is 4460 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

I've been bashing my head trying to figure out how to best sort this problem out, but I figured I'd get some input from experts! I'm building a program that truly centers on an interpreted language. The language engages the program and tells it what to do. That being said, this script that people will create has a self-defined language to it, and I wish to load this entire script into memory. The script is designed to be as user-friendly as possible, so it has a very English feel to it. What is currently happening is I'm running through and "cracking" important parameters out of the script and trying to store them, which leads to the problem. I'm having trouble deciding which data structure I should use to store these "cracked" parameters in. I've thought about a tree, but the accessing code seems messy. Does anyone else have any ideas? I'll post an example of the scripting language and explain how I've been thinking of doing it!
Quote:
* Startup initialization. (0:0) When everything is starting up, (4:0) retrieve the data from the file located at {stuff.ini}. (4:1) connect the software to {127.0.0.1}.
How this is currently, I need to take the beginning codes for each line [(0:0), (4:0), (4:1)] and store them with the proper parameters, which are located in brackets. I've tried storing the important values in multiple vectors that seem much like a tree, but accessing the parameters and the code ID seem very messy. Does anyone else have any ideas as to how they would store this type of script into memory for fast accessing? Thank you in advance!

Share this post


Link to post
Share on other sites
Advertisement
I don't entirely understand your problem. How are you deriving those beginning codes? What do they mean and what relevance do they have to the parameters? How many parameters are you likely to have? Why did you think to try and use a tree?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!