aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/bootstrap/bootscanner.l3
-rw-r--r--src/backend/utils/misc/guc-file.l3
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l3
-rw-r--r--src/pl/plpgsql/src/scan.l6
4 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index 6d3081695f4..d8f683596d9 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.32 2003/11/29 19:51:41 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.33 2004/02/24 22:06:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,7 @@ static int yyline; /* keep track of the line number for error reporting */
%option 8bit
%option never-interactive
+%option nodefault
%option nounput
%option noyywrap
diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l
index df895722607..eb5f0c7f071 100644
--- a/src/backend/utils/misc/guc-file.l
+++ b/src/backend/utils/misc/guc-file.l
@@ -4,7 +4,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.20 2003/11/29 19:52:03 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.21 2004/02/24 22:06:32 tgl Exp $
*/
%{
@@ -47,6 +47,7 @@ char *GUC_scanstr(char *);
%option 8bit
%option never-interactive
+%option nodefault
%option nounput
%option noyywrap
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 264f93f847c..376c87c73ba 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.125 2004/02/15 13:48:54 meskes Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.126 2004/02/24 22:06:32 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,6 +70,7 @@ static struct _if_value
%option 8bit
%option never-interactive
+%option nodefault
%option noyywrap
%option yylineno
diff --git a/src/pl/plpgsql/src/scan.l b/src/pl/plpgsql/src/scan.l
index 62a7880c6c2..b891e2b9e18 100644
--- a/src/pl/plpgsql/src/scan.l
+++ b/src/pl/plpgsql/src/scan.l
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/scan.l,v 1.30 2003/11/29 19:52:12 pgsql Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/scan.l,v 1.31 2004/02/24 22:06:32 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -63,6 +63,7 @@ int plpgsql_SpaceScanned = 0;
%option 8bit
%option never-interactive
+%option nodefault
%option nounput
%option noyywrap
@@ -272,6 +273,7 @@ dump { return O_DUMP; }
BEGIN IN_STRING;
}
<IN_STRING>\\. { }
+<IN_STRING>\\ { /* can only happen with \ at EOF */ }
<IN_STRING>'' { }
<IN_STRING>' {
yyleng -= (yytext - start_charpos);
@@ -279,13 +281,13 @@ dump { return O_DUMP; }
BEGIN INITIAL;
return T_STRING;
}
+<IN_STRING>[^'\\]+ { }
<IN_STRING><<EOF>> {
plpgsql_error_lineno = start_lineno;
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("unterminated string")));
}
-<IN_STRING>[^'\\]* { }
/* ----------
* Any unmatched character is returned as is