Commit a3ec44a5 authored by Michael Meskes's avatar Michael Meskes

Commit old versions into main branch again.

Michael
parent 97862234
......@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.51 2002/06/30 09:34:13 meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.52 2002/07/01 06:56:10 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -44,7 +44,6 @@ static ScanKeyword ScanKeywords[] = {
{"as", AS},
{"asc", ASC},
{"assertion", ASSERTION},
{"assignment", ASSIGNMENT},
{"at", AT},
{"authorization", AUTHORIZATION},
{"backward", BACKWARD},
......@@ -99,7 +98,6 @@ static ScanKeyword ScanKeywords[] = {
{"deferred", DEFERRED},
{"definer", DEFINER},
{"delete", DELETE_P},
{"delimiter", DELIMITER},
{"delimiters", DELIMITERS},
{"desc", DESC},
{"distinct", DISTINCT},
......@@ -173,8 +171,6 @@ static ScanKeyword ScanKeywords[] = {
{"listen", LISTEN},
{"load", LOAD},
{"local", LOCAL},
{"localtime", LOCALTIME},
{"localtimestamp", LOCALTIMESTAMP},
{"location", LOCATION},
{"lock", LOCK_P},
{"match", MATCH},
......@@ -215,13 +211,11 @@ static ScanKeyword ScanKeywords[] = {
{"out", OUT_P},
{"outer", OUTER_P},
{"overlaps", OVERLAPS},
{"overlay", OVERLAY},
{"owner", OWNER},
{"partial", PARTIAL},
{"password", PASSWORD},
{"path", PATH_P},
{"pendant", PENDANT},
{"placing", PLACING},
{"position", POSITION},
{"precision", PRECISION},
{"primary", PRIMARY},
......@@ -257,8 +251,6 @@ static ScanKeyword ScanKeywords[] = {
{"setof", SETOF},
{"share", SHARE},
{"show", SHOW},
{"similar", SIMILAR},
{"simple", SIMPLE},
{"smallint", SMALLINT},
{"some", SOME},
{"stable", STABLE},
......@@ -300,7 +292,6 @@ static ScanKeyword ScanKeywords[] = {
{"using", USING},
{"vacuum", VACUUM},
{"valid", VALID},
{"validator", VALIDATOR},
{"values", VALUES},
{"varchar", VARCHAR},
{"varying", VARYING},
......@@ -313,7 +304,6 @@ static ScanKeyword ScanKeywords[] = {
{"with", WITH},
{"without", WITHOUT},
{"work", WORK},
{"write", WRITE},
{"year", YEAR_P},
{"zone", ZONE},
};
......
......@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.95 2002/06/30 09:34:13 meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.96 2002/07/01 06:56:10 meskes Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -89,14 +89,14 @@ static struct _if_value
* We use exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings.
* Exclusive states:
* <xb> bit string literal
* <xbit> bit string literal
* <xc> extended C-style comments - thomas 1997-07-12
* <xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xq> quoted strings - thomas 1997-07-30
*/
%x xb
%x xbit
%x xc
%x xd
%x xdc
......@@ -108,10 +108,10 @@ static struct _if_value
/* Bit string
*/
xbstart [bB]{quote}
xbstop {quote}
xbinside [^']*
xbcat {quote}{whitespace_with_newline}{quote}
xbitstart [bB]{quote}
xbitstop {quote}
xbitinside [^']*
xbitcat {quote}{whitespace_with_newline}{quote}
/* Hexadecimal number
*/
......@@ -318,13 +318,13 @@ cppline {space}*#(.*\\{space})*.*
<xc><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated /* comment"); }
<SQL>{xbstart} {
<SQL>{xbitstart} {
token_start = yytext;
BEGIN(xb);
BEGIN(xbit);
startlit();
addlitchar('b');
}
<xb>{xbstop} {
<xbit>{xbitstop} {
BEGIN(SQL);
if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input.");
......@@ -333,10 +333,10 @@ cppline {space}*#(.*\\{space})*.*
}
<xh>{xhinside} |
<xb>{xbinside} { addlit(yytext, yyleng); }
<xbit>{xbitinside} { addlit(yytext, yyleng); }
<xh>{xhcat} |
<xb>{xbcat} { /* ignore */ }
<xb><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
<xbit>{xbitcat} { /* ignore */ }
<xbit><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
<SQL>{xhstart} {
token_start = yytext;
......@@ -378,7 +378,7 @@ cppline {space}*#(.*\\{space})*.*
<xq>{xqdouble} { addlitchar('\''); }
<xq>{xqinside} { addlit(yytext, yyleng); }
<xq>{xqescape} { addlit(yytext, yyleng); }
<xq>{xqoctesc} { addlit(yytext, yyleng); } /* addlitchar does not work here since character must remain octal */
<xq>{xqoctesc} { addlit(yytext, yyleng); }
<xq>{xqcat} { /* ignore */ }
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment