def _reset_tokens(self):
        ''' Sets up the tokens for pyparsing '''

        # Somewhat of a hack, but we can only use printables if the delimiter is
        # just whitespace. Otherwise, some seprators (like ',' or '=') potentially
        # get parsed into the general string text. So, if we have non whitespace
        # delimiters, we need to fall back to just alphanums, and then add in any
        # missing but important symbols to parse.
        if self.delimiter.isspace():
            textchars = printables
        else:
            textchars = alphanums

            symbols = ['.', '/', '+', '*', '^', '(', ')', '[', ']', '=',
                       ':', ';', '?', '%', '&', '!', '#', '|', '<', '>',
                       '{', '}', '-', '_', '@', '$', '~']

            for symbol in symbols:
                if symbol not in self.delimiter:
                    textchars = textchars + symbol

        digits = Word(nums)
        dot = "."
        sign = oneOf("+ -")
        ee = CaselessLiteral('E') | CaselessLiteral('D')

        num_int = ToInteger(Combine( Optional(sign) + digits ))

        num_float = ToFloat(Combine( Optional(sign) +
                            ((digits + dot + Optional(digits)) |
                             (dot + digits)) +
                             Optional(ee + Optional(sign) + digits)
                            ))

        # special case for a float written like "3e5"
        mixed_exp = ToFloat(Combine( digits + ee + Optional(sign) + digits ))

        nan = ToInf(oneOf("Inf -Inf")) | \
              ToNan(oneOf("NaN nan NaN%  NaNQ NaNS qNaN sNaN " + \
                            "1.#SNAN 1.#QNAN -1.#IND"))

        string_text = Word(textchars)

        self.line_parse_token = ( OneOrMore( (nan | num_float | mixed_exp | num_int |
                                              string_text) ) )
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/filewrap.py/FileParser._reset_tokens/original