Use more formal rules definition

XMLWordPrintableJSON

    • Type: Change Request
    • Resolution: Persuasive with Modification
    • Priority: Medium
    • Shorthand (FHIR)
    • 0.12.0 [deprecated]
    • FHIR Infrastructure
    • Language Reference
    • 3.3
    • Hide

      There is a formal grammar, of course, defined in ANTLR4, so there is not ambiguity in the specification. However, it is reasonable to try to make the pseudo-grammar in the spec easier to understand. Usually, when there are multiple structural possibilities, the spec lists them explicitly, for example:

      * {path} {min}..{max} 
      * {path} {min}..{max} {flag1} {flag2} ...

      We agree, however, that the conventions of the pseudo-grammar should be better explained. It might be possible to find a better way to deal with repeating elements instead of using ...,  and perhaps also a way to differentiate required and optional elements.

      (It is just a bit tricky because markdown doesn't like bold or italics inside code blocks and it would require lot of edits to switch to html.)

       

      Show
      There is a formal grammar, of course, defined in ANTLR4, so there is not ambiguity in the specification. However, it is reasonable to try to make the pseudo-grammar in the spec easier to understand. Usually, when there are multiple structural possibilities, the spec lists them explicitly, for example: * {path} {min}..{max}  * {path} {min}..{max} {flag1} {flag2} ... We agree, however, that the conventions of the pseudo-grammar should be better explained. It might be possible to find a better way to deal with repeating elements instead of using ...,  and perhaps also a way to differentiate required and optional elements. (It is just a bit tricky because markdown doesn't like bold or italics inside code blocks and it would require lot of edits to switch to html.)  
    • Kramer/Rhodes: 14-0-0
    • Clarification
    • Non-substantive

      In the provided rules, see the example in the "Existing Working" it is not clear what the actual rules are, for instance:
      1. Is it allowed to have: "*

      {path} {flag1} {flag2} {flag3}" or "* {path}

      {flag1}" ?
      2. What is the meanning of "..." within "{path1}, {path2}, {path3}... {flag}" and can we have "{path1}, {path2}, {path3}... {flag1}

      {flag2}"?

      So this way to specify rules is confusing, especially because the column title is "Syntax" and not "Examples" (The latter also would not work as you give abstract instances of grammar constructions). Please consider using something more formal for specifying the rules' grammar instead, for example the Backus Naur Form.

      h3. Existing Wording:
      * {path} {flag1} {flag2}
      • {path1}

        ,

        {path2}

        ,

        {path3}

        ...

        {flag}

            Assignee:
            Unassigned
            Reporter:
            ivan_zapreev
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: