Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4238

Create a default parser configuration, to reduce redundant information in sub-parsers

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.26.0
    • None

    Description

      Create a default parser configuration, to reduce redundant information in sub-parsers. In particular, each sub-project parser would not need its own list of non-reserved keywords (currently the list is over 250 keywords, and the list is identical in each sub-parser).

      Since CALCITE-2405 each sub-parser has its own list of non-reserved keywords. This is good, because it allows the sub-parser to make keywords non-reserved (e.g. in DRILL-1065 Drill wanted EXEC to be non-reserved) but it still requires each parser to have a list of non-reserved keywords (see e.g. the list in Babel parser). And if we add a keyword to Calcite, we almost always have to modify the list in each sub-parser.

      This proposal would move the list of default non-reserved keywords to a shared config file. This would reduce the amount of code in sub-parsers, and remove the need to edit them when we add a keyword to the base parser.

      Also, we would not need to modify each sub-parser each time we add a markup variable (e.g. when we added binaryOperatorsTokens and extraBinaryExpressions in CALCITE-2843).

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                Slack

                  Issue deployment