I have a document in this form, and I'm trying to create new objects based on this info.<br><br>(note: this is not Java code, but rather a text file. I'll explain it all after.)<br><br>Class1 {<br> id: 123<br> serialNumber: 456<br> name: myClass1Object<br> followers: Class2 {<br> id: 456<br> serialNumber: 789<br> name: myClass2Object<br> followers: Class3 {<br> id: 456<br> serialNumber: 789<br> name: myClass2Object<br> }<br> }<br> followers: Class2 {<br> id: 321<br> serialNumber: 654<br> name: myClass2Object2<br> }<br>}<br><br>This text file is an interpretation of a object heirarchy. I have 3 different classes. For the purposes of the question, they are all seemingly identical. They have 4 different fields; the "followers" field returns a Vector. In this example, the Class1 object has a "followers" vector with two Class2 objects in it; the first Class2 object has one Class3 object in it.<br><br>I need to write a parser; probably recursive. This parser will read the series of brackets and instantiate new objects of whatever type they are (for example, the first line should make the program instantiate a new object of type Class1).<br><br>I can make use of either StreamTokenizer or StringTokenizer (or anything else that fits my needs, but I can't think of anything). I might end up using both.<br><br>I'm feeling hard pressed for where to start- I have a general idea, but my mind is getting fuzzy on implementation. Anybody have any ideas? Hopefully I'll have this settled before any replies come in... but just in case. ) <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
light the world, and bring depth to the silence."