OSDN Git Service

Ah, *now* I understand: plpgsql lexer must be generated with flex -l ...
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 21 Mar 1999 02:27:47 +0000 (02:27 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 21 Mar 1999 02:27:47 +0000 (02:27 +0000)
src/pl/plpgsql/src/Makefile.in
src/pl/plpgsql/src/gram.y

index f7509a6..9178399 100644 (file)
@@ -4,7 +4,7 @@
 #    Makefile for the plpgsql shared object
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.15 1999/03/20 18:00:38 tgl Exp $
+#    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.16 1999/03/21 02:27:46 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,7 +20,10 @@ CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include
 # For fmgr.h
 CFLAGS+= -I$(SRCDIR)/backend
 
+# If using flex, ask for a case-insensitive, lex-compatible lexer.
+ifneq (,$(findstring flex,$(LEX)))
 LFLAGS+= -i -l
+endif
 
 OBJS=  pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
 
@@ -67,7 +70,7 @@ pl_gram.c pl.tab.h:   gram.y
        rm -f y.tab.c y.tab.h
 
 pl_scan.c:     scan.l
-       $(LEX) $<
+       $(LEX) $(LFLAGS) $<
        sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <lex.yy.c >pl_scan.c
        rm -f lex.yy.c
 
index 787a008..99b28f1 100644 (file)
@@ -4,7 +4,7 @@
  *                       procedural language
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.3 1999/03/21 01:07:07 tgl Exp $
+ *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v 1.4 1999/03/21 02:27:47 tgl Exp $
  *
  *    This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -40,8 +40,6 @@
 #include "string.h"
 #include "plpgsql.h"
 
-extern int     yylineno;                       /* not always declared by lexer... */
-
 #include "pl_scan.c"
 
 static PLpgSQL_expr    *read_sqlstmt(int until, char *s, char *sqlstart);