The task won't necessarily be easier with a parser. It is a very good excercise to write the parsing code yourself. Use recursion or a stack!