Original Post
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: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!
* 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}.