expressir 2.4.31-arm-linux → 2.4.36-arm-linux
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.
- checksums.yaml +4 -4
- data/.github/workflows/conformance.yml +34 -0
- data/.gitignore +3 -0
- data/Gemfile +1 -1
- data/TODO.eengine/00-overview.md +39 -0
- data/TODO.eengine/01-resolution-diagnostics.md +30 -0
- data/TODO.eengine/02-check-catalog-completion.md +53 -0
- data/TODO.eengine/03-entity-computations.md +22 -0
- data/TODO.eengine/04-shtolo-rule-audit.md +32 -0
- data/TODO.eengine/05-shtolo-longform-flatten.md +12 -0
- data/TODO.eengine/06-population-p21.md +34 -0
- data/TODO.eengine/07-schema-compare-patch.md +25 -0
- data/TODO.eengine/08-official-corpus-gate.md +7 -0
- data/TODO.eengine/09-mim-mapping-parser.md +9 -0
- data/TODO.parity-ee/00-overview.md +1 -1
- data/TODO.sota/00-overview.md +57 -0
- data/TODO.sota/01-type-checking.md +115 -0
- data/TODO.sota/02-evaluator.md +86 -0
- data/TODO.sota/03-conformance.md +53 -0
- data/TODO.sota/04-lsp.md +70 -0
- data/TODO.sota/05-interop.md +55 -0
- data/TODO.sota/06-dialects.md +57 -0
- data/TODO.sota/07-reference-artifacts.md +55 -0
- data/TODO.suma-improvements/07-part28-xml.md +10 -13
- data/docs/_guides/interop/index.adoc +25 -0
- data/docs/_guides/interop/json-schema.adoc +88 -0
- data/docs/_guides/interop/owl-rdf.adoc +87 -0
- data/docs/_guides/reference/checker-notes.adoc +55 -0
- data/docs/_guides/reference/checker.adoc +36 -0
- data/docs/_guides/reference/evaluator.adoc +40 -0
- data/docs/_guides/reference/grammar-crosswalk.adoc +299 -0
- data/docs/_guides/reference/index.adoc +22 -0
- data/docs/_guides/reference/lsp.adoc +41 -0
- data/docs/_guides/reference/p21.adoc +30 -0
- data/docs/_guides/reference/shtolo.adoc +36 -0
- data/exe/expressir-lsp +6 -0
- data/expressir.gemspec +2 -2
- data/lib/expressir/3.2/expressir_core.so +0 -0
- data/lib/expressir/3.3/expressir_core.so +0 -0
- data/lib/expressir/3.4/expressir_core.so +0 -0
- data/lib/expressir/4.0/expressir_core.so +0 -0
- data/lib/expressir/cli.rb +25 -0
- data/lib/expressir/commands/check.rb +3 -1
- data/lib/expressir/commands/export_json_schema.rb +29 -0
- data/lib/expressir/commands/export_owl.rb +26 -0
- data/lib/expressir/commands/smrl_xml_index.rb +25 -0
- data/lib/expressir/commands/validate.rb +3 -0
- data/lib/expressir/commands.rb +3 -0
- data/lib/expressir/conformance/trend.rb +100 -0
- data/lib/expressir/conformance.rb +8 -0
- data/lib/expressir/eval/environment.rb +83 -0
- data/lib/expressir/eval/expression.rb +610 -0
- data/lib/expressir/eval/interpreter.rb +316 -0
- data/lib/expressir/eval/rules.rb +88 -0
- data/lib/expressir/eval/values.rb +74 -0
- data/lib/expressir/eval.rb +17 -0
- data/lib/expressir/express/builder.rb +17 -5
- data/lib/expressir/express/builders/entity_decl_builder.rb +17 -5
- data/lib/expressir/express/builders/expression_builder.rb +9 -1
- data/lib/expressir/express/checker.rb +970 -5
- data/lib/expressir/express/dialect.rb +44 -0
- data/lib/expressir/express/formatters/declarations_formatter.rb +21 -14
- data/lib/expressir/express/formatters/expressions_formatter.rb +4 -1
- data/lib/expressir/express/parser.rb +9 -4
- data/lib/expressir/express/pretty_formatter.rb +9 -14
- data/lib/expressir/express/schema_compare.rb +194 -0
- data/lib/expressir/express/shtolo.rb +194 -63
- data/lib/expressir/express.rb +3 -0
- data/lib/expressir/interop/json_schema.rb +195 -0
- data/lib/expressir/interop/owl.rb +216 -0
- data/lib/expressir/interop.rb +13 -0
- data/lib/expressir/lsp/document.rb +226 -0
- data/lib/expressir/lsp/server.rb +184 -0
- data/lib/expressir/lsp/workspace.rb +402 -0
- data/lib/expressir/lsp.rb +11 -0
- data/lib/expressir/model/declarations/entity.rb +132 -0
- data/lib/expressir/model/declarations/schema.rb +37 -6
- data/lib/expressir/p21/builder.rb +92 -0
- data/lib/expressir/p21/grammar.rb +107 -0
- data/lib/expressir/p21/parser.rb +16 -0
- data/lib/expressir/p21/population.rb +35 -0
- data/lib/expressir/p21/validator.rb +213 -0
- data/lib/expressir/p21.rb +17 -0
- data/lib/expressir/reference/grammar_crosswalk.rb +122 -0
- data/lib/expressir/reference/grammar_crosswalk.yml +800 -0
- data/lib/expressir/reference/note_catalog.rb +54 -0
- data/lib/expressir/reference.rb +10 -0
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +5 -0
- data/lib/tasks/conformance.rake +27 -0
- data/lib/tasks/reference.rake +25 -0
- metadata +68 -4
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
= Grammar cross-walk
|
|
2
|
+
|
|
3
|
+
// Generated by `rake reference:crosswalk` from
|
|
4
|
+
// lib/expressir/express/grammar/parser.rb and the Annex A snapshot.
|
|
5
|
+
// Do not edit by hand; the reference spec fails when this file is stale.
|
|
6
|
+
|
|
7
|
+
== Purpose
|
|
8
|
+
|
|
9
|
+
Every parsanol grammar rule is mapped to the ISO 10303-11:2004
|
|
10
|
+
Annex A production it implements. Divergences from the standard
|
|
11
|
+
grammar are classified with one of these statuses:
|
|
12
|
+
|
|
13
|
+
* `aligned` — The grammar rule implements the same-named Annex production.
|
|
14
|
+
* `decomposed` — The grammar rule is one piece of an Annex production that the PEG splits.
|
|
15
|
+
* `token` — Literal operator/delimiter token; Annex A names keywords but not punctuation.
|
|
16
|
+
* `lexical` — Character-class or whitespace handling inlined in the PEG (clause 7).
|
|
17
|
+
* `internal` — PEG-internal rule with no Annex counterpart.
|
|
18
|
+
* `support-code` — Handled by supporting Ruby code rather than a grammar rule.
|
|
19
|
+
|
|
20
|
+
== Rules
|
|
21
|
+
|
|
22
|
+
[cols="2,3,1,4", options="header"]
|
|
23
|
+
|===
|
|
24
|
+
| Parsanol rule | Annex A production | Status | Note
|
|
25
|
+
|
|
26
|
+
| `abstractEntityDeclaration` | abstract_entity_declaration | aligned |
|
|
27
|
+
| `abstractSupertype` | abstract_supertype | aligned |
|
|
28
|
+
| `abstractSupertypeDeclaration` | abstract_supertype_declaration | aligned |
|
|
29
|
+
| `actualParameterList` | actual_parameter_list | aligned |
|
|
30
|
+
| `addLikeOp` | add_like_op | aligned |
|
|
31
|
+
| `aggregateInitializer` | aggregate_initializer | aligned |
|
|
32
|
+
| `aggregateSource` | aggregate_source | aligned |
|
|
33
|
+
| `aggregateType` | aggregate_type | aligned |
|
|
34
|
+
| `aggregationTypes` | aggregation_types | aligned |
|
|
35
|
+
| `algorithmHead` | algorithm_head | aligned |
|
|
36
|
+
| `aliasStmt` | alias_stmt | aligned |
|
|
37
|
+
| `anyKeyword` | | internal | keyword guard that keeps identifiers from consuming reserved words
|
|
38
|
+
| `arrayType` | array_type | aligned |
|
|
39
|
+
| `assignmentStmt` | assignment_stmt | aligned |
|
|
40
|
+
| `attributeDecl` | attribute_decl | aligned |
|
|
41
|
+
| `attributeId` | attribute_id | aligned |
|
|
42
|
+
| `attributeQualifier` | attribute_qualifier | aligned |
|
|
43
|
+
| `attributeRef` | attribute_ref | aligned |
|
|
44
|
+
| `bagType` | bag_type | aligned |
|
|
45
|
+
| `binaryLiteral` | binary_literal | aligned |
|
|
46
|
+
| `binaryType` | binary_type | aligned |
|
|
47
|
+
| `bit` | bit | aligned |
|
|
48
|
+
| `booleanType` | boolean_type | aligned |
|
|
49
|
+
| `bound1` | bound_1 | aligned |
|
|
50
|
+
| `bound2` | bound_2 | aligned |
|
|
51
|
+
| `boundSpec` | bound_spec | aligned |
|
|
52
|
+
| `builtInConstant` | built_in_constant | aligned |
|
|
53
|
+
| `builtInFunction` | built_in_function | aligned |
|
|
54
|
+
| `builtInProcedure` | built_in_procedure | aligned |
|
|
55
|
+
| `caseAction` | case_action | aligned |
|
|
56
|
+
| `caseLabel` | case_label | aligned |
|
|
57
|
+
| `caseStmt` | case_stmt | aligned |
|
|
58
|
+
| `compoundStmt` | compound_stmt | aligned |
|
|
59
|
+
| `concreteTypes` | concrete_types | aligned |
|
|
60
|
+
| `constantBody` | constant_body | aligned |
|
|
61
|
+
| `constantDecl` | constant_decl | aligned |
|
|
62
|
+
| `constantFactor` | constant_factor | aligned |
|
|
63
|
+
| `constantId` | constant_id | aligned |
|
|
64
|
+
| `constantRef` | constant_ref | aligned |
|
|
65
|
+
| `constructedTypes` | constructed_types | aligned |
|
|
66
|
+
| `declaration` | declaration | aligned |
|
|
67
|
+
| `delim` | | lexical | the delimiter semicolon (7.3)
|
|
68
|
+
| `deriveClause` | derive_clause | aligned |
|
|
69
|
+
| `derivedAttr` | derived_attr | aligned |
|
|
70
|
+
| `digit` | digit | aligned |
|
|
71
|
+
| `digits` | digits | aligned |
|
|
72
|
+
| `domainRule` | domain_rule | aligned |
|
|
73
|
+
| `element` | element | aligned |
|
|
74
|
+
| `embeddedRemark` | embedded_remark | aligned |
|
|
75
|
+
| `encodedCharacter` | encoded_character | aligned |
|
|
76
|
+
| `encodedStringLiteral` | encoded_string_literal | aligned |
|
|
77
|
+
| `entityBody` | entity_body | aligned |
|
|
78
|
+
| `entityConstructor` | entity_constructor | aligned |
|
|
79
|
+
| `entityDecl` | entity_decl | aligned |
|
|
80
|
+
| `entityHead` | entity_head | aligned |
|
|
81
|
+
| `entityId` | entity_id | aligned |
|
|
82
|
+
| `entityRef` | entity_ref | aligned |
|
|
83
|
+
| `enumerationExtension` | enumeration_extension | aligned |
|
|
84
|
+
| `enumerationId` | enumeration_id | aligned |
|
|
85
|
+
| `enumerationItem` | enumeration_items | decomposed |
|
|
86
|
+
| `enumerationItems` | enumeration_items | aligned |
|
|
87
|
+
| `enumerationRef` | enumeration_ref | aligned |
|
|
88
|
+
| `enumerationReference` | enumeration_reference | aligned |
|
|
89
|
+
| `enumerationType` | enumeration_type | aligned |
|
|
90
|
+
| `escapeStmt` | escape_stmt | aligned |
|
|
91
|
+
| `explicitAttr` | explicit_attr | aligned |
|
|
92
|
+
| `expression` | expression | aligned |
|
|
93
|
+
| `factor` | factor | aligned |
|
|
94
|
+
| `formalParameter` | formal_parameter | aligned |
|
|
95
|
+
| `functionCall` | function_call | aligned |
|
|
96
|
+
| `functionDecl` | function_decl | aligned |
|
|
97
|
+
| `functionHead` | function_head | aligned |
|
|
98
|
+
| `functionId` | function_id | aligned |
|
|
99
|
+
| `functionRef` | function_ref | aligned |
|
|
100
|
+
| `generalAggregationTypes` | general_aggregation_types | aligned |
|
|
101
|
+
| `generalArrayType` | general_array_type | aligned |
|
|
102
|
+
| `generalBagType` | general_bag_type | aligned |
|
|
103
|
+
| `generalListType` | general_list_type | aligned |
|
|
104
|
+
| `generalRef` | general_ref | aligned |
|
|
105
|
+
| `generalSetType` | general_set_type | aligned |
|
|
106
|
+
| `generalizedTypes` | generalized_types | aligned |
|
|
107
|
+
| `genericEntityType` | generic_entity_type | aligned |
|
|
108
|
+
| `genericType` | generic_type | aligned |
|
|
109
|
+
| `groupQualifier` | group_qualifier | aligned |
|
|
110
|
+
| `hexDigit` | hex_digit | aligned |
|
|
111
|
+
| `ifStmt` | if_stmt | aligned |
|
|
112
|
+
| `ifStmtElseStatements` | if_stmt | decomposed |
|
|
113
|
+
| `ifStmtStatements` | if_stmt | decomposed |
|
|
114
|
+
| `increment` | increment | aligned |
|
|
115
|
+
| `incrementControl` | increment_control | aligned |
|
|
116
|
+
| `index` | index | aligned |
|
|
117
|
+
| `index1` | index_1 | aligned |
|
|
118
|
+
| `index2` | index_2 | aligned |
|
|
119
|
+
| `indexQualifier` | index_qualifier | aligned |
|
|
120
|
+
| `instantiableType` | instantiable_type | aligned |
|
|
121
|
+
| `integerLiteral` | integer_literal | aligned |
|
|
122
|
+
| `integerType` | integer_type | aligned |
|
|
123
|
+
| `interfaceSpecification` | interface_specification | aligned |
|
|
124
|
+
| `interval` | interval | aligned |
|
|
125
|
+
| `intervalHigh` | interval_high | aligned |
|
|
126
|
+
| `intervalItem` | interval_item | aligned |
|
|
127
|
+
| `intervalLow` | interval_low | aligned |
|
|
128
|
+
| `intervalOp` | interval_op | aligned |
|
|
129
|
+
| `inverseAttr` | inverse_attr | aligned |
|
|
130
|
+
| `inverseAttrType` | inverse_attr | decomposed |
|
|
131
|
+
| `inverseClause` | inverse_clause | aligned |
|
|
132
|
+
| `letter` | letter | aligned |
|
|
133
|
+
| `listType` | list_type | aligned |
|
|
134
|
+
| `literal` | literal | aligned |
|
|
135
|
+
| `localDecl` | local_decl | aligned |
|
|
136
|
+
| `localVariable` | local_variable | aligned |
|
|
137
|
+
| `logicalExpression` | logical_expression | aligned |
|
|
138
|
+
| `logicalLiteral` | logical_literal | aligned |
|
|
139
|
+
| `logicalType` | logical_type | aligned |
|
|
140
|
+
| `multiplicationLikeOp` | multiplication_like_op | aligned |
|
|
141
|
+
| `namedTypeOrRename` | named_type_or_rename | aligned |
|
|
142
|
+
| `namedTypes` | named_types | aligned |
|
|
143
|
+
| `nullStmt` | null_stmt | aligned |
|
|
144
|
+
| `numberType` | number_type | aligned |
|
|
145
|
+
| `numericExpression` | numeric_expression | aligned |
|
|
146
|
+
| `octet` | octet | aligned |
|
|
147
|
+
| `oneOf` | one_of | aligned |
|
|
148
|
+
| `op_asterisk` | | token | literal `*`
|
|
149
|
+
| `op_colon` | | token | literal `:`
|
|
150
|
+
| `op_colon_equals_colon` | | token | literal `:=:`
|
|
151
|
+
| `op_colon_less_greater_colon` | | token | literal `:<>:`
|
|
152
|
+
| `op_comma` | | token | literal `,`
|
|
153
|
+
| `op_decl` | | token | literal `:=`
|
|
154
|
+
| `op_delim` | | token | literal `;`
|
|
155
|
+
| `op_double_asterisk` | | token | literal `**`
|
|
156
|
+
| `op_double_backslash` | | token | literal `\`
|
|
157
|
+
| `op_double_pipe` | | token | literal `\|\|`
|
|
158
|
+
| `op_equals` | | token | literal `=`
|
|
159
|
+
| `op_greater_equal` | | token | literal `>=`
|
|
160
|
+
| `op_greater_than` | | token | literal `>`
|
|
161
|
+
| `op_left_curly_brace` | | token | literal `{`
|
|
162
|
+
| `op_leftbracket` | | token | literal `[`
|
|
163
|
+
| `op_leftparen` | | token | literal `(`
|
|
164
|
+
| `op_less_equal` | | token | literal `<=`
|
|
165
|
+
| `op_less_greater` | | token | literal `<>`
|
|
166
|
+
| `op_less_than` | | token | literal `<`
|
|
167
|
+
| `op_minus` | | token | literal `-`
|
|
168
|
+
| `op_period` | | token | literal `.`
|
|
169
|
+
| `op_pipe` | | token | literal `\|`
|
|
170
|
+
| `op_plus` | | token | literal `+`
|
|
171
|
+
| `op_query_begin` | | token | literal `<*`
|
|
172
|
+
| `op_query_end` | | token | literal `*>`
|
|
173
|
+
| `op_question_mark` | | token | literal `?`
|
|
174
|
+
| `op_right_curly_brace` | | token | literal `}`
|
|
175
|
+
| `op_rightbracket` | | token | literal `]`
|
|
176
|
+
| `op_rightparen` | | token | literal `)`
|
|
177
|
+
| `op_slash` | | token | literal `/`
|
|
178
|
+
| `parameter` | parameter | aligned |
|
|
179
|
+
| `parameterId` | parameter_id | aligned |
|
|
180
|
+
| `parameterRef` | parameter_ref | aligned |
|
|
181
|
+
| `parameterType` | parameter_type | aligned |
|
|
182
|
+
| `population` | population | aligned |
|
|
183
|
+
| `precisionSpec` | precision_spec | aligned |
|
|
184
|
+
| `primary` | primary | aligned |
|
|
185
|
+
| `procedureCallStmt` | procedure_call_stmt | aligned |
|
|
186
|
+
| `procedureDecl` | procedure_decl | aligned |
|
|
187
|
+
| `procedureHead` | procedure_head | aligned |
|
|
188
|
+
| `procedureHeadParameter` | procedure_head | decomposed |
|
|
189
|
+
| `procedureId` | procedure_id | aligned |
|
|
190
|
+
| `procedureRef` | procedure_ref | aligned |
|
|
191
|
+
| `qualifiableFactor` | qualifiable_factor | aligned |
|
|
192
|
+
| `qualifiedAttribute` | qualified_attribute | aligned |
|
|
193
|
+
| `qualifier` | qualifier | aligned |
|
|
194
|
+
| `queryExpression` | query_expression | aligned |
|
|
195
|
+
| `realLiteral` | real_literal | aligned |
|
|
196
|
+
| `realType` | real_type | aligned |
|
|
197
|
+
| `redeclaredAttribute` | redeclared_attribute | aligned |
|
|
198
|
+
| `referenceClause` | reference_clause | aligned |
|
|
199
|
+
| `referencedAttribute` | referenced_attribute | aligned |
|
|
200
|
+
| `relOp` | rel_op | aligned |
|
|
201
|
+
| `relOpExtended` | rel_op_extended | aligned |
|
|
202
|
+
| `renameId` | rename_id | aligned |
|
|
203
|
+
| `repeatControl` | repeat_control | aligned |
|
|
204
|
+
| `repeatStmt` | repeat_stmt | aligned |
|
|
205
|
+
| `repetition` | repetition | aligned |
|
|
206
|
+
| `resourceOrRename` | resource_or_rename | aligned |
|
|
207
|
+
| `resourceRef` | resource_ref | aligned |
|
|
208
|
+
| `returnStmt` | return_stmt | aligned |
|
|
209
|
+
| `ruleDecl` | rule_decl | aligned |
|
|
210
|
+
| `ruleHead` | rule_head | aligned |
|
|
211
|
+
| `ruleId` | rule_id | aligned |
|
|
212
|
+
| `ruleLabelId` | rule_label_id | aligned |
|
|
213
|
+
| `ruleLabelRef` | rule_label_ref | aligned |
|
|
214
|
+
| `ruleRef` | rule_ref | aligned |
|
|
215
|
+
| `schemaBody` | schema_body | aligned |
|
|
216
|
+
| `schemaBodyDeclaration` | schema_body | decomposed |
|
|
217
|
+
| `schemaDecl` | schema_decl | aligned |
|
|
218
|
+
| `schemaId` | schema_id | aligned |
|
|
219
|
+
| `schemaRef` | schema_ref | aligned |
|
|
220
|
+
| `schemaVersionId` | schema_version_id | aligned |
|
|
221
|
+
| `selectExtension` | select_extension | aligned |
|
|
222
|
+
| `selectList` | select_list | aligned |
|
|
223
|
+
| `selectType` | select_type | aligned |
|
|
224
|
+
| `selector` | selector | aligned |
|
|
225
|
+
| `setType` | set_type | aligned |
|
|
226
|
+
| `sign` | sign | aligned |
|
|
227
|
+
| `simpleExpression` | simple_expression | aligned |
|
|
228
|
+
| `simpleFactor` | simple_factor | aligned |
|
|
229
|
+
| `simpleFactorExpression` | simple_factor | decomposed |
|
|
230
|
+
| `simpleFactorUnaryExpression` | simple_factor | decomposed |
|
|
231
|
+
| `simpleId` | simple_id | aligned |
|
|
232
|
+
| `simpleStringLiteral` | simple_string_literal | aligned |
|
|
233
|
+
| `simpleTypes` | simple_types | aligned |
|
|
234
|
+
| `skipStmt` | skip_stmt | aligned |
|
|
235
|
+
| `space` | | lexical | whitespace between tokens (7.1)
|
|
236
|
+
| `spaces` | | lexical | whitespace between tokens (7.1)
|
|
237
|
+
| `stmt` | stmt | aligned |
|
|
238
|
+
| `stringLiteral` | string_literal | aligned |
|
|
239
|
+
| `stringType` | string_type | aligned |
|
|
240
|
+
| `subsuper` | subsuper | aligned |
|
|
241
|
+
| `subtypeConstraint` | subtype_constraint | aligned |
|
|
242
|
+
| `subtypeConstraintBody` | subtype_constraint_body | aligned |
|
|
243
|
+
| `subtypeConstraintDecl` | subtype_constraint_decl | aligned |
|
|
244
|
+
| `subtypeConstraintHead` | subtype_constraint_head | aligned |
|
|
245
|
+
| `subtypeConstraintId` | subtype_constraint_id | aligned |
|
|
246
|
+
| `subtypeConstraintRef` | subtype_constraint_ref | aligned |
|
|
247
|
+
| `subtypeDeclaration` | subtype_declaration | aligned |
|
|
248
|
+
| `supertypeConstraint` | supertype_constraint | aligned |
|
|
249
|
+
| `supertypeExpression` | supertype_expression | aligned |
|
|
250
|
+
| `supertypeFactor` | supertype_factor | aligned |
|
|
251
|
+
| `supertypeRule` | supertype_rule | aligned |
|
|
252
|
+
| `supertypeTerm` | supertype_term | aligned |
|
|
253
|
+
| `syntax` | syntax | aligned |
|
|
254
|
+
| `tailRemark` | tail_remark | aligned |
|
|
255
|
+
| `term` | term | aligned |
|
|
256
|
+
| `totalOver` | total_over | aligned |
|
|
257
|
+
| `trivia` | | lexical | whitespace and embedded remarks (7.1)
|
|
258
|
+
| `typeDecl` | type_decl | aligned |
|
|
259
|
+
| `typeId` | type_id | aligned |
|
|
260
|
+
| `typeLabel` | type_label | aligned |
|
|
261
|
+
| `typeLabelId` | type_label_id | aligned |
|
|
262
|
+
| `typeLabelRef` | type_label_ref | aligned |
|
|
263
|
+
| `typeRef` | type_ref | aligned |
|
|
264
|
+
| `unaryOp` | unary_op | aligned |
|
|
265
|
+
| `underlyingType` | underlying_type | aligned |
|
|
266
|
+
| `uniqueClause` | unique_clause | aligned |
|
|
267
|
+
| `uniqueRule` | unique_rule | aligned |
|
|
268
|
+
| `untilControl` | until_control | aligned |
|
|
269
|
+
| `useClause` | use_clause | aligned |
|
|
270
|
+
| `variableId` | variable_id | aligned |
|
|
271
|
+
| `variableRef` | variable_ref | aligned |
|
|
272
|
+
| `whereClause` | where_clause | aligned |
|
|
273
|
+
| `whileControl` | while_control | aligned |
|
|
274
|
+
| `width` | width | aligned |
|
|
275
|
+
| `widthSpec` | width_spec | aligned |
|
|
276
|
+
|===
|
|
277
|
+
|
|
278
|
+
== Annex A productions without a dedicated rule
|
|
279
|
+
|
|
280
|
+
These productions are handled by supporting code rather than a
|
|
281
|
+
grammar rule:
|
|
282
|
+
|
|
283
|
+
[cols="3,1,5", options="header"]
|
|
284
|
+
|===
|
|
285
|
+
| Annex A production | Status | Handled by
|
|
286
|
+
|
|
287
|
+
| `lparen_then_not_lparen_star` | lexical | embedded-remark lookahead in the PEG
|
|
288
|
+
| `not_lparen_star` | lexical | embedded-remark lookahead in the PEG
|
|
289
|
+
| `not_paren_star` | lexical | embedded-remark lookahead in the PEG
|
|
290
|
+
| `not_paren_star_quote_special` | lexical | embedded-remark lookahead in the PEG
|
|
291
|
+
| `not_paren_star_special` | lexical | embedded-remark lookahead in the PEG
|
|
292
|
+
| `not_quote` | lexical | string-literal lookahead in the PEG
|
|
293
|
+
| `not_rparen_star` | lexical | embedded-remark lookahead in the PEG
|
|
294
|
+
| `not_rparen_star_then_rparen` | lexical | embedded-remark lookahead in the PEG
|
|
295
|
+
| `remark` | support-code | remark scanning is performed by RemarkScanner/RemarkAttacher
|
|
296
|
+
| `remark_ref` | support-code | remark scanning is performed by RemarkScanner/RemarkAttacher
|
|
297
|
+
| `remark_tag` | support-code | remark scanning is performed by RemarkScanner/RemarkAttacher
|
|
298
|
+
| `special` | lexical | character-class regex in the PEG (7.1)
|
|
299
|
+
|===
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Reference
|
|
3
|
+
nav_order: 13
|
|
4
|
+
has_children: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
= Reference
|
|
8
|
+
|
|
9
|
+
== Purpose
|
|
10
|
+
|
|
11
|
+
Citable, generated reference material. The grammar cross-walk and the
|
|
12
|
+
checker note-id catalog are generated from the implementation and kept
|
|
13
|
+
in sync by specs; the subsystem guides describe the architecture and
|
|
14
|
+
the standard clauses each subsystem enforces.
|
|
15
|
+
|
|
16
|
+
== Generating
|
|
17
|
+
|
|
18
|
+
[source,shell]
|
|
19
|
+
----
|
|
20
|
+
bundle exec rake reference:crosswalk
|
|
21
|
+
bundle exec rake reference:notes
|
|
22
|
+
----
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Language Server
|
|
3
|
+
parent: Reference
|
|
4
|
+
grand_parent: Guides
|
|
5
|
+
nav_order: 7
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
= Language Server
|
|
9
|
+
|
|
10
|
+
== Purpose
|
|
11
|
+
|
|
12
|
+
`expressir-lsp` is a stdio language server (JSON-RPC 2.0, LSP 3.17)
|
|
13
|
+
exposing the parser, checker and resolution machinery to editors.
|
|
14
|
+
|
|
15
|
+
== Launch
|
|
16
|
+
|
|
17
|
+
[source,shell]
|
|
18
|
+
----
|
|
19
|
+
bundle exec expressir-lsp
|
|
20
|
+
----
|
|
21
|
+
|
|
22
|
+
== Capabilities
|
|
23
|
+
|
|
24
|
+
* full-sync documents (`didOpen`, `didChange`, `didSave`, `didClose`);
|
|
25
|
+
* diagnostics from Checker notes, mapped through `NodePositionIndex`
|
|
26
|
+
and `LineMap` to UTF-16 ranges, plus parse-error diagnostics;
|
|
27
|
+
* document symbols for schemas, entities, types, functions, procedures,
|
|
28
|
+
rules and attributes;
|
|
29
|
+
* go-to-definition through the USE/REFERENCE ladder and its alias map;
|
|
30
|
+
* references across all open documents;
|
|
31
|
+
* hover with a PrettyFormatter excerpt;
|
|
32
|
+
* rename across schemas, with edits applied in memory, every affected
|
|
33
|
+
document reparsed, SchemaCompare rejecting unrelated removals, and
|
|
34
|
+
the renamed schema re-emitted through the Formatter.
|
|
35
|
+
|
|
36
|
+
== Incremental behaviour
|
|
37
|
+
|
|
38
|
+
Changes reparse the document through the native/core parser path;
|
|
39
|
+
identical text is a no-op and checker results are memoized per document
|
|
40
|
+
set. Content-incremental parsing awaits an incremental API in the
|
|
41
|
+
expressir-rs core.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Part 21
|
|
3
|
+
parent: Reference
|
|
4
|
+
grand_parent: Guides
|
|
5
|
+
nav_order: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
= Part 21
|
|
9
|
+
|
|
10
|
+
== Purpose
|
|
11
|
+
|
|
12
|
+
`Expressir::P21` reads ISO 10303-21 exchange structures: header
|
|
13
|
+
entities, simple and complex instances, nested lists, references,
|
|
14
|
+
typed parameters, enumerations and binaries.
|
|
15
|
+
|
|
16
|
+
== Validation
|
|
17
|
+
|
|
18
|
+
`Expressir::P21::Validator.validate(population, schema, short_names:)`
|
|
19
|
+
maps Part 21 records to EXPRESS attributes in clause 12 order —
|
|
20
|
+
supertype attributes first, derived slots valued `*`, inverse
|
|
21
|
+
attributes unmapped — and reports arity, unknown-entity,
|
|
22
|
+
unknown-reference, enum-value and derived-slot notes. Short names from
|
|
23
|
+
clause 12.3 are passed as a `{"CPT" => "cartesian_point"}` map.
|
|
24
|
+
|
|
25
|
+
== Conformance corpus
|
|
26
|
+
|
|
27
|
+
The annex examples from the ISO 10303-21 detachment live under
|
|
28
|
+
`spec/fixtures/p21/conformance/`; the gate spec parses each positive
|
|
29
|
+
fixture with zero notes and asserts the intended loud failure for
|
|
30
|
+
ladder-excluded forms.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: SHTOLO and Annex G
|
|
3
|
+
parent: Reference
|
|
4
|
+
grand_parent: Guides
|
|
5
|
+
nav_order: 5
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
= SHTOLO and Annex G
|
|
9
|
+
|
|
10
|
+
== Purpose
|
|
11
|
+
|
|
12
|
+
`Expressir::Express::Shtolo` converts a multi-schema shortform EXPRESS
|
|
13
|
+
model into an ISO 10303-11:1994 longform. It implements the two stages
|
|
14
|
+
of Annex G: multi-schema to an intermediate single artifact schema
|
|
15
|
+
(stage 1), then artifact to 1994-only constructs (stage 2).
|
|
16
|
+
|
|
17
|
+
== Rule coverage
|
|
18
|
+
|
|
19
|
+
Every Annex G rule has a live worked example in
|
|
20
|
+
`spec/expressir/express/shtolo_annex_g_rule_audit_spec.rb`. The
|
|
21
|
+
extracted rule list, the fixture that exercises each rule and the
|
|
22
|
+
eengine coverage verdict are in
|
|
23
|
+
`spec/fixtures/shtolo/annex-g-rules.md`.
|
|
24
|
+
|
|
25
|
+
Key rules: name munging (G.NM.1), USE wins over REFERENCE (G.1.2),
|
|
26
|
+
original-name copying for aliases (G.1.3), dependently-instantiable
|
|
27
|
+
rules (G.1.6), implicit interface closure (G.1.7), pruning (G.1.9),
|
|
28
|
+
extensible enumeration/select folding (G.2.3/G.2.4) and subtype
|
|
29
|
+
constraint removal (G.2.5). Where eeng and the annex disagree, the
|
|
30
|
+
annex wins; eeng output is a comparison input, not the contract.
|
|
31
|
+
|
|
32
|
+
== Structural safety
|
|
33
|
+
|
|
34
|
+
`Expressir::Express::SchemaCompare`/`SchemaPatch` provide the
|
|
35
|
+
declaration-level diff used to verify that a generated longform has
|
|
36
|
+
exactly the expected structural deltas.
|
data/exe/expressir-lsp
ADDED
data/expressir.gemspec
CHANGED
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
spec.license = "BSD-2-Clause"
|
|
16
16
|
|
|
17
17
|
spec.bindir = "exe"
|
|
18
|
-
spec.executables = %w[expressir]
|
|
18
|
+
spec.executables = %w[expressir expressir-lsp]
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
21
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
|
|
|
47
47
|
spec.add_dependency "benchmark-ips"
|
|
48
48
|
spec.add_dependency "csv"
|
|
49
49
|
spec.add_dependency "liquid", "~> 5"
|
|
50
|
-
spec.add_dependency "lutaml-model", "~> 0.8.
|
|
50
|
+
spec.add_dependency "lutaml-model", "~> 0.8.114"
|
|
51
51
|
spec.add_dependency "moxml"
|
|
52
52
|
spec.add_dependency "nokogiri", "~> 1.19"
|
|
53
53
|
spec.add_dependency "paint"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/expressir/cli.rb
CHANGED
|
@@ -111,6 +111,31 @@ module Expressir
|
|
|
111
111
|
Expressir::Commands::Xsd.new(options).run(path)
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
desc "export-json-schema PATH",
|
|
115
|
+
"Write a JSON Schema rendering of the first EXPRESS schema at PATH"
|
|
116
|
+
method_option :output, type: :string, aliases: "-o",
|
|
117
|
+
desc: "Output file path (defaults to stdout)"
|
|
118
|
+
def export_json_schema(path)
|
|
119
|
+
Expressir::Commands::ExportJsonSchema.new(options).run(path)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
desc "export-owl PATH",
|
|
123
|
+
"Write an OWL/Turtle rendering of the first EXPRESS schema at PATH"
|
|
124
|
+
method_option :output, type: :string, aliases: "-o",
|
|
125
|
+
desc: "Output file path (defaults to stdout)"
|
|
126
|
+
method_option :base_iri, type: :string,
|
|
127
|
+
desc: "Ontology IRI base (default: expressir.org/owl/<schema>#)"
|
|
128
|
+
def export_owl(path)
|
|
129
|
+
Expressir::Commands::ExportOwl.new(options).run(path)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
desc "xml-index DIR", "Write the SMRL index XML for every EXPRESS schema under DIR"
|
|
133
|
+
method_option :output, type: :string, aliases: "-o",
|
|
134
|
+
desc: "Output file path (defaults to stdout)"
|
|
135
|
+
def xml_index(path)
|
|
136
|
+
Expressir::Commands::SmrlXmlIndex.new(options).run(path)
|
|
137
|
+
end
|
|
138
|
+
|
|
114
139
|
desc "validate SUBCOMMAND", "EXPRESS schema validation commands"
|
|
115
140
|
subcommand "validate", Expressir::Commands::Validate
|
|
116
141
|
|
|
@@ -25,7 +25,9 @@ module Expressir
|
|
|
25
25
|
raise Thor::Error, "#{failed} file(s) failed to parse"
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
result = Expressir::Express::Checker.new(
|
|
28
|
+
result = Expressir::Express::Checker.new(
|
|
29
|
+
repository, dialect: options[:dialect]
|
|
30
|
+
).check
|
|
29
31
|
|
|
30
32
|
if options[:json]
|
|
31
33
|
say JSON.generate(
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Commands
|
|
5
|
+
# `expressir export-json-schema`: write the JSON Schema rendering of
|
|
6
|
+
# the first schema in PATH.
|
|
7
|
+
class ExportJsonSchema < Base
|
|
8
|
+
def run(path)
|
|
9
|
+
repository = Expressir::Express::Parser.from_file(path)
|
|
10
|
+
schema = repository.schemas.first
|
|
11
|
+
raise Thor::Error, "no schema in #{path}" unless schema
|
|
12
|
+
|
|
13
|
+
document = Expressir::Interop::JsonSchema.new(schema).to_json
|
|
14
|
+
write(document)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def write(document)
|
|
20
|
+
if options[:output]
|
|
21
|
+
File.write(options[:output], document)
|
|
22
|
+
say "written to #{options[:output]}"
|
|
23
|
+
else
|
|
24
|
+
$stdout.write(document)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Expressir
|
|
4
|
+
module Commands
|
|
5
|
+
# `expressir export-owl`: write the OWL/Turtle rendering of the
|
|
6
|
+
# first schema in PATH.
|
|
7
|
+
class ExportOwl < Base
|
|
8
|
+
def run(path)
|
|
9
|
+
repository = Expressir::Express::Parser.from_file(path)
|
|
10
|
+
schema = repository.schemas.first
|
|
11
|
+
raise Thor::Error, "no schema in #{path}" unless schema
|
|
12
|
+
|
|
13
|
+
document = Expressir::Interop::Owl.new(
|
|
14
|
+
schema,
|
|
15
|
+
base_iri: options[:base_iri],
|
|
16
|
+
).export
|
|
17
|
+
if options[:output]
|
|
18
|
+
File.write(options[:output], document)
|
|
19
|
+
say "written to #{options[:output]}"
|
|
20
|
+
else
|
|
21
|
+
$stdout.write(document)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "thor"
|
|
4
|
+
|
|
5
|
+
module Expressir
|
|
6
|
+
module Commands
|
|
7
|
+
# `expressir xml-index` (#276): write the SMRL index XML for a
|
|
8
|
+
# repository — one <schema> element per schema, the data layer of
|
|
9
|
+
# the STEP Module Resource Library document set.
|
|
10
|
+
class SmrlXmlIndex < Base
|
|
11
|
+
def run(path)
|
|
12
|
+
repo = Expressir::Express::Parser.from_files(Dir.glob(File.join(path, "**", "*.exp")), skip_references: true)
|
|
13
|
+
raise Thor::Error, "no schemas under #{path}" if repo.schemas.empty?
|
|
14
|
+
|
|
15
|
+
xml = Expressir::Express::SmrlXml.format(repo)
|
|
16
|
+
if options[:output]
|
|
17
|
+
File.write(options[:output], xml)
|
|
18
|
+
say "written to #{options[:output]}"
|
|
19
|
+
else
|
|
20
|
+
$stdout.write(xml)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -98,6 +98,9 @@ module Expressir
|
|
|
98
98
|
method_option :stepmod, type: :string,
|
|
99
99
|
desc: "STEPmod checkout root — explicit opt-in to directory-" \
|
|
100
100
|
"convention resolution as the fallback"
|
|
101
|
+
method_option :dialect, type: :string,
|
|
102
|
+
desc: "ISO 10303-11 edition for dialect diagnostics: " \
|
|
103
|
+
"'1994' or '2004' (default: no edition notes)"
|
|
101
104
|
def check(*paths)
|
|
102
105
|
Check.new(options).run(*paths)
|
|
103
106
|
end
|
data/lib/expressir/commands.rb
CHANGED
|
@@ -26,5 +26,8 @@ module Expressir
|
|
|
26
26
|
autoload :Manifest, "#{__dir__}/commands/manifest"
|
|
27
27
|
autoload :MappingValidate, "#{__dir__}/commands/mapping_validate"
|
|
28
28
|
autoload :Xsd, "#{__dir__}/commands/xsd"
|
|
29
|
+
autoload :ExportJsonSchema, "#{__dir__}/commands/export_json_schema"
|
|
30
|
+
autoload :ExportOwl, "#{__dir__}/commands/export_owl"
|
|
31
|
+
autoload :SmrlXmlIndex, "#{__dir__}/commands/smrl_xml_index"
|
|
29
32
|
end
|
|
30
33
|
end
|