Original Post
Hi, I need to parse a text file and retrieve the items marked in [color="#FF8C00"]orange. I'd like to hear suggestions of what kind of algorithm or parsing tecnique I could use. Thanks for any help...
The file looks like this:
[color="#FF8C00"]prop waterpottop
{
storageOffset 0 0 0
objFileGeom 0 0 [color="#FF8C00"]:Runtime:Geometries:AM:AfricanVillage:craft:water pot cap.obj
}
[color="#FF8C00"]prop waterpot
{
storageOffset 0 0 0
objFileGeom 0 0 [color="#FF8C00"]:Runtime:Geometries:AM:AfricanVillage:craft:water pot.obj
}
prop waterpottop [color="#2E8B57"]// these are the properties related to the above "prop waterpottop"
{
propagatingScale Scale
{
name scale
[color="#FF8C00"]initValue 1
}
material [color="#FF8C00"]Water_Pot_Top
{
KdColor 0.980392 0.976471 0.996078 1
KaColor 0 0 0 0
KsColor 0.384314 0.384314 0.384314 0.2
textureMap "[color="#FF8C00"]:Runtime:textures:AM:AfricanVillage:craft:water-pot-top.jpg" 0 0
}
}
prop waterpot [color="#2E8B57"]// these are the properties related to the above "prop waterpot"
{
propagatingScale Scale
{
name scale
[color="#FF8C00"]initValue 1
}
material [color="#FF8C00"]Water_Pot
{
KdColor 0.980392 0.976471 0.996078 1
KaColor 0 0 0 0
KsColor 0.384314 0.384314 0.384314 0.2
textureMap "[color="#FF8C00"]:Runtime:textures:AM:AfricanVillage:craft:water-pot.jpg" 0 0
}
}
The file looks like this:
[color="#FF8C00"]prop waterpottop
{
storageOffset 0 0 0
objFileGeom 0 0 [color="#FF8C00"]:Runtime:Geometries:AM:AfricanVillage:craft:water pot cap.obj
}
[color="#FF8C00"]prop waterpot
{
storageOffset 0 0 0
objFileGeom 0 0 [color="#FF8C00"]:Runtime:Geometries:AM:AfricanVillage:craft:water pot.obj
}
prop waterpottop [color="#2E8B57"]// these are the properties related to the above "prop waterpottop"
{
propagatingScale Scale
{
name scale
[color="#FF8C00"]initValue 1
}
material [color="#FF8C00"]Water_Pot_Top
{
KdColor 0.980392 0.976471 0.996078 1
KaColor 0 0 0 0
KsColor 0.384314 0.384314 0.384314 0.2
textureMap "[color="#FF8C00"]:Runtime:textures:AM:AfricanVillage:craft:water-pot-top.jpg" 0 0
}
}
prop waterpot [color="#2E8B57"]// these are the properties related to the above "prop waterpot"
{
propagatingScale Scale
{
name scale
[color="#FF8C00"]initValue 1
}
material [color="#FF8C00"]Water_Pot
{
KdColor 0.980392 0.976471 0.996078 1
KaColor 0 0 0 0
KsColor 0.384314 0.384314 0.384314 0.2
textureMap "[color="#FF8C00"]:Runtime:textures:AM:AfricanVillage:craft:water-pot.jpg" 0 0
}
}