Writing Your Own Parser

Let's go back to our simple map and put the parsing code in a separate object which implements ContentParser.

Let's create a NarcissusParser. Then the rest of SimpleMap becomes … well … simple.


Exercises

  1. Implement the exportContent method of NarcissusParser.
  2. Add loading and saving of Narcissus format data to NeoDraw.

Next: XML Parser