SQLite Forum

Lemon generates code that does not build with NDEBUG defined.
Login
PS, I ended up patching it like this:

    diff --git a/lempar.c b/lempar.c
    index d5ebe69..0e7175a 100644
    --- a/lempar.c
    +++ b/lempar.c
    @@ -230,6 +230,10 @@ static FILE *yyTraceFILE = 0;
     static char *yyTracePrompt = 0;
     #endif /* NDEBUG */
     
    +#ifndef assert
    +#define assert(x)
    +#endif
    +
     #ifndef NDEBUG
     /* 
     ** Turn parser tracing on by giving a stream to which to write the trace
    @@ -882,8 +886,8 @@ void Parse(
         yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
         if( yyact >= YY_MIN_REDUCE ){
           unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
    -      assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
     #ifndef NDEBUG
    +      assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
           if( yyTraceFILE ){
             int yysize = yyRuleInfoNRhs[yyruleno];
             if( yysize ){

Christian