tree-sitter-sdml 0.3.2__cp38-abi3-macosx_14_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. tree_sitter_sdml/__init__.py +5 -0
  2. tree_sitter_sdml/__init__.pyi +1 -0
  3. tree_sitter_sdml/_binding.abi3.so +0 -0
  4. tree_sitter_sdml/binding.c +27 -0
  5. tree_sitter_sdml/py.typed +0 -0
  6. tree_sitter_sdml/queries/#folds.scm# +30 -0
  7. tree_sitter_sdml/queries/.folds.scm.~undo-tree~ +4 -0
  8. tree_sitter_sdml/queries/.highlight.scm.~undo-tree~ +285 -0
  9. tree_sitter_sdml/queries/.highlight.scm~.~undo-tree~ +4 -0
  10. tree_sitter_sdml/queries/.highlights.scm.~undo-tree~ +17 -0
  11. tree_sitter_sdml/queries/.indent.scm.~undo-tree~ +4 -0
  12. tree_sitter_sdml/queries/.injections.scm.~undo-tree~ +7 -0
  13. tree_sitter_sdml/queries/.lint.scm.~undo-tree~ +6 -0
  14. tree_sitter_sdml/queries/.locals.scm.~undo-tree~ +19 -0
  15. tree_sitter_sdml/queries/.tags.scm.~undo-tree~ +59 -0
  16. tree_sitter_sdml/queries/folds.scm +27 -0
  17. tree_sitter_sdml/queries/folds.scm~ +4 -0
  18. tree_sitter_sdml/queries/highlight.scm~ +0 -0
  19. tree_sitter_sdml/queries/highlights.scm +266 -0
  20. tree_sitter_sdml/queries/highlights.scm~ +270 -0
  21. tree_sitter_sdml/queries/indent.scm +28 -0
  22. tree_sitter_sdml/queries/indent.scm~ +16 -0
  23. tree_sitter_sdml/queries/injections.scm +4 -0
  24. tree_sitter_sdml/queries/injections.scm~ +4 -0
  25. tree_sitter_sdml/queries/locals.scm +22 -0
  26. tree_sitter_sdml/queries/locals.scm~ +16 -0
  27. tree_sitter_sdml/queries/tags.scm +85 -0
  28. tree_sitter_sdml/queries/tags.scm~ +95 -0
  29. tree_sitter_sdml-0.3.2.dist-info/LICENSE +13 -0
  30. tree_sitter_sdml-0.3.2.dist-info/METADATA +655 -0
  31. tree_sitter_sdml-0.3.2.dist-info/RECORD +33 -0
  32. tree_sitter_sdml-0.3.2.dist-info/WHEEL +5 -0
  33. tree_sitter_sdml-0.3.2.dist-info/top_level.txt +2 -0
