1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Scanner performance improvements

Use flex flags -CF.  Pass the to-be-scanned string around as StringInfo
type, to avoid querying the length repeatedly.  Clean up some code and
remove lex-compatibility cruft.  Escape backslash sequences inline.  Use
flex-provided yy_scan_buffer() function to set up input, rather than using
myinput().
This commit is contained in:
Peter Eisentraut
2002-04-20 21:56:15 +00:00
parent ff4281472a
commit 32c6c99e0b
8 changed files with 144 additions and 155 deletions

View File

@@ -2,7 +2,7 @@
#
# Makefile for parser
#
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.36 2002/03/08 07:12:11 tgl Exp $
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.37 2002/04/20 21:56:14 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,6 +14,8 @@ OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \
parse_expr.o parse_func.o parse_node.o parse_oper.o parse_relation.o \
parse_type.o parse_coerce.o parse_target.o scan.o scansup.o
FLEXFLAGS = -CF
all: SUBSYS.o
@@ -42,7 +44,7 @@ endif
$(srcdir)/scan.c: scan.l
ifdef FLEX
$(FLEX) $(FLEXFLAGS) -Pbase_yy -o'$@' $<
$(FLEX) $(FLEXFLAGS) -o'$@' $<
else
@$(missing) flex $< $@
endif
@@ -59,13 +61,3 @@ clean:
rm -f SUBSYS.o $(OBJS)
# And the garbage that might have been left behind by partial build:
@rm -f y.tab.c y.tab.h lex.yy.c
# This is unusual: We actually have to build some of the parts before
# we know what the header file dependencies are.
dep depend: gram.c scan.c
$(CC) -MM $(CFLAGS) *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif