def parse(self, s, fonts_object, fontsize, dpi):
self._state_stack = [self.State(fonts_object, '<STR_LIT:default>', '<STR_LIT>', fontsize, dpi)]<EOL>try:<EOL><INDENT>self._expression.parseString(s)<EOL><DEDENT>except ParseException as err:<EOL><INDENT>raise ValueError("<STR_LIT:\n>".join([<EOL>"<STR_LIT>",<EOL>err.line,<EOL>"<STR_LIT:U+0020>" * (err.column - <NUM_LIT:1>) + "<STR_LIT>",<EOL>str(err)]))<EOL><DEDENT>return self._expr<EOL>
Parse expression *s* using the given *fonts_object* for
output, at the given *fontsize* and *dpi*.

Returns the parse tree of :class:`Node` instances.