But as a programmer, if you know that you have to write a parser, you should take a few minutes to google it before writing the code and see if this isn't already a solved problem. And it is, essentially; there are so many parser libraries out there.
I can even speak from experience on that. In my internship during my first year of university, I found myself wanting to write a little parser to read config files for my program. It would have been something like "double myvalue = 42\nint myotherval = 20" etc. I figured this should be a very common problem, since so many programs use this kind of configuration. Googling it let me find even better, cross-platform config libraries which use the registry on windows or config files on other platforms, and saved me from writing the parser in the first place.
I can even speak from experience on that. In my internship during my first year of university, I found myself wanting to write a little parser to read config files for my program. It would have been something like "double myvalue = 42\nint myotherval = 20" etc. I figured this should be a very common problem, since so many programs use this kind of configuration. Googling it let me find even better, cross-platform config libraries which use the registry on windows or config files on other platforms, and saved me from writing the parser in the first place.