@@ -34,8 +34,6 @@ extern YYSTYPE base_yylval;
34
34
35
35
static int xcdepth = 0 ; /* depth of nesting in slash-star comments */
36
36
static char *dolqstart = NULL ; /* current $foo$ quote start string */
37
- static YY_BUFFER_STATE scanbufhandle;
38
- static char *scanbuf;
39
37
40
38
/*
41
39
* literalbuf is used to accumulate literal values when multiple rules
@@ -1436,7 +1434,7 @@ lex_init(void)
1436
1434
if (literalbuf == NULL )
1437
1435
{
1438
1436
literalalloc = 1024 ;
1439
- literalbuf = (char *) malloc (literalalloc);
1437
+ literalbuf = (char *) mm_alloc (literalalloc);
1440
1438
}
1441
1439
startlit ();
1442
1440
@@ -1664,44 +1662,3 @@ static bool isinformixdefine(void)
1664
1662
1665
1663
return false ;
1666
1664
}
1667
-
1668
- /*
1669
- * Called before any actual parsing is done
1670
- */
1671
- void
1672
- scanner_init (const char *str)
1673
- {
1674
- Size slen = strlen (str);
1675
-
1676
- /*
1677
- * Might be left over after ereport()
1678
- */
1679
- if (YY_CURRENT_BUFFER)
1680
- yy_delete_buffer (YY_CURRENT_BUFFER);
1681
-
1682
- /*
1683
- * Make a scan buffer with special termination needed by flex.
1684
- */
1685
- scanbuf = mm_alloc (slen + 2 );
1686
- memcpy (scanbuf, str, slen);
1687
- scanbuf[slen] = scanbuf[slen + 1 ] = YY_END_OF_BUFFER_CHAR;
1688
- scanbufhandle = yy_scan_buffer (scanbuf, slen + 2 );
1689
-
1690
- /* initialize literal buffer to a reasonable but expansible size */
1691
- literalalloc = 128 ;
1692
- literalbuf = (char *) mm_alloc (literalalloc);
1693
- startlit ();
1694
-
1695
- BEGIN (INITIAL);
1696
- }
1697
-
1698
-
1699
- /*
1700
- * Called after parsing is done to clean up after scanner_init()
1701
- */
1702
- void
1703
- scanner_finish (void )
1704
- {
1705
- yy_delete_buffer (scanbufhandle);
1706
- free (scanbuf);
1707
- }
0 commit comments