mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Make all our flex and bison files use %option prefix or %name-prefix
(respectively) to rename yylex and related symbols. Some were doing it this way already, while others used not-too-reliable sed hacks in the Makefiles. It's all nice and consistent now.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.16 2006/02/27 12:54:38 petere Exp $
|
||||
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.17 2006/03/07 01:03:12 tgl Exp $
|
||||
|
||||
MODULE_big = cube
|
||||
OBJS= cube.o cubeparse.o
|
||||
@ -28,11 +28,13 @@ endif
|
||||
# cubescan is compiled as part of cubeparse
|
||||
cubeparse.o: cubescan.c
|
||||
|
||||
# See notes in src/backend/parser/Makefile about the following two rules
|
||||
|
||||
cubeparse.c: cubeparse.h ;
|
||||
|
||||
cubeparse.h: cubeparse.y
|
||||
ifdef YACC
|
||||
$(YACC) -d $(YFLAGS) -p cube_yy $<
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
mv -f y.tab.c cubeparse.c
|
||||
mv -f y.tab.h cubeparse.h
|
||||
else
|
||||
|
@ -10,10 +10,7 @@
|
||||
|
||||
#include "cubedata.h"
|
||||
|
||||
#undef yylex /* failure to redefine yylex will result in a call to the */
|
||||
#define yylex cube_yylex /* wrong scanner when running inside the postgres backend */
|
||||
|
||||
extern int yylex(void); /* defined as cube_yylex in cubescan.l */
|
||||
extern int cube_yylex(void);
|
||||
|
||||
static char *scanbuf;
|
||||
static int scanbuflen;
|
||||
@ -28,6 +25,8 @@ static NDBOX * write_point_as_box(char *s, int dim);
|
||||
%}
|
||||
|
||||
/* BISON Declarations */
|
||||
%name-prefix="cube_yy"
|
||||
|
||||
%token CUBEFLOAT O_PAREN C_PAREN O_BRACKET C_BRACKET COMMA
|
||||
%start box
|
||||
|
||||
|
Reference in New Issue
Block a user