diff options
author | Peter Eisentraut | 2025-01-06 08:47:58 +0000 |
---|---|---|
committer | Peter Eisentraut | 2025-01-06 08:47:58 +0000 |
commit | b1ef48980ddd082a90ed39aa5914af45e53059e6 (patch) | |
tree | 9d97adbc87951cdf5180c8b801a555c3d8a5776b /src/backend/parser | |
parent | 632384d0eb142f243fdd6059fde715319cfd05c9 (diff) |
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
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/scan.l | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l index 1d5dfe83125..8031a78b908 100644 --- a/src/backend/parser/scan.l +++ b/src/backend/parser/scan.l @@ -90,12 +90,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). * When we parse a token that requires multiple lexer rules to process, @@ -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. |