Skip to content

Commit 2b0bbcd

Browse files
authored
Merge pull request #930 from bigplaice/dual-parser-v5
refine comments for dual parser
2 parents 6c3f5fb + e694839 commit 2b0bbcd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/backend/oracle_parser/liboracle_parser.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,18 +397,18 @@ ora_base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp, ora_core_yyscan_t yyscanner)
397397
while (token != 0 && token != ';')
398398
{
399399
/*
400-
* support anonymous block
400+
* support anonymous block.
401401
* In the PLSQL, the cursor declare must be 'CURSOR ...',
402402
* not '... CURSOR ...'.
403403
*
404-
* PLSQL support type xxx is ref cursor grammer
405-
* so we check the last token is ref
406-
* declare cursor don't support ref for the cursor name
404+
* PLSQL supports "type xxx is ref cursor" grammer
405+
* so we check the last token is ref or not.
406+
* declare cursor doesn't support ref for the cursor name.
407407
*
408-
* Inline function support cursor
409-
* we judge it is the cursor of SQL, if it next token
408+
* Inline function supports cursor
409+
* we know it is the cursor of SQL, if the next token
410410
* is WITH or FOR or WITHOUT. see details for ora_gram.y about
411-
* declare cursor stmt
411+
* declare cursor stmt.
412412
*/
413413
if (token == CURSOR)
414414
has_cursor = true;
@@ -604,7 +604,7 @@ ora_base_yylex(YYSTYPE *lvalp, YYLTYPE *llocp, ora_core_yyscan_t yyscanner)
604604
}
605605

606606
/*
607-
* there, maybe package body has init block
607+
* package body may have init block
608608
*/
609609
if (yyextra->body_style == OraBody_PACKAGEBODY &&
610610
blocklevel == 0)

src/backend/oracle_parser/ora_scan.l

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ other .
486486

487487
<xc>{
488488
{xcstart} {
489-
/* Simply don't consider nesting for compatibility with Oracle's comments */
489+
/* don't consider nesting for compatibility of Oracle's comments */
490490
//(yyextra->xcdepth)++;
491491
/* Put back any characters past slash-star; see above */
492492
yyless(2);
@@ -846,7 +846,7 @@ other .
846846
int len = 0;
847847

848848
BEGIN(INITIAL);
849-
/* get q' escaped character,really character */
849+
/* get q' escaped character, the real character */
850850

851851
oldstr = litbufdup(yyscanner);
852852
len = strlen(oldstr);
@@ -942,7 +942,7 @@ other .
942942
yyerror("zero-length delimited identifier");
943943
ident = litbufdup(yyscanner);
944944

945-
/* Convert the upper case identifier to the lower case, and the lower
945+
/* Convert the upper case identifier to the lower case one, and the lower
946946
* case to the upper case, if the identifier is quoted by the double
947947
* quotes.
948948
*/
@@ -1473,7 +1473,7 @@ ora_scanner_init(const char *str,
14731473

14741474

14751475
/*
1476-
* Called after parsing is done to clean up after ora_scanner_init()
1476+
* when parsing is done, clean up after ora_scanner_init()
14771477
*/
14781478
void
14791479
ora_scanner_finish(ora_core_yyscan_t yyscanner)

0 commit comments

Comments
 (0)