in reply to parse a query string

Do you mind saying what your overall goal is? Are you trying to analyze a pile of code? Write some sort of interface to a database?