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
d51d870f
Commit
d51d870f
authored
Apr 29, 2004
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synced parser and keyword list.
parent
f378288e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
59 deletions
+116
-59
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+8
-0
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+11
-7
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+97
-52
No files found.
src/interfaces/ecpg/ChangeLog
View file @
d51d870f
...
@@ -1769,6 +1769,14 @@ Sun Mar 14 12:59:15 CET 2004
...
@@ -1769,6 +1769,14 @@ Sun Mar 14 12:59:15 CET 2004
Mon Mar 29 17:02:52 CEST 2004
Mon Mar 29 17:02:52 CEST 2004
- Fixed possible segfault in type.c (by Juergen Cappel)
- Fixed possible segfault in type.c (by Juergen Cappel)
Thu Apr 22 14:13:57 CEST 2004
- Fixed double usage of allocated memory.
Thu Apr 29 16:06:37 CEST 2004
- Synced parser and keyword list.
- Set pgtypes library version to 1.2.
- Set pgtypes library version to 1.2.
- Set ecpg version to 3.2.0.
- Set ecpg version to 3.2.0.
- Set compat library version to 1.2.
- Set compat library version to 1.2.
...
...
src/interfaces/ecpg/preproc/keywords.c
View file @
d51d870f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.6
1 2003/11/29 19:52:08 pgsql
Exp $
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.6
2 2004/04/29 14:08:10 meskes
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -36,6 +36,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -36,6 +36,7 @@ static ScanKeyword ScanKeywords[] = {
{
"after"
,
AFTER
},
{
"after"
,
AFTER
},
{
"aggregate"
,
AGGREGATE
},
{
"aggregate"
,
AGGREGATE
},
{
"all"
,
ALL
},
{
"all"
,
ALL
},
{
"also"
,
ALSO
},
{
"alter"
,
ALTER
},
{
"alter"
,
ALTER
},
{
"analyse"
,
ANALYSE
},
/* British spelling */
{
"analyse"
,
ANALYSE
},
/* British spelling */
{
"analyze"
,
ANALYZE
},
{
"analyze"
,
ANALYZE
},
...
@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -87,6 +88,7 @@ static ScanKeyword ScanKeywords[] = {
{
"createdb"
,
CREATEDB
},
{
"createdb"
,
CREATEDB
},
{
"createuser"
,
CREATEUSER
},
{
"createuser"
,
CREATEUSER
},
{
"cross"
,
CROSS
},
{
"cross"
,
CROSS
},
{
"csv"
,
CSV
},
{
"current_date"
,
CURRENT_DATE
},
{
"current_date"
,
CURRENT_DATE
},
{
"current_time"
,
CURRENT_TIME
},
{
"current_time"
,
CURRENT_TIME
},
{
"current_timestamp"
,
CURRENT_TIMESTAMP
},
{
"current_timestamp"
,
CURRENT_TIMESTAMP
},
...
@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -176,6 +178,7 @@ static ScanKeyword ScanKeywords[] = {
{
"key"
,
KEY
},
{
"key"
,
KEY
},
{
"lancompiler"
,
LANCOMPILER
},
{
"lancompiler"
,
LANCOMPILER
},
{
"language"
,
LANGUAGE
},
{
"language"
,
LANGUAGE
},
{
"large"
,
LARGE_P
},
{
"last"
,
LAST_P
},
{
"last"
,
LAST_P
},
{
"leading"
,
LEADING
},
{
"leading"
,
LEADING
},
{
"left"
,
LEFT
},
{
"left"
,
LEFT
},
...
@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -208,9 +211,11 @@ static ScanKeyword ScanKeywords[] = {
{
"nothing"
,
NOTHING
},
{
"nothing"
,
NOTHING
},
{
"notify"
,
NOTIFY
},
{
"notify"
,
NOTIFY
},
{
"notnull"
,
NOTNULL
},
{
"notnull"
,
NOTNULL
},
{
"nowait"
,
NOWAIT
},
{
"null"
,
NULL_P
},
{
"null"
,
NULL_P
},
{
"nullif"
,
NULLIF
},
{
"nullif"
,
NULLIF
},
{
"numeric"
,
NUMERIC
},
{
"numeric"
,
NUMERIC
},
{
"object"
,
OBJECT_P
},
{
"of"
,
OF
},
{
"of"
,
OF
},
{
"off"
,
OFF
},
{
"off"
,
OFF
},
{
"offset"
,
OFFSET
},
{
"offset"
,
OFFSET
},
...
@@ -239,6 +244,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -239,6 +244,7 @@ static ScanKeyword ScanKeywords[] = {
{
"privileges"
,
PRIVILEGES
},
{
"privileges"
,
PRIVILEGES
},
{
"procedural"
,
PROCEDURAL
},
{
"procedural"
,
PROCEDURAL
},
{
"procedure"
,
PROCEDURE
},
{
"procedure"
,
PROCEDURE
},
{
"quote"
,
QUOTE
},
{
"read"
,
READ
},
{
"read"
,
READ
},
{
"real"
,
REAL
},
{
"real"
,
REAL
},
{
"recheck"
,
RECHECK
},
{
"recheck"
,
RECHECK
},
...
@@ -246,6 +252,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -246,6 +252,7 @@ static ScanKeyword ScanKeywords[] = {
{
"reindex"
,
REINDEX
},
{
"reindex"
,
REINDEX
},
{
"relative"
,
RELATIVE_P
},
{
"relative"
,
RELATIVE_P
},
{
"rename"
,
RENAME
},
{
"rename"
,
RENAME
},
{
"repeatable"
,
REPEATABLE
},
{
"replace"
,
REPLACE
},
{
"replace"
,
REPLACE
},
{
"reset"
,
RESET
},
{
"reset"
,
RESET
},
{
"restart"
,
RESTART
},
{
"restart"
,
RESTART
},
...
@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = {
...
@@ -302,6 +309,7 @@ static ScanKeyword ScanKeywords[] = {
{
"truncate"
,
TRUNCATE
},
{
"truncate"
,
TRUNCATE
},
{
"trusted"
,
TRUSTED
},
{
"trusted"
,
TRUSTED
},
{
"type"
,
TYPE_P
},
{
"type"
,
TYPE_P
},
{
"uncommitted"
,
UNCOMMITTED
},
{
"unencrypted"
,
UNENCRYPTED
},
{
"unencrypted"
,
UNENCRYPTED
},
{
"union"
,
UNION
},
{
"union"
,
UNION
},
{
"unique"
,
UNIQUE
},
{
"unique"
,
UNIQUE
},
...
@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text)
...
@@ -359,17 +367,13 @@ ScanKeywordLookup(char *text)
/*
/*
* Apply an ASCII-only downcasing. We must not use tolower() since it
* Apply an ASCII-only downcasing. We must not use tolower() since it
* may produce the wrong translation in some locales (eg, Turkish),
* may produce the wrong translation in some locales (eg, Turkish).
* and we don't trust isupper() very much either. In an ASCII-based
* encoding the tests against A and Z are sufficient, but we also
* check isupper() so that we will work correctly under EBCDIC. The
* actual case conversion step should work for either ASCII or EBCDIC.
*/
*/
for
(
i
=
0
;
i
<
len
;
i
++
)
for
(
i
=
0
;
i
<
len
;
i
++
)
{
{
char
ch
=
text
[
i
];
char
ch
=
text
[
i
];
if
(
ch
>=
'A'
&&
ch
<=
'Z'
&&
isupper
((
unsigned
char
)
ch
)
)
if
(
ch
>=
'A'
&&
ch
<=
'Z'
)
ch
+=
'a'
-
'A'
;
ch
+=
'a'
-
'A'
;
word
[
i
]
=
ch
;
word
[
i
]
=
ch
;
}
}
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
d51d870f
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