'Parse expression *s* using the given *fonts_object* for
output, at the given *fontsize* and *dpi*.
Returns the parse tree of :class:`Node` instances.'

def parse(self, s, fonts_object, fontsize, dpi):

    self._state_stack = [self.State(fonts_object, u'default', u'rm', fontsize, dpi)]
    self._em_width_cache = {}
    try:
        result = self._expression.parseString(s)
    except ParseBaseException as err:
        raise ValueError(u'\n'.join([u'', err.line, ((u'    ' * (err.column - 1)) + u'^'), six.text_type(err)]))
    self._state_stack = None
    self._em_width_cache = {}
    self._expression.resetCache()
    return result[0]
