Cut the crap. Use pegjs for parsing.