I have aquired a job in which my program has to read in a script file and decipher it. I know how to read in the file and read the lines, but I do not know how to search for certain keywords, values, brackets, etc.
For example:
//this would be the script file
header
[
<author: "decripit">
]
-object
<name: "object1">
<description: "object1 does stuff">
-end object
//end header file
I need to read in this file, check to see if the header is there, which I can do, and then look inside the header's scope (brackets) to find the author's name. How would I do that? I can look for the authors name, but I don't know how to do it inside a certain scope... does anyone else? I have to find out if the script has <> around the keywords and such.
I've read in and parsed file before, but not done functions like this. Any help would save me tons of frusteration and effort.
Thanks much,
For example:
//this would be the script file
header
[
<author: "decripit">
]
-object
<name: "object1">
<description: "object1 does stuff">
-end object
//end header file
I need to read in this file, check to see if the header is there, which I can do, and then look inside the header's scope (brackets) to find the author's name. How would I do that? I can look for the authors name, but I don't know how to do it inside a certain scope... does anyone else? I have to find out if the script has <> around the keywords and such.
I've read in and parsed file before, but not done functions like this. Any help would save me tons of frusteration and effort.
Thanks much,