more robust symbol parser