mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Implement nested block comments in the backend and in psql.
Include updates for the comment.sql regression test. Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel. Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT and SET AutoCommit in the parser only. Need to add code to actually do something. Implement WITHOUT TIME ZONE type qualifier. Define SCHEMA keyword, along with stubbed-out grammar. Implement "[IN|INOUT|OUT] [varname] type" function arguments in parser only; INOUT and OUT throws an elog(ERROR). Add PATH as a type-specific token, since PATH is in SQL99 to support schema resource search and resolution.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.72 2000/06/14 18:17:37 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.73 2000/07/14 15:43:32 thomas Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -72,6 +72,8 @@ static char *literalbuf; /* expandable buffer */
|
||||
static int literallen; /* actual current length */
|
||||
static int literalalloc; /* current allocated buffer size */
|
||||
|
||||
static int xcdepth = 0;
|
||||
|
||||
#define startlit() (literalbuf[0] = '\0', literallen = 0)
|
||||
static void addlit(char *ytext, int yleng);
|
||||
|
||||
@@ -157,7 +159,7 @@ xdinside [^"]+
|
||||
*/
|
||||
xcstart \/\*{op_chars}*
|
||||
xcstop \*+\/
|
||||
xcinside ([^*]+)|(\*+[^/])
|
||||
xcinside [^*/]+
|
||||
|
||||
digit [0-9]
|
||||
letter [\200-\377_A-Za-z]
|
||||
@@ -247,15 +249,29 @@ other .
|
||||
{whitespace} { /* ignore */ }
|
||||
|
||||
{xcstart} {
|
||||
xcdepth = 0;
|
||||
BEGIN(xc);
|
||||
/* Put back any characters past slash-star; see above */
|
||||
yyless(2);
|
||||
}
|
||||
|
||||
<xc>{xcstop} { BEGIN(INITIAL); }
|
||||
<xc>{xcstart} {
|
||||
xcdepth++;
|
||||
/* Put back any characters past slash-star; see above */
|
||||
yyless(2);
|
||||
}
|
||||
|
||||
<xc>{xcstop} {
|
||||
if (xcdepth <= 0)
|
||||
BEGIN(INITIAL);
|
||||
else
|
||||
xcdepth--;
|
||||
}
|
||||
|
||||
<xc>{xcinside} { /* ignore */ }
|
||||
|
||||
<xc>{op_chars} { /* ignore */ }
|
||||
|
||||
<xc><<EOF>> { elog(ERROR, "Unterminated /* comment"); }
|
||||
|
||||
{xbstart} {
|
||||
|
Reference in New Issue
Block a user