<div dir="ltr"><div class="gmail_extra">This story ended with writing handmade parser.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Seems that we've accidentially created some O(N^2) code in neotoma-generated parser, because small files are parsed quickly, but big files (50KB, 100KB and more) are parsed very slowly with our grammar.</div><div class="gmail_extra"><br></div><div class="gmail_extra">New handmade parser can parse in a linear time, something like 50 ms for a 200KB file when our neotoma grammar takes about 50 seconds or more.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Sean have looked at our PEG grammar and confirmed that we have made anti-optimal grammar that creates bad parser (right, Sean?).</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I've looked at alternatives (it is hard to find anything as convenient as neotoma, I think that it is most convenient) and had to refuse from leex + yacc, because we have already made syntax that has dependency in lexical parsing from semantic context (I suppose that it has).</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">So I've written in 2 days plain erlang code that just works on all our tests and all examples of user configs.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks again for all hints and help!</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>