@@ -0,0 +1,655 @@
1
+ Metadata-Version: 2.1
2
+ Name: tree-sitter-sdml
3
+ Version: 0.3.2
4
+ Summary: SDML grammar for tree-sitter
5
+ License: Copyright 2023 Simon Johnston <johnstonskj@gmail.com>
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ Project-URL: Homepage, https://github.com/tree-sitter/tree-sitter-sdml
20
+ Keywords: incremental,parsing,tree-sitter,sdml
21
+ Classifier: Intended Audience :: Developers
22
+ Classifier: License :: OSI Approved :: MIT License
23
+ Classifier: Topic :: Software Development :: Compilers
24
+ Classifier: Topic :: Text Processing :: Linguistic
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Provides-Extra: core
30
+ Requires-Dist: tree-sitter ~=0.21 ; extra == 'core'
31
+
32
+ # Tree-Sitter grammar for SDML
33
+
34
+ ![SDML Logo Text](https://raw.githubusercontent.com/sdm-lang/.github/main/profile/horizontal-text.svg)
35
+
36
+ A [tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for the Simple Domain Modeling Language (SDML). For more information on the language, see the
37
+ [documentation](https://sdml.io/).
38
+
39
+ ## Example
40
+
41
+ ```sdml
42
+ module Campaign base <https://advertising.amazon.com/api-model> is
43
+
44
+ import [dc skos xsd]
45
+
46
+ @skos:prefLabel = "Campaign sub-domain"@en
47
+ @skos:version = xsd:decimal(2)
48
+
49
+ datatype Name <- xsd:string is
50
+ @xsd:minLength = 5
51
+ @xsd:maxLength = 25
52
+ end
53
+
54
+ datatype CampaignId <- xsd:string is
55
+ @skos:prefLabel = [
56
+ "Campaign Identifier"@en
57
+ "Identified de campagne"@fr
58
+ ]
59
+ end
60
+
61
+ structure Tag is
62
+ key -> xsd:NMTOKEN
63
+ value -> {0..} rdfs:langStrings
64
+ end
65
+
66
+ entity campaign is
67
+ identity id -> CampaignId
68
+
69
+ name -> Name is
70
+ @skos:definition = "the name of the campaign"@en
71
+ end
72
+
73
+ tag -> {0..} Tag
74
+
75
+ target -> {1..} Target
76
+ end
77
+
78
+ entity Target
79
+
80
+ end
81
+ ```
82
+
83
+ ## License
84
+
85
+ This package is released under the Apache License, Version 2.0. See LICENSE file for details.
86
+
87
+ ## Changes
88
+
89
+ **Version: 0.3.2**
90
+
91
+ - Feature: change ``module`` rule to include a choice between the existing `module_body` and a new `library_body`.
92
+ - the rules `rdf_def` and `type_class_def` from `module_body` to `library_body`.
93
+ * Feature: simplify rule `property_def` to simply be `member`.
94
+ - Feature: simplified entity identity member to be the same as all other members.
95
+ * Feature: remove the rule `feature_reference` entirely.
96
+
97
+ **Version: 0.3.1**
98
+
99
+ * Fix: regular expression for characters inside a string.
100
+ * Added `examples/escaped_strings.sdm` file for basic testing.
101
+ * Added `test/corpus/escaped_strings.sdm` file for more complete testing.
102
+
103
+ **Version: 0.3.0**
104
+
105
+ * Feature: simplified property definitions.
106
+ * Removed notion of role, a `property_def` is singular.
107
+ * Removed "in" keyword, `property_ref` uses "ref".
108
+ * Removed inverse names.
109
+
110
+ ```js
111
+ property_def: $ => seq(
112
+ keyword('property'),
113
+ $.member_def
114
+ ),
115
+ ```
116
+
117
+ * Feature: unified single definition of `member`.
118
+ * Changed member, is now *either* `property_ref` or `member_def`.
119
+ * Changed `property_def` to simply be `member_def`.
120
+ * Changed `entity_identity` to be `member`.
121
+ * Expect to add warning for unbounded cardinality for entity identities.
122
+
123
+ ```js
124
+ entity_identity: $ => seq(
125
+ keyword('identity'),
126
+ $.member
127
+ ),
128
+
129
+ member: $ => choice(
130
+ $.member_def,
131
+ $.property_ref,
132
+ ),
133
+
134
+ member_def: $ => seq(
135
+ field('name', $.identifier),
136
+ $._type_expression_to,
137
+ optional(field('body', $.annotation_only_body))
138
+ ),
139
+
140
+ property_ref: $ => seq(
141
+ keyword('ref'),
142
+ field('property', $.identifier_reference),
143
+ ),
144
+ ```
145
+
146
+ **Version: 0.2.14-16**
147
+
148
+ * Feature: simplified form of `rdf_def`.
149
+
150
+ **Version: 0.2.13**
151
+
152
+ * Feature: add `rdf_super_types` optional rule to `rdf_def`.
153
+
154
+ **Version: 0.2.12**
155
+
156
+ * Refactor: simplify the `rdf_thing_def` rule into `rdf_def`.
157
+
158
+ **Version: 0.2.11**
159
+
160
+ * Fix: rename field `uri` to `version_uri` on rule `module_import`.
161
+ * Refactor: clean-up test case names to match those in sdml-parse Rust crate.
162
+
163
+ **Version: 0.2.10**
164
+
165
+ * Feature: add version support to modules.
166
+ * Remove `base` keyword.
167
+ * Add optional `version` keyword and string/IRI version information.
168
+ * Add optional IRI after identifier for module imports.
169
+
170
+ **Version: 0.2.8/0.2.9**
171
+
172
+ * Feature: better support for RDF generation.
173
+ * Add direct support for RDF structures and properties rather than using SDML structures.
174
+ * see file `examples/rdf_schema.sdm`
175
+ * Remove keyword `"base"`, add new version clause on module definitions.
176
+ * see file `test/corpus/module_empty_with_version.sdm`
177
+
178
+ **Version: 0.2.7**
179
+
180
+ * Remove member group from grammar, can't find a use that isn't better done by moving members to a structure of their
181
+ own.
182
+
183
+ **Version: 0.2.6**
184
+
185
+ * Fix: test case typos.
186
+
187
+ **Version: 0.2.5**
188
+
189
+ * Feature: Inline type variables in type classes.
190
+
191
+ **Version: 0.2.4**
192
+
193
+ * Fix: tidy grammar for type classes.
194
+
195
+ **Version: 0.2.3**
196
+
197
+ * Feature: expand rule `sequence_of_predicate_values` to match `sequence_of_values` with value constructor, mapping value,
198
+ and identifier reference choices.
199
+ * Feature: simplify rule `value_variant` to remove the assignment to an unsigned value.
200
+ * Feature: change rule `feature_reference` to contain the identifier reference, update the rule `_type_expression_to` to
201
+ have a choice of `feature_reference` *or* `type_reference`.
202
+ * Fix: add field `byte` to rule `binary` to aid in parser and highlighting.
203
+
204
+ Along with minor changes in highlighting and examples.
205
+
206
+ **Version: 0.2.2**
207
+
208
+ * Feature: add rule `optional` for the operator "?" to allow for optional values. Also added to type reference rules.
209
+ * Fix: minor updates to type classes:
210
+ * Add: name `parameters` to the rule reference `type_class_parameters` in rule `type_class_def`.
211
+ * Rename: rule `type_variable_subtype` to `type_variable_restriction`.
212
+ * Remove: wildcard from top of rule `type_variable_restriction`.
213
+ * Add: ability to have multiple types in a restriction separated by "+".
214
+
215
+ **Version: 0.2.1**
216
+
217
+ This release is primarily to implement *type classes* that allow a better description of the standard library for
218
+ constraints. Adding this support identified some simplifications in functional terms and sequence builders.
219
+
220
+ ``` sdml
221
+ module example is
222
+ class Typed(T) is
223
+ def has_type(v -> T) → Type is
224
+ @skos:definition = "Returns the SDML type of the passed value."@en
225
+ @skos:example = "~type_of(rentals:Customer) = sdml:Entity~"
226
+ end
227
+ end
228
+ end
229
+
230
+ ```
231
+
232
+ * Feature: add type classes for managing the constraint language library.
233
+ * Add: rule `type_class_def` and list it as an alternative in `definition`.
234
+ * Add: rule `method_def` and include as member of `type_class_def`.
235
+ * Remove: choice `wildcard` from rule `function_type_reference`, wildcards are only allowed on type class parameters.
236
+ * Feature: simplify the rule `quantified_sentence` to only have a single quantified variable binding.
237
+ * Alter: field `binding` in `quantified_sentence` to remove the repeat.
238
+ * Alter: field `body` from `_quantified_body` to `constraint_sentence`.
239
+ * Rename: rule `quantifier_bound_names` to `quantified_variable` to denote singular.
240
+ * Alter: field `source` in `quantified_variable` to use existing `term`.
241
+ * Remove: rules `type_iterator` and `sequence_iterator`.
242
+ * Feature: simplify the structure of sequence builder to use `quantified_sentence` as body.
243
+ * Alter: field `body` in rule `sequence_builder` from `_variable_binding` to `sequence_builder_body`.
244
+ * Remove: rule `_variable_binding`.
245
+ * Add: rule `sequence_builder_body` which is simply a reference to rule `quantified_sentence`.
246
+ * Feature: add rule `actual_aruments` for use in rules `atomic_sentence` and `functional_term`.
247
+ * Refactor: rename boolean constants.
248
+ * Rename: `_boolean_true` to `boolean_truth`.
249
+ * Rename: `_boolean_false` to `boolean_falsity`.
250
+
251
+ **Version: 0.2.0**
252
+
253
+ This is a significant refactor intended to simplify the grammar, and reduce the number of constructs used where the
254
+ differentiation is not as significant as it looked previously.
255
+
256
+ * Refactor: simplify model overall, especially members and features.
257
+ * Refactor: combine by-value and by-reference member types.
258
+ * Remove: rules `member_by_value` and `role_by_value`.
259
+ * Rename: rule `member_by_reference` to `member` and `role_by_reference` to `member_role`.
260
+ * Remove: keyword the `ref` from rules `member` and `member_role`.
261
+ * Rename: rule `identity_member` to `entity_identity`.
262
+ * Refactor: combine structured type groups.
263
+ * Rename: rule `structure_body` to `structured_body`.
264
+ * Rename: rule `structure_group` to `member_group`.
265
+ * Move: common parts of structure and entity bodies into common `_structured_body_inner` rule.
266
+ * Refactor: move feature from a definition to a member modifier.
267
+ * Remove: rule `feature_set_def`, and update `definition` accordingly.
268
+ * Add: optional keyword `features` into the rule `_type_expression_to`.
269
+ * Feature: add new keyword `opaque` to datatype definition.
270
+ * Style: Use `:=` throughout for assignment /by definition/.
271
+ * Add: silent rule `_by_definition`.
272
+ * Alter: rules `value_variant`, `function_def`, and `constant_def` to use `_by_definition`.
273
+ * Style: rename rule `_property_member` to `_property_reference`.
274
+
275
+ **Version: 0.1.42**
276
+
277
+ * Feature: simplified `features` definition to be or/xor only.
278
+ * Replace: separate bodies with `UnionBody`.
279
+ * Add: cardinality now used to determine or/xor.
280
+
281
+ ``` ebnf
282
+ FeatureSetDef
283
+ ::= "features" Identifier Cardinality? UnionBody?
284
+ ```
285
+
286
+ **Version: 0.1.41**
287
+
288
+ * Feature: add support for features from Product Line Engineering.
289
+ * Add new definition rule `feature_set_def` to rule `definition`.
290
+ * Add *and*, *or*, *xor* bodies to `feature_set_def`.
291
+ * Add basic documentation to book.
292
+ * Feature: updates to builtin simple types.
293
+ * Add the new type `unsigned`.
294
+ * Add the new type `binary`.
295
+ * Rename type `iri_reference` to `iri`.
296
+
297
+ **Version: 0.1.40**
298
+
299
+ * Feature: add the Unicode character `↦` to the rule `_has_type` which works better for some typesetting.
300
+ * Feature: add rule for `inequation` alongside `equation`.
301
+ * Add new rule `inequation` and make it a choice within `simple_sentence`.
302
+ * Add new rules for inequality relations; `not_equal`, `less_than`, `less_than_or_equal`, `greater_than`, and `greater_than_or_equal`.
303
+ * Refactor: restructure rule `boolean_sentence` into a choice of `unary_boolean_sentence` and `binary_boolean_sentence`.
304
+ * Add rule `unary_boolean_sentence` for negation only.
305
+ * Add rule `binary_boolean_sentence` for logical connectives.
306
+ * Add rules for each logical connective keyword/operator symbols.
307
+ * Refactor: rename field `variable_binding` to ``binding` in rule `quantieid_sentence`.
308
+ * Refactor: use the same rule for empty set in value sequences.
309
+ * Refactor: rename rule `_function_type_expression_to` to `_function_type`.
310
+ * Refactor: add rules `_has_type` and `_type_restriction` and allow both ascii and Unicode arrows.
311
+ * Add rule `_has_type` for values `->` and `→`.
312
+ * Add rule `_type_restriction` for values `<-` and `←`.
313
+ * Fix: rules for new shared bindings had confusing names.
314
+ * Add rule `quantified_variable_binding`.
315
+ * Rename rule `quantifier_binding` to `quantifier_bound_names`.
316
+ * Docs: add appendix with details of Unicode usage.
317
+
318
+ **Version: 0.1.39**
319
+
320
+ * Feature: allow multiple bindings at the head of quantified sentences.
321
+ * Feature: made progress on local scopes in highlighting.
322
+ * Rename rule `_constant_def` to `constant_def`.
323
+ * To-do: currently references are not picking up their definition formatting.
324
+ * Refactor: rename rule `name_path` to `function_composition`.
325
+ * Refactor: combine components of the two rules `quantified_sentence` and `sequence_builder`.
326
+ * Add new shared rule `quantifier_binding` (along with `_bound_name_set`) now used in both sentence and builder.
327
+ * Add the ability to have more than one name in a binding.
328
+ * Add the ability for sequence builders to have more than one quantified binding.
329
+ * Change the field `expression` into a field named `body` of type `constraint_sentence`.
330
+ * Remove rules `expression` and `conjunctive_expression`.
331
+ * Style: change the order of choices in rule `predicate_value` to match `value` and corresponding sequences.
332
+
333
+ **Version: 0.1.38**
334
+
335
+ * Feature: Update naming for iterators to make them consistent.
336
+ * Rename rule `iterator_target` to `iterator_source`.
337
+ * Rename field `from` in `type_iterator` to `source`.
338
+ * Rename field `from` in `sequence_iterator` to `source`.
339
+
340
+ **Version: 0.1.37**
341
+
342
+ * Feature: update rule `function_cardinality_expression` to allow sequence constraints.
343
+ * Rename rule `any_type` to `wildcard`.
344
+ * Remove rule `any_cardinality` and replace with `wildcard`.
345
+ * Feature: rename lists to sequences.
346
+ * Rename rule `list_of_predicate_values` to `sequence_of_predicate_values`.
347
+ * Rename rule `list_of_values` to `sequence_of_values`.
348
+ * Feature: make rule `property_role` private as `_property_role`.
349
+ * Feature: allow sequence constraints on sequence values.
350
+ * Add rule `_sequence_value_constraints`.
351
+ * Add optional `_sequence_value_constraints` to rule `sequence_of_predicate_values`.
352
+ * Add optional `_sequence_value_constraints` to rule `sequence_of_values`.
353
+
354
+ **Version: 0.1.36**
355
+
356
+ * Feature: alter the rule `sequence_comprehension` to be more flexible.
357
+ * Rename rule `sequence_comprehension` to `sequence_builder`.
358
+ * Rename rule `returned_value` to `variables` and re-write as a choice of:
359
+ * Add rule `tuple_variable` to return distinct variables.
360
+ * Add rule `sequence_variable` to return distinct variables as a sequence.
361
+ * Add rule `mapping_variable` to return two variables as a mapping.
362
+
363
+ **Version: 0.1.35**
364
+
365
+ * Feature: alter the rule `_property_member` to allow property names to be `identifier_reference`.
366
+ * New interpretation, field `name` in a member will be the name of a role.
367
+ * Renamed keyword `in`, not `as`.
368
+ * Renamed field `role` to `property` and made it's type `identifier_reference`.
369
+
370
+ **Version: 0.1.34**
371
+
372
+ * Feature: update property definitions to look more like members.
373
+ * Update rule `property_role` to be a choice of three new rules.
374
+ * Add rule `identity_role` which is a subset of `identity_member`.
375
+ * Add rule `role_by_value` which is a subset of `member_by_value`.
376
+ * Add rule `role_by_reference` which is a subset of `member_by_reference`.
377
+
378
+ **Version: 0.1.33**
379
+
380
+ * Feature: renamed quantifier binding targets to be more consistent.
381
+ * Rename rule `binding_target` to `iterator_target`.
382
+ * Rename rule `binding_type_reference` to `type_iterator` and field name `from_type` to `from`.
383
+ * Rename rule `binding_seq_iterator` to `sequence_iterator` and field name `from_sequence` to `from`.
384
+ * Feature: simplified the rule `environment_definition` and made naming more consistent.
385
+ * Remove optional `signature` field
386
+ * Remove assignment operators
387
+ * Rename field name `rhs` to `body` and change to a choice of `function_def` or `_value_def`.
388
+ * Add rule `function_def` to hold the signature and operators removed from the environment definition.
389
+ * Rename rule `fn_parameter` to `function_parameter`.
390
+ * Rename rule `_fn_type` to `_function_type_expression_to`.
391
+ * Add rules `function_cardinality_expression` and `any_cardinality` to capture cardinality or wildcard.
392
+ * Add rule `function_type_reference` to allow wildcards.
393
+ * Feature: update queries `highlights`, `locals`, and `tags` for all changes above.
394
+ * Docs: update BNF syntax and diagrams for all changes above.
395
+
396
+ **Version: 0.1.32**
397
+
398
+ * Feature: update environment definition sequence types to use the same syntax as member type and cardinality.
399
+
400
+ **Version: 0.1.31**
401
+
402
+ * Feature: update highlighting queries for constraints with support for locals.
403
+ * Feature: add a `locals.scm` file with scopes for formal constraints.
404
+ * Feature: add `∅` (empty set) as a synonym for `[]` in constraints.
405
+ * Fix: update the mapping value test case to use domain/range field names.
406
+
407
+ **Version: 0.1.30**
408
+
409
+ * Feature (minor): added field names for the domain and range of mapping types and values.
410
+
411
+ **Version: 0.1.29**
412
+
413
+ * Fix: an apparent regression, the value for a constructor changed from `simple_value` to `value`. This changes it back.
414
+
415
+ **Version: 0.1.28**
416
+
417
+ * Feature: add a mapping type and corresponding value syntax.
418
+
419
+ **Version: 0.1.27**
420
+
421
+ * Feature: add *ordering* and *uniqueness* constraints into the cardinality expression. Used to constrain the sequence
422
+ type of a member.
423
+
424
+ **Version: 0.1.26**
425
+
426
+ * Feature: applied same change as 0.1.25 but for property roles as well.
427
+
428
+ **Version: 0.1.25**
429
+
430
+ * Feature: changed grammar for reference members:
431
+ * The production `source_cardinality` has been removed.
432
+ * The production `member_inverse_name` has been added.
433
+
434
+ **Version: 0.1.24**
435
+
436
+ * Feature: constraint changes
437
+ * Add a *language-tag* to informal constraints.
438
+ * Add a *wildcard type* for the constraint language.
439
+
440
+ **Version: 0.1.23**
441
+
442
+ * Feature: add highlighting test for constraints, had to tweak a few things.
443
+
444
+ **Version: 0.1.22**
445
+
446
+ * Feature: clarify rules and associated meaning.
447
+ * Rename the grammar rule `type_definition` to `definition` to address the fact that property definitions aren't types.
448
+ * Rename the grammar rule `enum_variant` to `value_variant` to align with `type_variant` on unions.
449
+
450
+ **Version: 0.1.21**
451
+
452
+ * Feature: add support for sequence builder support(set builder) syntax.
453
+ * Fix: highlighting/indent/fold updated for constraints.
454
+ * Style: a number of cosmetic changes to formal constraints.
455
+
456
+ **Version: 0.1.19/0.1.20**
457
+
458
+ * Fix: minor change to add a field name to the '..' range operator.
459
+
460
+ **Version: 0.1.18**
461
+
462
+ * Feature: add a constraint assertion construct. This allows for specific constraints to be documented for any model element.
463
+ * The grammar rule `annotation` has been renamed `annotation_property`
464
+ * The grammar rule `constraint` has been added.
465
+ * A new grammar rule named `annotation` is defined as a choice of `annotation_property` or `constraint`.
466
+ * This allows the use of the old rule to be subsumed by the new definition.
467
+ * Constraints can be written in informal unstructured fashion or an embedded formalism.
468
+ * The informal representation is simply a string.
469
+ * The formal representation is a syntax that maps to a subset of [ISO/IEC 24707:2018](https://www.iso.org/standard/66249.html) Common Logic.
470
+ * More documentation added on the RDF mapping and the domain modeling process.
471
+
472
+ ``` sdml
473
+ module example is
474
+
475
+ import tag
476
+
477
+ structure Thing is
478
+
479
+ inner -> {0..} InnerThing is
480
+ ;; informal
481
+ assert same_tags = "All inner tags contain a tag value \"This\"."
482
+ ;; formal
483
+ assert same_tags_formal is
484
+ forall self ( not_empty(self) and contains(self.tags "This") )
485
+ end
486
+ end
487
+
488
+ end
489
+
490
+ structure InnerThing is
491
+ tags -> {0..} tag:Tag
492
+ end
493
+
494
+ end
495
+ ```
496
+
497
+ **Version: 0.1.17**
498
+
499
+ * Fixed highlighting for properties.
500
+
501
+ **Version: 0.1.16**
502
+
503
+ * Adjusted property grammar.
504
+ * Started on property documentation.
505
+
506
+ ``` sdml
507
+ module ddict is
508
+ import account
509
+
510
+ property accountId is
511
+ @skos:prefLabel = "accountId"@en
512
+ @skos:altLabel = "account_id"@en
513
+
514
+ identifier -> {1} account:AccountId is
515
+ @skos:definition = "Used as an identifier for account-scoped things"@en
516
+ end
517
+
518
+ reference ref {1} -> {1} account:AccountId
519
+ end
520
+
521
+ structure Account is
522
+ accountId as identifier
523
+ name -> string
524
+ end
525
+
526
+ end
527
+ ```
528
+
529
+ **Version: 0.1.15**
530
+
531
+ * Added new structure to the grammar to allow data-dictionary style reusable property definitions.
532
+
533
+ ``` sdml
534
+ module ddict is
535
+ import account
536
+
537
+ property accountId -> account:AccountId is
538
+ @skos:prefLabel = "accountId"@en
539
+ @skos:altLabel = "account_id"@en
540
+
541
+ identifier is
542
+ @skos:definition = "Used as ..."@en
543
+ end
544
+
545
+ default = {1..1}
546
+ end
547
+
548
+ structure Account is
549
+ accountId as default
550
+ name -> string
551
+ end
552
+
553
+ end
554
+
555
+ ```
556
+
557
+ **Version: 0.1.14**
558
+
559
+ * Added new rule named `builtin_simple_type` (choice of `string`, `double`, `decimal`, `integer`, `boolean`, and `iri`):
560
+ * replaced `identifier_reference` with new rule `data_type_base` for `data_type_def`,
561
+ * added to the `type_reference` choice used for the member `target` field.
562
+
563
+ Allows both:
564
+
565
+ ``` sdml
566
+ module example is
567
+
568
+ datatype mystring <- string
569
+
570
+ structure Person is
571
+ name -> string
572
+ age -> integer
573
+ end
574
+ end
575
+ ```
576
+
577
+ Where the keywords `string` and `integer` will be expanded into the qualified identifiers `sdml:string` and
578
+ `sdml:integer` respectively.
579
+
580
+ **Version: 0.1.13**
581
+
582
+ * Added explicit `base` grammar for module rather than using `xml:base` as an attribute.
583
+ * Expanded grammar for `Identifier` to allow decimal digits in any position *after* the first.
584
+ * Clarified the grammar for `TypeVariant`.
585
+
586
+ Introduces:
587
+
588
+ ```sdml
589
+ module example base <https://example.org/v/example> is
590
+ end
591
+ ```
592
+
593
+ Which replaces the annotation form:
594
+
595
+ ```sdml
596
+ module example is
597
+ import xml
598
+
599
+ @xml:base = <https://example.org/v/example>
600
+ end
601
+ ```
602
+
603
+ **Version: 0.1.12**
604
+
605
+ * Fixed highlight issue for annotations with `IdentifierReference` values
606
+ * Added field for `TypeVariant` name
607
+
608
+ **Version: 0.1.11**
609
+
610
+ * Added a rename to optional value to `TypeVariant`
611
+ * Fixed `annotation` and `language_tag` grammar rule conflict
612
+
613
+ Introduces:
614
+
615
+ ```sdml
616
+ module example is
617
+
618
+ union Example is
619
+ Variant1
620
+ Variant1 as Alternative
621
+ end
622
+ end
623
+ ```
624
+
625
+ This allows the use of the same type as a variant more than once if the new identifier is unique within the same `union`.
626
+
627
+ **Version: 0.1.10**
628
+
629
+ * Cleaned up queries.
630
+
631
+ **Version: 0.1.9**
632
+
633
+ * Simplified the disjoint `UnionDef` type.
634
+
635
+ **Version: 0.1.8**
636
+
637
+ * Added a disjoint `UnionDef` type.
638
+
639
+ **Version: 0.1.7**
640
+
641
+ * Made field name `sourceCardinality` into `source_cardinality`.
642
+ * Made field name `targetCardinality` into `target_cardinality`.
643
+ * Added versioning annotations
644
+
645
+ **Version: 0.1.6**
646
+
647
+ * Made `_simple_value` into `simple_value` named rule.
648
+ * Made `_type_reference` into `type_reference` named rule.
649
+
650
+ # Additional Links
651
+
652
+ * Node bindings -- [npm.js](https://www.npmjs.com/package/tree-sitter-sdml)
653
+ * Rust bindings -- [crates.io](https://crates.io/crates/tree-sitter-sdml)
654
+ * Emacs -- [sdml-mode](https://github.com/johnstonskj/emacs-sdml-mode)
655
+ * Command-line tool -- [rust-sdml](https://github.com/johnstonskj/rust-sdml)
@@ -0,0 +1,33 @@
1
+ tree_sitter_sdml/__init__.py,sha256=g0qr3eU5qacqFg6h3LRXWM-gR6DWB_2reNaa2e3YHGg,87
2
+ tree_sitter_sdml/__init__.pyi,sha256=8xf7bY1szgDY9HRJ7FJ326So4SFgMiSRfCB4LADkTpU,27
3
+ tree_sitter_sdml/_binding.abi3.so,sha256=YPyadOI54w5WWW4Bg0F7MrXygXxxmd5PYcSOfLEbhLg,118432
4
+ tree_sitter_sdml/binding.c,sha256=hIOIfEB_EZtSOw-YXhtUC6hrjVcWu1dprH4Mqr_mQgA,632
5
+ tree_sitter_sdml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ tree_sitter_sdml/queries/#folds.scm#,sha256=igzAbPvIdU_gk9Vwz-YIDw5w32TPPsut7JclxWtWTeU,529
7
+ tree_sitter_sdml/queries/.folds.scm.~undo-tree~,sha256=rNxjxSpl5L3fhRu7_YLyW92LMdZmq6JXKRJfFXca-nM,134
8
+ tree_sitter_sdml/queries/.highlight.scm.~undo-tree~,sha256=GeRV1gOBy-Zo5e7uco7KSlsFaN3tdCW_2xFRXDkJ2cI,31234
9
+ tree_sitter_sdml/queries/.highlight.scm~.~undo-tree~,sha256=4VcGkuSK7gj5FqcyI7MM_S5T97T5oAWLD7vTzFk2XXQ,134
10
+ tree_sitter_sdml/queries/.highlights.scm.~undo-tree~,sha256=n1xgkRVeev2JpMjGb_ukTN9jxRYtMHWgOnELEsQ4_PA,7728
11
+ tree_sitter_sdml/queries/.indent.scm.~undo-tree~,sha256=WFASYbFcVHO9mAdw-H6HDjJZIPnhxHlcWvhuEz2IXlA,134
12
+ tree_sitter_sdml/queries/.injections.scm.~undo-tree~,sha256=Rw_tBQsYiKsX4G1ECO2qiVkux0jNDZT2phetLrcUXwM,332
13
+ tree_sitter_sdml/queries/.lint.scm.~undo-tree~,sha256=FgZFXsALe1ojhYykVmnQdsIbQ8WyaHVrftChvvQ0_nU,546
14
+ tree_sitter_sdml/queries/.locals.scm.~undo-tree~,sha256=2MJ2iRA4tY_pBwVs7WO6nJHIzBLcsQZ6FAFRrSHyk5M,1914
15
+ tree_sitter_sdml/queries/.tags.scm.~undo-tree~,sha256=pgcjhDvcJkoGfdHDd_SBfCSNJr-9P3yL1NhNX_T8qkE,11061
16
+ tree_sitter_sdml/queries/folds.scm,sha256=fyd-lQ_3emx-P7OuBMH5WSPlzzZc461_it7p8Z48kGo,472
17
+ tree_sitter_sdml/queries/folds.scm~,sha256=7G53Xj3pwm7BFlluZhZ1FEZYxzfBSggvvYkQUPPow1A,49
18
+ tree_sitter_sdml/queries/highlight.scm~,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ tree_sitter_sdml/queries/highlights.scm,sha256=oM1prpNULnhnDPVExT3wUannVdghIM55pCYzs3cFjnM,7280
20
+ tree_sitter_sdml/queries/highlights.scm~,sha256=Nvho17DzknlZ_VrfVzm8alsuKNxUymuhsS-1LLBcQ4M,7402
21
+ tree_sitter_sdml/queries/indent.scm,sha256=O4BKwJ4mCh7Zb6a-e5NCPVOVy9g5qMGkTwoPaZEO_3I,464
22
+ tree_sitter_sdml/queries/indent.scm~,sha256=ysLSQWeywg0-EH2rWAxDAf223wZ3tp-yTMZZWY6PPxw,116
23
+ tree_sitter_sdml/queries/injections.scm,sha256=XEprwRpmwlL_J97Qr3FyCzSNznOAHClTjckdOyR6kAY,53
24
+ tree_sitter_sdml/queries/injections.scm~,sha256=5384Ze9oDdtZa3K1qQhmXGqYd3j4ze3sZHhLJCFHcws,55
25
+ tree_sitter_sdml/queries/locals.scm,sha256=a_5K6NGhz6tel9payFdnlj82s5jqoJn6nhRhsQDcpN4,666
26
+ tree_sitter_sdml/queries/locals.scm~,sha256=Dx8am35X2Sbu6cy6HwQvmVlZbZ27E-mVE0jJDSk83k4,548
27
+ tree_sitter_sdml/queries/tags.scm,sha256=qC9l8nzdQ_V9s116O4LpkxNQcqeLG_fyL5kJ088dYG8,2336
28
+ tree_sitter_sdml/queries/tags.scm~,sha256=HuJLfKiUvF2ltUF6FC-whpo_K0KytsyrKSW3XK7DKLY,1882
29
+ tree_sitter_sdml-0.3.2.dist-info/LICENSE,sha256=ytBxqQZCbPKUHbrMy-bIbGyWK1FjiuUmE-PncsC2yTU,579
30
+ tree_sitter_sdml-0.3.2.dist-info/METADATA,sha256=iqAfYOd4H9JCrtUxMyj5LHnYDx2Jad6mHWN3MV_qaP0,22760
31
+ tree_sitter_sdml-0.3.2.dist-info/WHEEL,sha256=GByMRxydk8kcK0C94ijaC3CX0BdA0094B2Hgiq7HBm4,108
32
+ tree_sitter_sdml-0.3.2.dist-info/top_level.txt,sha256=mjYcPEFKBqOfnZnvfs53_iiNcwLJ4gnYmgtQmFeY0i4,26
33
+ tree_sitter_sdml-0.3.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.43.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-abi3-macosx_14_0_arm64
5
+
@@ -0,0 +1,2 @@
1
+ _binding
2
+ tree_sitter_sdml