Alright, so I've encounted a problem that my limited programming skills simply cannot solve, at least in an elegant fashion. I want to store the data from Valve KeyValues files, but I can't think of a good way of going about it. I'll illustrate the basic structure of the file format in this block of code.
"Key"
{
"Key"
{
"Key" "Value"
"Key" "Value"
}
"Key"
{
"Key" "Value"
"Key" "Value"
}
"Key" "Value"
"Key" "Value"
}
Each value can be one of a few types. Each key has to have a value with a certain type assigned to it. Wherever the key itself is located by change the type, but I doubt this. I can actually tokenize the file already, by keys, values, and brackets, so I don't need any help with that unless it's necessary. I'd like to create a system that isn't quick and dirty and relies on heavy amounts of repetitive code. If any of you have any questions, feel free to ask.