tree-sitter-sdml 0.1.9

sdml grammar for the tree-sitter parsing library
Documentation

tree-sitter-sdml

A tree-sitter grammar for the Simple Domain Modeling Language (SDML). For more information on the language, see the documentation.

Example

module Campaign is

  import [xsd skos xml:base dc]

  @xml:base = <https://advertising.amazon.com/api-model>

  @skos:version = xsd:decimal(2)

  datatype Name <- xsd:string is
    @xsd:minLength = 5
    @xsd:maxLength = 25
  end

  datatype CampaignId <- xsd:string is
    @skos:prefLabel = [
      "Campaign Identifier"@en
      "Identified de campagne"@fr
    ]
  end

  structure Tag is
    key -> xsd:NMTOKEN
    value -> {0..} rdfs:langStrings
  end

  entity campaign is
    identity campaignId -> CampaignId

    name -> Name is
      @skos:definition = ""
    end

    tag -> {0..} Tag

    ref target {0..1} -> {0..} Target
  end

  entity Target

end

Changes

Version: 0.1.9

  • Simplified the disjoint union type.

Version: 0.1.8

  • Added a disjoint union type.

Version: 0.1.7

  • Made field name sourceCardinality into source_cardinality.
  • Made field name targetCardinality into target_cardinality.

Version: 0.1.6

  • Made _simple_value into simple_value named rule.
  • Made _type_reference into type_reference named rule.

Additional Links