mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
flex code modernization: Replace YY_EXTRA_TYPE define with flex option
Replace #define YY_EXTRA_TYPE with %option extra-type. The latter is the way recommended by the flex manual (available since flex 2.5.34). Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/eb6faeac-2a8a-4b69-9189-c33c520e5b7b@eisentraut.org
This commit is contained in:
@ -89,12 +89,6 @@ const uint16 ScanKeywordTokens[] = {
|
||||
*/
|
||||
#define YYSTYPE core_YYSTYPE
|
||||
|
||||
/*
|
||||
* Set the type of yyextra. All state variables used by the scanner should
|
||||
* be in yyextra, *not* statically allocated.
|
||||
*/
|
||||
#define YY_EXTRA_TYPE core_yy_extra_type *
|
||||
|
||||
/*
|
||||
* Each call to yylex must set yylloc to the location of the found token
|
||||
* (expressed as a byte offset from the start of the input text).
|
||||
@ -161,6 +155,7 @@ extern void core_yyset_column(int column_no, yyscan_t yyscanner);
|
||||
%option noyyfree
|
||||
%option warn
|
||||
%option prefix="core_yy"
|
||||
%option extra-type="core_yy_extra_type *"
|
||||
|
||||
/*
|
||||
* OK, here is a short description of lex/flex rules behavior.
|
||||
|
Reference in New Issue
Block a user