On 11/18/11 1:24 AM, "Jim Idle" <j...@temporal-wave.com> wrote:
Hi Jim, > You should not be seeing more than a few newPool calls, however, if you > are building a tree then this may be affecting it. You mean A) my own tree in the parser ? no, I do not build. Work ANTLR itself to build AST B) tree parser? but how this affect? and everybody need tree parser ... > The reuse stuff was not built for trees, Right. This is why in my Reuse() func you can see that I destroy tree parser, then it is created again later ... ************************************************** void SqlParser_v3::ResuseParserObjects( const char* inTextToParse, vuint32 inLength ) { // ------------------------------- // TREE PARSER cannot be reused. Destroy it. // if( mpTreeParser ) { mpTreeParser->free( mpTreeParser ); mpTreeParser = NULL; } if( mpNodes ) { mpNodes->free( mpNodes ); mpNodes = NULL; } // ------------------------------- // Reuse other objects // mpInput->reuse( mpInput, (pANTLR3_UINT8) inTextToParse, (ANTLR3_UINT32) inLength, (pANTLR3_UINT8) "VSQL" ); mpTokenStream->reset( mpTokenStream ); mpLexer ->reset( mpLexer ); mpParser ->reset( mpParser ); ResetOwnData( mpParser ); } > so you may have to debug this because I won't have time > to look at new use cases for some time. Yes, I am going now spend time to see how work parser->reset() and others here. But can you at least give me points, what I should see ? You set some flags for objects of parser? > I will take out the myriad duplication of function pointers over the new > year all being well. This is speed ok. But memory ... -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.