new COMMENT-ON SQL statement: add COMMENT syntax support for sqlci

1. add COMMENT syntax support for sqlci


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/cc8f68f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/cc8f68f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/cc8f68f2

Branch: refs/heads/master
Commit: cc8f68f2235c9eb242297829c3536539de85a273
Parents: 69c284c
Author: eedy <[email protected]>
Authored: Fri Nov 3 11:35:24 2017 +0800
Committer: eedy <[email protected]>
Committed: Fri Nov 3 11:35:24 2017 +0800

----------------------------------------------------------------------
 core/sql/sqlci/sqlci_lex.ll | 1 +
 core/sql/sqlci/sqlci_yacc.y | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cc8f68f2/core/sql/sqlci/sqlci_lex.ll
----------------------------------------------------------------------
diff --git a/core/sql/sqlci/sqlci_lex.ll b/core/sql/sqlci/sqlci_lex.ll
index 0e22666..40d891a 100755
--- a/core/sql/sqlci/sqlci_lex.ll
+++ b/core/sql/sqlci/sqlci_lex.ll
@@ -161,6 +161,7 @@ B                   [ \t\n]+
 [Cc][Oo][Mm][Mm][Aa][Nn][Dd]           return_IDENT_or_TOKEN(COMMANDStoken,0);
 [Cc][Oo][Mm][Mm][Aa][Nn][Dd][Ss]       return_IDENT_or_TOKEN(COMMANDStoken,0);
 [Cc][Oo][Mm][Mm][Ii][Tt]               return_IDENT_or_TOKEN(COMMIT, 0);
+[Cc][Oo][Mm][Mm][Ee][Nn][Tt]       return_IDENT_or_TOKEN(COMMENTtoken, 0);
 [Cc][Oo][Nn][Tt][Rr][Oo][Ll]          return_IDENT_or_TOKEN(CONTROL, 0);
 [Cc][Oo][Nn][Tt][Rr][Oo][Ll][Ss]       return_IDENT_or_TOKEN(CONTROL, 0);
 [Cc][Qq][Dd]                          return_IDENT_or_TOKEN(CONTROL, 0);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cc8f68f2/core/sql/sqlci/sqlci_yacc.y
----------------------------------------------------------------------
diff --git a/core/sql/sqlci/sqlci_yacc.y b/core/sql/sqlci/sqlci_yacc.y
index 6f89f00..33e926a 100644
--- a/core/sql/sqlci/sqlci_yacc.y
+++ b/core/sql/sqlci/sqlci_yacc.y
@@ -525,6 +525,7 @@ static char * FCString (const char *idString, int isFC)
 %token UNLOAD   
 
 %token CALLToken
+%token COMMENTtoken
 
 %union {
         enum ComRoutineSQLAccess sql_access_mode_type;
@@ -1950,6 +1951,7 @@ dml_type :
         |      EXPLAIN                 {$$ = DML_DESCRIBE_TYPE;}
         |       GETtoken                {$$ = DML_DESCRIBE_TYPE;}
        |       PROCESStoken            {$$ = DML_DDL_TYPE;}
+       |     COMMENTtoken       {$$ = DML_DDL_TYPE;}
 ;
 
 dml_simple_table_type :

Reply via email to