diff --git a/vendored/sqlite3-parser/third_party/lemon/lemon.c b/vendored/sqlite3-parser/third_party/lemon/lemon.c index d81d8e8a7..dec7efd25 100644 --- a/vendored/sqlite3-parser/third_party/lemon/lemon.c +++ b/vendored/sqlite3-parser/third_party/lemon/lemon.c @@ -4518,6 +4518,8 @@ void ReportTable( print_stack_union(out,lemp,&lineno); if( lemp->stacksize ){ fprintf(out,"const YYSTACKDEPTH: usize = %s;\n",lemp->stacksize); lineno++; + } else { + fprintf(out, "const YYSTACKDEPTH: usize = 128;\n"); lineno++; } if( lemp->errsym && lemp->errsym->useCnt ){ fprintf(out,"const YYERRORSYMBOL: YYCODETYPE = %d;\n",lemp->errsym->index); lineno++; diff --git a/vendored/sqlite3-parser/third_party/lemon/lempar.rs b/vendored/sqlite3-parser/third_party/lemon/lempar.rs index 8a0bef7cf..4bee616f4 100644 --- a/vendored/sqlite3-parser/third_party/lemon/lempar.rs +++ b/vendored/sqlite3-parser/third_party/lemon/lempar.rs @@ -285,7 +285,7 @@ impl yyParser<'_> { yyidx: 0, #[cfg(feature = "YYTRACKMAXSTACKDEPTH")] yyhwm: 0, - yystack: Vec::new(), + yystack: Vec::with_capacity(YYSTACKDEPTH), //#[cfg(not(feature = "YYNOERRORRECOVERY"))] yyerrcnt: -1, %% /* Optional %extra_context store */