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
0c001f08
Commit
0c001f08
authored
Aug 20, 1997
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHECK/DEFAULT syntax (some tricks to get current scan position).
parent
4527172b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
src/backend/parser/scan.l
src/backend/parser/scan.l
+18
-9
No files found.
src/backend/parser/scan.l
View file @
0c001f08
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.1
3 1997/06/29 17:29:14 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.1
4 1997/08/20 01:50:06 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -36,6 +36,10 @@
extern char *parseString;
extern char *parseCh;
int CurScanPosition(void);
int DefaultStartPosition;
int CheckStartPosition;
/* some versions of lex define this as a macro */
#if defined(yywrap)
#undef yywrap
...
...
@@ -173,6 +177,10 @@ other .
keyword = ScanKeywordLookup((char*)yytext);
if (keyword != NULL) {
if ( keyword->value == DEFAULT )
DefaultStartPosition = CurScanPosition () + yyleng + 1;
else if ( keyword->value == CHECK )
CheckStartPosition = CurScanPosition () + yyleng + 1;
return (keyword->value);
} else {
yylval.str = pstrdup((char*)yytext);
...
...
@@ -240,6 +248,12 @@ unput(char c)
*--parseCh = c;
}
}
int
CurScanPosition(void)
{
return (parseCh - parseString - yyleng - 1);
}
#endif /* !defined(FLEX_SCANNER) */
#ifdef FLEX_SCANNER
...
...
@@ -265,16 +279,11 @@ myinput(char* buf, int max)
}
}
#ifdef NOT_USED
char*
CurScan(void)
int
CurScanPosition(void)
{
/*
return (InputFrag ? InputFrag : parseCh) +
(yy_c_buf_p - &yy_current_buffer->yy_ch_buf[yy_n_chars]);
*/
return (yy_c_buf_p - yy_current_buffer->yy_ch_buf - yyleng);
}
#endif
#endif /* FLEX_SCANNER */
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