Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-18

There are syntax errors in the core OData grammar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ABNF
    • Labels:
      None
    • Proposal:
      Hide

      I have posted a grammar in

      https://lists.oasis-open.org/archives/odata/201208/msg00081.html

      This grammar corrects the syntax errors and specifies "

      {TODOn}

      " for the undefined terms, where n ranges from 1 to 55. This grammar also includes the grammar rules specified in cited RFCs.

      The following are the modifications I made to the core grammar in OData ABNF.markdown:

      concreteSpatialTypeName ends with a trailing slash. The trailing slash was deleted.

      collectionPropertyInVJSON ends with a trailing slash. The trailing slash was deleted. In addition, the parentheses were not balanced. A guess was made about where to place the missing parentheses.

      collectionNavigationExpr is missing a final parenthesis.

      firstMemberExpr has two unmatched right parentheses. I was unable to guess what the correct rule should be so I deleted the right parentheses for now.

      memberExpr has two unmatched right parentheses. I was unable to guess what the correct rule should be so I deleted the right parentheses for now.

      primitiveColServiceOp = odataIdentitier was obviously misspelled. Presumably, it should be odataIdentifier

      primitiveColFunction = odataIdentitier was obviously misspelled. Presumably, it should be odataIdentifier.

      qualifiedActionName = fullActionName uses an undefined term. I replaced the rule with a rule analogous to qualifiedFunctionName.

      time = time SQUOTE sign "P" [ 1*DIGIT "Y" ] [ 1*DIGIT "M" ] [ 1*DIGIT "D" ] [ "T" [ 1*DIGIT "H" ] [ 1*DIGIT "M" ] [ 1*DIGIT "S" ] ] SQUOTE
      This defines time recursively in terms of time. This results in a grammar that is unparsable. It was replaced by this rule:
      time = SQUOTE sign "P" [ 1*DIGIT "Y" ] [ 1*DIGIT "M" ] [ 1*DIGIT "D" ] [ "T" [ 1*DIGIT "H" ] [ 1*DIGIT "M" ] [ 1*DIGIT "S" ] ] SQUOTE

      I could not track down the citation to [IANA-MMT], so I left the rule referencing it undefined.

      Show
      I have posted a grammar in https://lists.oasis-open.org/archives/odata/201208/msg00081.html This grammar corrects the syntax errors and specifies " {TODOn} " for the undefined terms, where n ranges from 1 to 55. This grammar also includes the grammar rules specified in cited RFCs. The following are the modifications I made to the core grammar in OData ABNF.markdown: concreteSpatialTypeName ends with a trailing slash. The trailing slash was deleted. collectionPropertyInVJSON ends with a trailing slash. The trailing slash was deleted. In addition, the parentheses were not balanced. A guess was made about where to place the missing parentheses. collectionNavigationExpr is missing a final parenthesis. firstMemberExpr has two unmatched right parentheses. I was unable to guess what the correct rule should be so I deleted the right parentheses for now. memberExpr has two unmatched right parentheses. I was unable to guess what the correct rule should be so I deleted the right parentheses for now. primitiveColServiceOp = odataIdentitier was obviously misspelled. Presumably, it should be odataIdentifier primitiveColFunction = odataIdentitier was obviously misspelled. Presumably, it should be odataIdentifier. qualifiedActionName = fullActionName uses an undefined term. I replaced the rule with a rule analogous to qualifiedFunctionName. time = time SQUOTE sign "P" [ 1*DIGIT "Y" ] [ 1*DIGIT "M" ] [ 1*DIGIT "D" ] [ "T" [ 1*DIGIT "H" ] [ 1*DIGIT "M" ] [ 1*DIGIT "S" ] ] SQUOTE This defines time recursively in terms of time. This results in a grammar that is unparsable. It was replaced by this rule: time = SQUOTE sign "P" [ 1*DIGIT "Y" ] [ 1*DIGIT "M" ] [ 1*DIGIT "D" ] [ "T" [ 1*DIGIT "H" ] [ 1*DIGIT "M" ] [ 1*DIGIT "S" ] ] SQUOTE I could not track down the citation to [IANA-MMT] , so I left the rule referencing it undefined.
    • Resolution:
      Show
      The changes listed in the proposal have been accepted by the TC as a baseline document. They have been incorporated in https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/ABNF/odata-abnf-current.abnf?rev=10 . Accepted: https://www.oasis-open.org/committees/download.php/46979/odata_meeting-5_on-20120830_minutes.html

      Description

      There should be an OData grammar that is available as part of the OData standard. The core OData grammar is OData ABNF.markdown in

      https://www.oasis-open.org/apps/org/workgroup/odata/download.php/46557/ODataV3Core.zip

      However, this grammar has a few minor syntax errors and many terms that are not yet defined.

      The issues to be resolved are:

      1. Do my proposed modifications correctly define the OData grammar rules?

      2. What are the grammar rules for the undefined terms?

      Tool to check the ABNF: ABNF Parser Generator (APG)

      If you download the apg.jar file from http://www.coasttocoastresearch.com/apg/download/gpl

      it can be parsed using this command:

      java -jar .../java-apg/jar/apg.jar /in=odata.abnf

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              kenb Ken Baclawski (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: