quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianqiao <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #35: QUICKSTEP-20: Added Parser support for...
Date Fri, 17 Jun 2016 22:07:46 GMT
Github user jianqiao commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/35#discussion_r67582107
  
    --- Diff: parser/SqlParser.ypp ---
    @@ -1332,6 +1369,83 @@ opt_limit_clause:
         }
       }
     
    +opt_window_clause:
    +  {
    +    $$ = nullptr;
    +  }
    +  | window_declaration_list
    +
    +window_declaration_list:
    +  window_declaration {
    +    $$ = new quickstep::PtrList<quickstep::ParseWindow>();
    +    $$->push_back($1);
    +  }
    +  | window_declaration_list window_declaration {
    +    $$ = $1;
    +    $$->push_back($2);
    +  }
    +
    +window_declaration:
    --- End diff --
    
    I think currently `SqlParser.hpp` is mostly organized in this way:
    ```
    A:
      TOKEN_X SubA1 SubA2
      ...
      ;
    
    SubA1:
      TOKEN_Y SubSubA1 SubSubA2
      ...
      ;
    
    SubSubA1:
      ...
      ;
    
    ...
    
    SubA2:
      ...
      ;
    ```
    I.e. kind of infix-order traversal of the grammar tree.
    
    Let's just have this PR in this structure. We can have a standalone PR if there is a proposal
for better organization of the grammar rules.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message