def p_pretty_pos(self):
        "Print current line and a pretty cursor below. Used in error messages"
        col = self.p_current_col
        suffix = self.input[self.pos - col:]
        end = suffix.find("\n")
        if end != -1:
            suffix = suffix[:end]
        return "%s\n%s" % (suffix, "-" * col + "^")