Re: [Pyparsing] Memory issues with 2.0.6
Brought to you by:
ptmcg
From: Will M. <wil...@gm...> - 2015-11-26 10:57:47
|
Hi Paul, Works for me. Thanks! Will On Wed, Nov 25, 2015 at 8:00 PM, Paul McGuire <pt...@au...> wrote: > For those who reported having memory and Unicode issues, if possible, > please > download the latest committed version of pyparsing from the SourceForge SVN > repo, and see if this resolves your issues. > > For the memory problem, it is probably not necessary to actually parse any > text, simply invoke the streamline() method on your top-level grammar > instance: > > parser.streamline() > > For the Unicode problems, you should stop seeing the UnicodeEncodeError > exceptions when creating your parser. > > Thanks for the feedback, everyone - if these changes work out, I'll follow > up with an actual 2.0.7 release in the next day or so. > > -- Paul > > > > -----Original Message----- > From: Martijn Vermaat [mailto:m.v...@lu...] > Sent: Tuesday, November 24, 2015 10:32 AM > To: pyp...@li... > Subject: Re: [Pyparsing] Memory issues with 2.0.6 > > Dear Paul and others, > > (Sorry for replying out of thread, I only just subscribed.) > > I can report the same problem with Pyparsing 2.0.6 on this grammar: > > https://github.com/mutalyzer/mutalyzer/blob/master/mutalyzer/grammar.py > > Memory usage continues to increase. > > best, > Martijn > > > > The problem is definitely in the "cosmetic-only" change to the > > returned error message for MatchFirst and Or (which also manifests as > > a Unicode error), and does not even require calling parseString, just > > streamline(). Thanks for the test case Will, I can repro the problem > > with it, but am trying to distill it down to a smaller case to add to > > my unit tests, and to work with in fixing the bug. > > > > For now, impatient users can comment out line 2354 in pyparsing.py: > > > > self.errmsg = "Expected " + str(self) > > > > > ---------------------------------------------------------------------------- > -- > Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users > amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple > OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 > _______________________________________________ > Pyparsing-users mailing list > Pyp...@li... > https://lists.sourceforge.net/lists/listinfo/pyparsing-users > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > -- Will McGugan http://www.willmcgugan.com |