Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a3ec44a5
Commit
a3ec44a5
authored
Jul 01, 2002
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit old versions into main branch again.
Michael
parent
97862234
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
207 deletions
+119
-207
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+1
-11
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+14
-14
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+104
-182
No files found.
src/interfaces/ecpg/preproc/keywords.c
View file @
a3ec44a5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
1 2002/06/30 09:34:13
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
2 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
},
};
...
...
src/interfaces/ecpg/preproc/pgc.l
View file @
a3ec44a5
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.9
5 2002/06/30 09:34:13
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.9
6 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
* <xb
it
> 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 xb
it
%x xc
%x xd
%x xdc
...
...
@@ -108,10 +108,10 @@ static struct _if_value
/* Bit string
*/
xb
start
[bB]{quote}
xb
stop
{quote}
xbinside [^']*
xbcat {quote}{whitespace_with_newline}{quote}
xb
itstart
[bB]{quote}
xb
itstop
{quote}
xbi
ti
nside [^']*
xb
it
cat {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>{xb
it
start} {
token_start = yytext;
BEGIN(xb);
BEGIN(xb
it
);
startlit();
addlitchar('b');
}
<xb
>{xb
stop} {
<xb
it>{xbit
stop} {
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
>{xb
inside} { addlit(yytext, yyleng); }
<xb
it>{xbit
inside} { addlit(yytext, yyleng); }
<xh>{xhcat} |
<xb
>{xb
cat} { /* ignore */ }
<xb><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
<xb
it>{xbit
cat} { /* ignore */ }
<xb
it
><<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"); }
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
a3ec44a5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment