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
b703c127
Commit
b703c127
authored
Nov 03, 2000
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parser sync.
parent
94d8bbe5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
25 deletions
+29
-25
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+20
-23
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+4
-2
No files found.
src/interfaces/ecpg/ChangeLog
View file @
b703c127
...
@@ -1004,5 +1004,10 @@ Tue Oct 31 16:09:55 CET 2000
...
@@ -1004,5 +1004,10 @@ Tue Oct 31 16:09:55 CET 2000
- Added patch by Christof Petig <christof.petig@wtal.de> fixing some
- Added patch by Christof Petig <christof.petig@wtal.de> fixing some
parser bugs.
parser bugs.
Fri Nov 3 11:34:43 CET 2000
- Synced pgc.l with scan.l.
- Synced gram.y and preproc.y.
- Set ecpg version to 2.8.0.
- Set ecpg version to 2.8.0.
- Set library version to 3.2.0.
- Set library version to 3.2.0.
src/interfaces/ecpg/preproc/pgc.l
View file @
b703c127
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
6 2000/10/25 07:00:33
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.6
7 2000/11/03 10:47:54
meskes Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include <limits.h>
#include <limits.h>
#include <errno.h>
#include <errno.h>
#include "postgres.h"
#include "miscadmin.h"
#include "miscadmin.h"
#include "nodes/parsenodes.h"
#include "nodes/parsenodes.h"
#include "nodes/pg_list.h"
#include "nodes/pg_list.h"
...
@@ -89,14 +87,14 @@ static struct _if_value {
...
@@ -89,14 +87,14 @@ static struct _if_value {
* We use exclusive states for quoted strings, extended comments,
* We use exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings.
* and to eliminate parsing troubles for numeric strings.
* Exclusive states:
* Exclusive states:
* <xb
> binary numeric string - thomas 1997-11-16
* <xb
it> bit string literal
* <xc> extended C-style comments - thomas 1997-07-12
* <xc> extended C-style comments - thomas 1997-07-12
* <xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
* <xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xq> quoted strings - thomas 1997-07-30
* <xq> quoted strings - thomas 1997-07-30
*/
*/
%x xb
%x xb
it
%x xc
%x xc
%x xd
%x xd
%x xdc
%x xdc
...
@@ -106,12 +104,12 @@ static struct _if_value {
...
@@ -106,12 +104,12 @@ static struct _if_value {
%x xcond
%x xcond
%x xskip
%x xskip
/* Bi
nary number
/* Bi
t string
*/
*/
xb
start
[bB]{quote}
xb
itstart
[bB]{quote}
xb
stop
{quote}
xb
itstop
{quote}
xbi
nside [^']+
xbi
tinside [^']*
xbcat {quote}{whitespace_with_newline}{quote}
xb
it
cat {quote}{whitespace_with_newline}{quote}
/* Hexadecimal number
/* Hexadecimal number
*/
*/
...
@@ -192,7 +190,7 @@ typecast "::"
...
@@ -192,7 +190,7 @@ typecast "::"
* If you change either set, adjust the character lists appearing in the
* If you change either set, adjust the character lists appearing in the
* rule for "operator"!
* rule for "operator"!
*/
*/
self [,()\[\].;$\:\+\-\*\/\%\^\<\>\=
\|
]
self [,()\[\].;$\:\+\-\*\/\%\^\<\>\=]
op_chars [\~\!\@\#\^\&\|\`\?\$\+\-\*\/\%\<\>\=]
op_chars [\~\!\@\#\^\&\|\`\?\$\+\-\*\/\%\<\>\=]
operator {op_chars}+
operator {op_chars}+
...
@@ -313,30 +311,29 @@ cppline {space}*#(.*\\{line_end})*.*
...
@@ -313,30 +311,29 @@ cppline {space}*#(.*\\{line_end})*.*
<xc><<EOF>> { mmerror(ET_ERROR, "Unterminated /* comment"); }
<xc><<EOF>> { mmerror(ET_ERROR, "Unterminated /* comment"); }
<SQL>{xbstart} {
<SQL>{xb
it
start} {
BEGIN(xb);
BEGIN(xb
it
);
startlit();
startlit();
}
}
<xb
>{xbstop}
{
<xb
it>{xbitstop}
{
char* endptr;
char* endptr;
BEGIN(SQL);
BEGIN(SQL);
errno = 0;
if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
yylval.ival = strtol(literalbuf, &endptr, 2);
mmerror(ET_ERROR, "invalid bit string input.");
if (*endptr != '\0' || errno == ERANGE)
yylval.str = literalbuf;
mmerror(ET_ERROR, "Bad binary integer input!");
return BITCONST;
return ICONST;
}
}
<xh>{xhinside} |
<xh>{xhinside} |
<xb
>{xb
inside} {
<xb
it>{xbit
inside} {
addlit(yytext, yyleng);
addlit(yytext, yyleng);
}
}
<xh>{xhcat} |
<xh>{xhcat} |
<xb
>{xb
cat} {
<xb
it>{xbit
cat} {
/* ignore */
/* ignore */
}
}
<xb
><<EOF>> { mmerror(ET_ERROR, "Unterminated binary integer
"); }
<xb
it><<EOF>> { mmerror(ET_ERROR, "Unterminated bit string
"); }
<SQL>{xhstart} {
<SQL>{xhstart} {
BEGIN(xh);
BEGIN(xh);
...
@@ -490,7 +487,7 @@ cppline {space}*#(.*\\{line_end})*.*
...
@@ -490,7 +487,7 @@ cppline {space}*#(.*\\{line_end})*.*
* that the "self" rule would have.
* that the "self" rule would have.
*/
*/
if (nchars == 1 &&
if (nchars == 1 &&
strchr(",()[].;$:+-*/%^<>=
|
", yytext[0]))
strchr(",()[].;$:+-*/%^<>=", yytext[0]))
return yytext[0];
return yytext[0];
}
}
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
b703c127
...
@@ -242,7 +242,7 @@ make_name(void)
...
@@ -242,7 +242,7 @@ make_name(void)
%token UNIONJOIN
%token UNIONJOIN
/* Special keywords, not in the query language - see the "lex" file */
/* Special keywords, not in the query language - see the "lex" file */
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE IP
%token <str> IDENT SCONST Op CSTRING CVARIABLE CPP_LINE IP
BITCONST
%token <ival> ICONST PARAM
%token <ival> ICONST PARAM
%token <dval> FCONST
%token <dval> FCONST
...
@@ -281,7 +281,7 @@ make_name(void)
...
@@ -281,7 +281,7 @@ make_name(void)
%type <str> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
%type <str> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
%type <str> OptUnder key_reference comment_text ConstraintDeferrabilitySpec
%type <str> OptUnder key_reference comment_text ConstraintDeferrabilitySpec
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
%type <str> ColConstraint ColConstraintElem drop_type
%type <str> ColConstraint ColConstraintElem drop_type
Bitconst
%type <str> OptTableElementList OptTableElement TableConstraint
%type <str> OptTableElementList OptTableElement TableConstraint
%type <str> ConstraintElem key_actions ColQualList TokenId DropSchemaStmt
%type <str> ConstraintElem key_actions ColQualList TokenId DropSchemaStmt
%type <str> target_list target_el update_target_list alias_clause
%type <str> target_list target_el update_target_list alias_clause
...
@@ -3790,6 +3790,7 @@ ParamNo: PARAM opt_indirection
...
@@ -3790,6 +3790,7 @@ ParamNo: PARAM opt_indirection
Iconst: ICONST { $$ = make_name();};
Iconst: ICONST { $$ = make_name();};
Fconst: FCONST { $$ = make_name();};
Fconst: FCONST { $$ = make_name();};
Bitconst: BITCONST { $$ = make_name();};
Sconst: SCONST {
Sconst: SCONST {
$$ = (char *)mm_alloc(strlen($1) + 3);
$$ = (char *)mm_alloc(strlen($1) + 3);
$$[0]='\'';
$$[0]='\'';
...
@@ -3825,6 +3826,7 @@ AllConst: Sconst { $$ = $1; }
...
@@ -3825,6 +3826,7 @@ AllConst: Sconst { $$ = $1; }
PosAllConst: Sconst { $$ = $1; }
PosAllConst: Sconst { $$ = $1; }
| Fconst { $$ = $1; }
| Fconst { $$ = $1; }
| Iconst { $$ = $1; }
| Iconst { $$ = $1; }
| Bitconst { $$ = $1; }
| civar { $$ = make_str("?"); }
| civar { $$ = make_str("?"); }
;
;
...
...
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