MCPcopy Create free account
hub / github.com/activeloopai/deeplake / yylex_destroy

Function yylex_destroy

cpp/3rd_party/sql-parser/src/parser/flex_lexer.cpp:5061–5088  ·  view source on GitHub ↗

yylex_destroy is for both reentrant and non-reentrant scanners. */

Source from the content-addressed store, hash-verified

5059
5060/* yylex_destroy is for both reentrant and non-reentrant scanners. */
5061int yylex_destroy (yyscan_t yyscanner)
5062{
5063 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
5064
5065 /* Pop the buffer stack, destroying each element. */
5066 while(YY_CURRENT_BUFFER){
5067 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
5068 YY_CURRENT_BUFFER_LVALUE = NULL;
5069 yypop_buffer_state(yyscanner);
5070 }
5071
5072 /* Destroy the stack itself. */
5073 yyfree(yyg->yy_buffer_stack , yyscanner);
5074 yyg->yy_buffer_stack = NULL;
5075
5076 /* Destroy the start condition stack. */
5077 yyfree( yyg->yy_start_stack , yyscanner );
5078 yyg->yy_start_stack = NULL;
5079
5080 /* Reset the globals. This is important in a non-reentrant scanner so the next time
5081 * yylex() is called, initialization will occur. */
5082 yy_init_globals( yyscanner);
5083
5084 /* Destroy the main struct (reentrant only). */
5085 yyfree ( yyscanner , yyscanner );
5086 yyscanner = NULL;
5087 return 0;
5088}
5089
5090/*
5091 * Internal utility routines.

Callers

nothing calls this directly

Calls 4

yy_delete_bufferFunction · 0.85
yypop_buffer_stateFunction · 0.85
yyfreeFunction · 0.85
yy_init_globalsFunction · 0.85

Tested by

no test coverage detected