Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
361f9e7f
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
361f9e7f
编写于
11月 30, 1997
作者:
T
Thomas G. Lockhart
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add comments and move a few declaration blocks to help readability.
No functional changes this time!
上级
b12ba5f6
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
247 addition
and
221 deletion
+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
未找到文件。
src/backend/parser/scan.c
浏览文件 @
361f9e7f
此差异已折叠。
点击以展开。
src/backend/parser/scan.l
浏览文件 @
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,61 +60,75 @@ int llen;
...
@@ -60,61 +60,75 @@ 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.
* When in an exclusive condition, only those rules defined for that condition apply.
* When in an exclusive condition, only those rules defined for that condition apply.
*
*
* Exclusive states change parsing rules while the state is active.
* Exclusive states change parsing rules while the state is active.
* There are exclusive states for quoted strings, extended comments,
* There are 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> 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
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xq> quoted strings - tgl 1997-07-30
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <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
* "extended comment" trigger any action other than "ignore".
* "extended comment" trigger any action other than "ignore".
* Be sure to match _any_ candidate comment, including those with appended
* Be sure to match _any_ candidate comment, including those with appended
* operator-like symbols. - thomas 1997-07-14
* operator-like symbols. - thomas 1997-07-14
*/
*/
%x xb
%x xb
%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)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录