mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +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:
@@ -52,12 +52,6 @@
|
||||
*/
|
||||
typedef int YYSTYPE;
|
||||
|
||||
/*
|
||||
* Set the type of yyextra; we use it as a pointer back to the containing
|
||||
* PsqlScanState.
|
||||
*/
|
||||
#define YY_EXTRA_TYPE PsqlScanState
|
||||
|
||||
|
||||
/* Return values from yylex() */
|
||||
#define LEXRES_EOL 0 /* end of input */
|
||||
@@ -89,6 +83,12 @@ extern void psql_yyset_column(int column_no, yyscan_t yyscanner);
|
||||
%option warn
|
||||
%option prefix="psql_yy"
|
||||
|
||||
/*
|
||||
* Set the type of yyextra; we use it as a pointer back to the containing
|
||||
* PsqlScanState.
|
||||
*/
|
||||
%option extra-type="PsqlScanState"
|
||||
|
||||
/*
|
||||
* All of the following definitions and rules should exactly match
|
||||
* src/backend/parser/scan.l so far as the flex patterns are concerned.
|
||||
|
||||
Reference in New Issue
Block a user