diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-12-11 14:54:25 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-12-11 14:54:25 -0500 |
commit | 89d1dfa49aaff7c0b90de2c91dbb314e1a57eb62 (patch) | |
tree | 8103fe349f6a7db9c367b04ce9180c28a243b005 /src/interfaces/ecpg/preproc/extern.h | |
parent | c8bfe055be9c688d7084546245c59f7f12a7c606 (diff) |
Use "%option prefix" to set API names in ecpg's lexer.
Clean up some technical debt left behind by commit 72b1e3a21: instead of
quickly hacking the name of base_yylex() with a #define, set it properly
with "%option prefix". This causes the names of pgc.l's other exported
symbols to change as well, so run around and modify the outside references
to them as needed. Similarly, make pgc.l's external references to
base_yylval use that variable's true name instead of a macro.
The reason for doing this now is that the quick-hack solution will fail
with future versions of flex, as reported by Дилян Палаузов.
Hence, back-patch into 9.6 where the previous commit appeared, since
it's likely people will build 9.6 with newer flex versions during
its lifetime.
Discussion: https://postgr.es/m/d845c1af-e18d-6651-178f-9f08cdf37e10@aegee.org
Diffstat (limited to 'src/interfaces/ecpg/preproc/extern.h')
-rw-r--r-- | src/interfaces/ecpg/preproc/extern.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/preproc/extern.h b/src/interfaces/ecpg/preproc/extern.h index f6841726e4a..0ce3a6e4248 100644 --- a/src/interfaces/ecpg/preproc/extern.h +++ b/src/interfaces/ecpg/preproc/extern.h @@ -35,15 +35,15 @@ extern char *descriptor_index; extern char *descriptor_name; extern char *connection; extern char *input_filename; -extern char *yytext, +extern char *base_yytext, *token_start; #ifdef YYDEBUG -extern int yydebug; +extern int base_yydebug; #endif -extern int yylineno; -extern FILE *yyin, - *yyout; +extern int base_yylineno; +extern FILE *base_yyin, + *base_yyout; extern char *output_filename; extern struct _include_path *include_paths; |