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
361f9e7f
Commit
361f9e7f
authored
Nov 30, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments and move a few declaration blocks to help readability.
No functional changes this time!
parent
b12ba5f6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
247 additions
and
221 deletions
+247
-221
src/backend/parser/scan.c
src/backend/parser/scan.c
+199
-187
src/backend/parser/scan.l
src/backend/parser/scan.l
+48
-34
No files found.
src/backend/parser/scan.c
View file @
361f9e7f
This diff is collapsed.
Click to expand it.
src/backend/parser/scan.l
View file @
361f9e7f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.3
0 1997/11/20 23:22:25 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.3
1 1997/11/30 23:05:36 thomas
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -60,7 +60,7 @@ int llen;
...
@@ -60,7 +60,7 @@ int llen;
char literal[MAX_PARSE_BUFFER];
char literal[MAX_PARSE_BUFFER];
%}
%}
/* OK, here is a short description of lex/flex rules behavior.
/* OK, here is a short description of lex/flex rules behavior.
* The longest pattern which matches an input string is always chosen.
* The longest pattern which matches an input string is always chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* INITIAL is the starting condition, to which all non-conditional rules apply.
* INITIAL is the starting condition, to which all non-conditional rules apply.
...
@@ -71,11 +71,11 @@ char literal[MAX_PARSE_BUFFER];
...
@@ -71,11 +71,11 @@ char literal[MAX_PARSE_BUFFER];
* 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> binary numeric string - thomas 1997-11-16
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xc> extended C-style comments - tgl 1997-07-12
* <xc> extended C-style comments - tgl 1997-07-12
* <xq> quoted strings - tgl 1997-07-30
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xq> quoted strings - tgl 1997-07-30
*
*
* The "extended comment" syntax closely resembles allowable operator syntax.
* The "extended comment" syntax closely resembles allowable operator syntax.
* So, when in condition <xc>, only strings which would terminate the
* So, when in condition <xc>, only strings which would terminate the
...
@@ -88,33 +88,47 @@ char literal[MAX_PARSE_BUFFER];
...
@@ -88,33 +88,47 @@ char literal[MAX_PARSE_BUFFER];
%x xc
%x xc
%x xd
%x xd
%x xh
%x xh
%x xq
%x xm
%x xm
%x xq
quote '
/* Binary number
xqstart {quote}
*/
xqstop {quote}
xqdouble {quote}{quote}
xqinside [^\\']*
xqembedded "\\'"
xqliteral [\\](.|\n)
xqcat {quote}{space}*\n{space}*{quote}
xbstart [bB]{quote}
xbstart [bB]{quote}
xbstop {quote}
xbstop {quote}
xbinside [^']*
xbinside [^']*
xbcat {quote}{space}*\n{space}*{quote}
xbcat {quote}{space}*\n{space}*{quote}
/* Hexadecimal number
*/
xhstart [xX]{quote}
xhstart [xX]{quote}
xhstop {quote}
xhstop {quote}
xhinside [^']*
xhinside [^']*
xhcat {quote}{space}*\n{space}*{quote}
xhcat {quote}{space}*\n{space}*{quote}
/* Extended quote
* xqdouble implements SQL92 embedded quote
* xqcat allows strings to cross input lines
*/
quote '
xqstart {quote}
xqstop {quote}
xqdouble {quote}{quote}
xqinside [^\\']*
xqembedded "\\'"
xqliteral [\\](.|\n)
xqcat {quote}{space}*\n{space}*{quote}
/* Delimited quote
* Allows embedded spaces and other special characters into identifiers.
*/
dquote \"
dquote \"
xdstart {dquote}
xdstart {dquote}
xdstop {dquote}
xdstop {dquote}
xdinside [^"]*
xdinside [^"]*
/* Comments
* Ignored by the scanner and parser.
*/
xcline [\/][\*].*[\*][\/]{space}*\n*
xcline [\/][\*].*[\*][\/]{space}*\n*
xcstart [\/][\*]{op_and_self}*
xcstart [\/][\*]{op_and_self}*
xcstop {op_and_self}*[\*][\/]({space}*|\n)
xcstop {op_and_self}*[\*][\/]({space}*|\n)
...
...
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