Thank you for your reply ! It seems that we already have something done, after your suggestion I looked at the sqlite3 sources and found this function:
#ifndef NDEBUG /* ** Turn parser tracing on by giving a stream to which to write the trace ** and a prompt to preface each trace message.? Tracing is turned off ** by making either argument NULL ** ** Inputs: ** <ul> ** <li> A FILE* to which trace output should be written. **????? If NULL, then tracing is turned off. ** <li> A prefix string written at the beginning of every **????? line of trace output.? If NULL, then tracing is **????? turned off. ** </ul> ** ** Outputs: ** None. */ void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){ ? yyTraceFILE = TraceFILE; ? yyTracePrompt = zTracePrompt; ? if( yyTraceFILE==0 ) yyTracePrompt = 0; ? else if( yyTracePrompt==0 ) yyTraceFILE = 0; } #endif /* NDEBUG */ Maybe it can be a possible answer for the original question ? Anyone used it ? What's it's output like ? Cheers ! ? > Mon Jan 18 2016 3:36:05 pm CET CET from "Simon Slavin" ><slavins at bigfraud.org> Subject: Re: [sqlite] Wish list: allow developers >use >the power ofsqliteparser > > On 18 Jan 2016, at 2:20pm, Domingo Alvarez Duarte ><sqlite-mail at dev.dadbiz.es> wrote: > > >>Can we have something that do not remove your freedom and can provide a way >> to reuse the parser power ? >> > In the amalgamation source code you will find > > /* > ** The interface to the LEMON-generated parser > */ > SQLITE_PRIVATE void *sqlite3ParserAlloc(void*(*)(u64)); > SQLITE_PRIVATE void sqlite3ParserFree(void*, void(*)(void*)); > SQLITE_PRIVATE void sqlite3Parser(void*, int, Token, Parse*); > #ifdef YYTRACKMAXSTACKDEPTH > SQLITE_PRIVATE int sqlite3ParserStackPeak(void*); > #endif > > If you remove the PRIVATE from these declarations, you can call the >functions yourself and have access to the same parser that SQLite uses. > > Simon > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > ?