@blockml/parser 0.9.4 → 0.9.5

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 (112) hide show
  1. package/blocks/org/blockml/bml/compiler/parser/Library.bml +19 -26
  2. package/blocks/org/blockml/bml/compiler/parser/ParserType.bml +16 -20
  3. package/blocks/org/blockml/bml/compiler/parser/README.bml +14 -21
  4. package/blocks/org/blockml/bml/compiler/parser/capability/AssertBlockRoot.bml +23 -21
  5. package/blocks/org/blockml/bml/compiler/parser/capability/BuildSubBlockIndex.bml +19 -20
  6. package/blocks/org/blockml/bml/compiler/parser/capability/CollectLeadingComments.bml +22 -22
  7. package/blocks/org/blockml/bml/compiler/parser/capability/CollectTrailingComments.bml +22 -22
  8. package/blocks/org/blockml/bml/compiler/parser/capability/ContainsUnescapedInterpolation.bml +26 -21
  9. package/blocks/org/blockml/bml/compiler/parser/capability/CreateMapContext.bml +28 -24
  10. package/blocks/org/blockml/bml/compiler/parser/capability/DetectFormat.bml +19 -21
  11. package/blocks/org/blockml/bml/compiler/parser/capability/DocumentElement.bml +19 -20
  12. package/blocks/org/blockml/bml/compiler/parser/capability/ElementChildren.bml +19 -20
  13. package/blocks/org/blockml/bml/compiler/parser/capability/ElementLocalName.bml +19 -20
  14. package/blocks/org/blockml/bml/compiler/parser/capability/ElementPrefix.bml +19 -20
  15. package/blocks/org/blockml/bml/compiler/parser/capability/ElementSourceLoc.bml +25 -22
  16. package/blocks/org/blockml/bml/compiler/parser/capability/ElementStartTagIsSelfClosing.bml +23 -22
  17. package/blocks/org/blockml/bml/compiler/parser/capability/ExpressionFromRaw.bml +22 -21
  18. package/blocks/org/blockml/bml/compiler/parser/capability/ExtractNamespaceBindings.bml +20 -21
  19. package/blocks/org/blockml/bml/compiler/parser/capability/FqnToQName.bml +22 -21
  20. package/blocks/org/blockml/bml/compiler/parser/capability/GetAttribute.bml +22 -21
  21. package/blocks/org/blockml/bml/compiler/parser/capability/GetCharacterData.bml +19 -20
  22. package/blocks/org/blockml/bml/compiler/parser/capability/GetParseErrors.bml +19 -20
  23. package/blocks/org/blockml/bml/compiler/parser/capability/HasBmlSemanticQNameBindings.bml +19 -20
  24. package/blocks/org/blockml/bml/compiler/parser/capability/InferCardinality.bml +19 -20
  25. package/blocks/org/blockml/bml/compiler/parser/capability/IsBooleanLiteral.bml +19 -20
  26. package/blocks/org/blockml/bml/compiler/parser/capability/IsCData.bml +19 -20
  27. package/blocks/org/blockml/bml/compiler/parser/capability/IsComment.bml +19 -20
  28. package/blocks/org/blockml/bml/compiler/parser/capability/IsDocumentRootLocalName.bml +57 -0
  29. package/blocks/org/blockml/bml/compiler/parser/capability/IsElement.bml +19 -20
  30. package/blocks/org/blockml/bml/compiler/parser/capability/IsTextNode.bml +19 -20
  31. package/blocks/org/blockml/bml/compiler/parser/capability/IsTypeReferenceEntitySugar.bml +19 -20
  32. package/blocks/org/blockml/bml/compiler/parser/capability/MapBlock.bml +22 -22
  33. package/blocks/org/blockml/bml/compiler/parser/capability/MapBlockInstanceNode.bml +22 -21
  34. package/blocks/org/blockml/bml/compiler/parser/capability/MapCompositionTemplate.bml +22 -21
  35. package/blocks/org/blockml/bml/compiler/parser/capability/MapDocumentBlock.bml +25 -23
  36. package/blocks/org/blockml/bml/compiler/parser/capability/MapTypeReferenceEntityInstance.bml +22 -21
  37. package/blocks/org/blockml/bml/compiler/parser/capability/MergeSourceInfo.bml +25 -22
  38. package/blocks/org/blockml/bml/compiler/parser/capability/NormalizeBooleanValue.bml +19 -20
  39. package/blocks/org/blockml/bml/compiler/parser/capability/Parse.bml +22 -22
  40. package/blocks/org/blockml/bml/compiler/parser/capability/ParseBmlMeta.bml +19 -20
  41. package/blocks/org/blockml/bml/compiler/parser/capability/ParseBooleanAttribute.bml +19 -20
  42. package/blocks/org/blockml/bml/compiler/parser/capability/ParseDirectives.bml +23 -23
  43. package/blocks/org/blockml/bml/compiler/parser/capability/ParseGenericArgumentList.bml +23 -23
  44. package/blocks/org/blockml/bml/compiler/parser/capability/ParseGenericsBinding.bml +23 -23
  45. package/blocks/org/blockml/bml/compiler/parser/capability/ParseMemberValue.bml +35 -27
  46. package/blocks/org/blockml/bml/compiler/parser/capability/ParseTypeExpression.bml +25 -23
  47. package/blocks/org/blockml/bml/compiler/parser/capability/ParseVisibilityFromName.bml +19 -21
  48. package/blocks/org/blockml/bml/compiler/parser/capability/ParseXmlDom.bml +22 -22
  49. package/blocks/org/blockml/bml/compiler/parser/capability/ResolveBlockReference.bml +25 -23
  50. package/blocks/org/blockml/bml/compiler/parser/capability/ResolvePrefix.bml +22 -21
  51. package/blocks/org/blockml/bml/compiler/parser/capability/ResolveTypeName.bml +25 -23
  52. package/blocks/org/blockml/bml/compiler/parser/capability/SourceLoc.bml +25 -22
  53. package/blocks/org/blockml/bml/compiler/parser/capability/SplitQName.bml +19 -20
  54. package/blocks/org/blockml/bml/compiler/parser/capability/TrimText.bml +18 -21
  55. package/blocks/org/blockml/bml/compiler/parser/capability/TypeExpressionToString.bml +19 -20
  56. package/blocks/org/blockml/bml/compiler/parser/capability/VisibilityPrefix.bml +19 -20
  57. package/blocks/org/blockml/bml/compiler/parser/capability/XmlTriviaFromElement.bml +19 -21
  58. package/blocks/org/blockml/bml/compiler/parser/config/MapTimeDiagnosticCodes.bml +16 -19
  59. package/blocks/org/blockml/bml/compiler/parser/config/ParserConstants.bml +25 -22
  60. package/blocks/org/blockml/bml/compiler/parser/documentation/ArchitectureOverview.bml +21 -23
  61. package/blocks/org/blockml/bml/compiler/parser/documentation/AttributeClassification.bml +18 -23
  62. package/blocks/org/blockml/bml/compiler/parser/documentation/BlockMetadataMapping.bml +23 -21
  63. package/blocks/org/blockml/bml/compiler/parser/documentation/DesignDecisions.bml +16 -21
  64. package/blocks/org/blockml/bml/compiler/parser/documentation/Diagnostics.bml +24 -24
  65. package/blocks/org/blockml/bml/compiler/parser/documentation/ExpressionCapture.bml +20 -23
  66. package/blocks/org/blockml/bml/compiler/parser/documentation/Introduction.bml +17 -22
  67. package/blocks/org/blockml/bml/compiler/parser/documentation/LayerSeparation.bml +19 -24
  68. package/blocks/org/blockml/bml/compiler/parser/documentation/MappingPrinciples.bml +16 -21
  69. package/blocks/org/blockml/bml/compiler/parser/documentation/MemberMapping.bml +17 -20
  70. package/blocks/org/blockml/bml/compiler/parser/documentation/MemberMappingOrder.bml +16 -21
  71. package/blocks/org/blockml/bml/compiler/parser/documentation/PackageOwnership.bml +17 -22
  72. package/blocks/org/blockml/bml/compiler/parser/documentation/PublicApi.bml +19 -22
  73. package/blocks/org/blockml/bml/compiler/parser/documentation/RoundtripContract.bml +16 -21
  74. package/blocks/org/blockml/bml/compiler/parser/documentation/ScopeExclusions.bml +16 -21
  75. package/blocks/org/blockml/bml/compiler/parser/documentation/SingleFileScope.bml +16 -21
  76. package/blocks/org/blockml/bml/compiler/parser/documentation/StructuralGrammar.bml +18 -23
  77. package/blocks/org/blockml/bml/compiler/parser/documentation/TypeDescriptorParsing.bml +15 -20
  78. package/blocks/org/blockml/bml/compiler/parser/documentation/V1Scope.bml +18 -21
  79. package/blocks/org/blockml/bml/compiler/parser/documentation/XmlCommentsParse.bml +18 -21
  80. package/blocks/org/blockml/bml/compiler/parser/map/BmlMeta.bml +25 -22
  81. package/blocks/org/blockml/bml/compiler/parser/map/CharacterData.bml +19 -20
  82. package/blocks/org/blockml/bml/compiler/parser/map/MapContext.bml +40 -27
  83. package/blocks/org/blockml/bml/compiler/parser/map/MapContextOptions.bml +31 -24
  84. package/blocks/org/blockml/bml/compiler/parser/map/QNameParts.bml +19 -20
  85. package/blocks/org/blockml/bml/compiler/parser/map/VisibilityParse.bml +19 -20
  86. package/blocks/org/blockml/bml/compiler/parser/map/XmlDomNode.bml +13 -17
  87. package/dist/index.d.ts +2 -0
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +2 -0
  90. package/dist/index.js.map +1 -1
  91. package/dist/map/directives.d.ts.map +1 -1
  92. package/dist/map/directives.js +2 -2
  93. package/dist/map/directives.js.map +1 -1
  94. package/dist/map/interpolation-escape.d.ts +11 -0
  95. package/dist/map/interpolation-escape.d.ts.map +1 -0
  96. package/dist/map/interpolation-escape.js +87 -0
  97. package/dist/map/interpolation-escape.js.map +1 -0
  98. package/dist/map/map-block.d.ts.map +1 -1
  99. package/dist/map/map-block.js +102 -6
  100. package/dist/map/map-block.js.map +1 -1
  101. package/dist/map/member-value.d.ts +1 -1
  102. package/dist/map/member-value.d.ts.map +1 -1
  103. package/dist/map/member-value.js +4 -11
  104. package/dist/map/member-value.js.map +1 -1
  105. package/dist/pipeline/namespaces.d.ts.map +1 -1
  106. package/dist/pipeline/namespaces.js +3 -0
  107. package/dist/pipeline/namespaces.js.map +1 -1
  108. package/dist/pipeline/root-type.d.ts +3 -0
  109. package/dist/pipeline/root-type.d.ts.map +1 -1
  110. package/dist/pipeline/root-type.js +16 -3
  111. package/dist/pipeline/root-type.js.map +1 -1
  112. package/package.json +3 -3
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — Diagnostics
3
- FQN: org.blockml.bml.compiler.parser.documentation.Diagnostics
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — Diagnostics
2
+ FQN: org.blockml.bml.compiler.parser.documentation.Diagnostics-->
3
+ <pardocumentation:Diagnostics xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,18 +24,24 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>Diagnostics</name>
34
- <type>pardocumentation:Diagnostics</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Map-time and pipeline diagnostic codes</is>
37
-
38
- <documentation><![CDATA[Pipeline hard-fail codes (parse.ts):
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Map-time and pipeline diagnostic codes
32
+ </is>
33
+ <documentation>
34
+ <![CDATA[
35
+ Pipeline hard-fail codes (parse.ts):
39
36
  • BML_UNSUPPORTED_FORMAT — format detect failed
40
37
  • BML_MALFORMED_XML — DOM parse error
41
38
  • BML_MISSING_ROOT — no document element
42
- • BML_INVALID_ROOT — not <block> (V1)
43
- BML_MAP_ERRORmapping exception
44
-
39
+ • BML_INVALID_ROOT — not <block> and not a type-as-root tag (doc:DocumentFormat)
40
+ BML_MISSING_BLOCK_TYPElegacy <block> supplies neither root tag type nor <type>
41
+ • BML_MISSING_EMBEDDED_BLOCK_TYPE — legacy embed <block> supplies neither tag type nor <type>
42
+ • BML_MISSING_SUBBLOCK_NAME — legacy Sub-Block <block> supplies neither tag name nor <name>
43
+ • BML_MAP_ERROR — mapping exception, including tag vs child <type>/<name> mismatch
44
+
45
45
  Map-time codes (mapper modules):
46
46
  • BML_UNKNOWN_NAMESPACE_PREFIX, BML_UNQUALIFIED_BLOCK_REFERENCE
47
47
  • BML_UNKNOWN_TYPE — type expression parse failure
@@ -55,16 +55,16 @@
55
55
  • BML_DUPLICATE_PROPERTY_VALUE — more than one <value> for the same namespace on a property
56
56
  • BML_UNEXPECTED_TEXT — non-whitespace text on an element-only grammar node
57
57
  • BML_INVALID_VALUE — optional parseValue hook rejected a literal (value stays a string)
58
-
58
+
59
59
  Map-time diagnostics attach Diagnostic.source to the use-site token when known
60
60
  (attribute value or first occurrence in the throwing element), not the document root.
61
-
61
+
62
62
  Host policy: whether to abort after diagnostics is orchestrator decision.
63
- Diagnostic type: org.blockml.bml.bom.common.Diagnostic.]]></documentation>
64
-
63
+ Diagnostic type: org.blockml.bml.bom.common.Diagnostic.
64
+ ]]>
65
+ </documentation>
65
66
  <references>
66
67
  <see type="parconfig:MapTimeDiagnosticCodes" relation="Defines" />
67
68
  <see type="pardocumentation:PackageOwnership" relation="ReadNext" />
68
69
  </references>
69
-
70
- </block>
70
+ </pardocumentation:Diagnostics>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — ExpressionCapture
3
- FQN: org.blockml.bml.compiler.parser.documentation.ExpressionCapture
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — ExpressionCapture
2
+ FQN: org.blockml.bml.compiler.parser.documentation.ExpressionCapture-->
3
+ <pardocumentation:ExpressionCapture xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,24 +24,27 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>ExpressionCapture</name>
34
- <type>pardocumentation:ExpressionCapture</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Raw expression storage — no AST in Urmodell (B4)</is>
37
-
38
- <documentation>${ … } attribute/element values → ExpressionValue { raw, source }.
39
- Mixed text with ${ … } holes → InterpolatedTextValue { raw, source }.
40
- Implementation CDATAembeddedExpressions[] with source offsets.
41
-
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Raw expression storage — no AST in Urmodell (B4)
32
+ </is>
33
+ <documentation>
34
+ ${ } attribute/element values ExpressionValue { raw, source }.
35
+ Mixed text with unescaped ${ … } holes → InterpolatedTextValue { raw, source }.
36
+ `\${` is a literal `${` (odd backslashes immediately before `$`). A value whose
37
+ only openers are escaped is LiteralValue after unescape — BOM stores `${`, not
38
+ `\${`. Implementation CDATA → embeddedExpressions[] with source offsets.
39
+
42
40
  Parser step [5] captures raw text only. AST construction via parseExpression()
43
41
  / parseInterpolatedText() in @blockml/framework (Stage 2 utility) — never stored
44
42
  on Urmodell.
45
-
46
- inputType/outputType on capabilities → TypeExpression at map time (B3).</documentation>
47
-
43
+
44
+ inputType/outputType on capabilities → TypeExpression at map time (B3).
45
+ </documentation>
48
46
  <references>
49
47
  <see type="pardocumentation:SingleFileScope" relation="ReadNext" />
50
48
  <see type="parcap:ExpressionFromRaw" relation="SeeAlso" />
51
49
  </references>
52
-
53
- </block>
50
+ </pardocumentation:ExpressionCapture>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — Introduction
3
- FQN: org.blockml.bml.compiler.parser.documentation.Introduction
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — Introduction
2
+ FQN: org.blockml.bml.compiler.parser.documentation.Introduction-->
3
+ <pardocumentation:Introduction xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,28 +24,29 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>Introduction</name>
34
- <type>pardocumentation:Introduction</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Purpose and scope of the Parser package</is>
37
-
38
- <documentation>The @blockml/parser package converts BML XML source to BomDocument (Urmodell).
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Purpose and scope of the Parser package
32
+ </is>
33
+ <documentation>
34
+ The @blockml/parser package converts BML XML source to BomDocument (Urmodell).
39
35
  It is the forward mapping — enabling BML → BOM → BML roundtrip together with @blockml/serializer.
40
-
36
+
41
37
  This library (org.blockml.bml.compiler.parser.*) is the SSOT. TypeScript in
42
38
  packages/parser/src/ implements it. Parity tests in packages/parser/test/
43
39
  verify BML ↔ TS alignment.
44
-
40
+
45
41
  V1 build order: parser and serializer prove BML ↔ BOM roundtrip first; validator
46
42
  and compiler follow. Single-file scoped — one parse() invocation → one BomDocument.
47
-
43
+
48
44
  Pipeline placement: BML XML → Parser → BomDocument; consumed by serializer, validator,
49
45
  compiler, LSP. Depends on @blockml/bom (types) and @xmldom/xmldom (B18). Does not
50
- depend on @blockml/serializer, @blockml/validator, or TypeRegistry bootstrap.</documentation>
51
-
46
+ depend on @blockml/serializer, @blockml/validator, or TypeRegistry bootstrap.
47
+ </documentation>
52
48
  <references>
53
49
  <see type="pardocumentation:LayerSeparation" relation="ReadNext" />
54
50
  <see type="bomdocumentation:Introduction" relation="SeeAlso" />
55
51
  </references>
56
-
57
- </block>
52
+ </pardocumentation:Introduction>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — LayerSeparation
3
- FQN: org.blockml.bml.compiler.parser.documentation.LayerSeparation
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — LayerSeparation
2
+ FQN: org.blockml.bml.compiler.parser.documentation.LayerSeparation-->
3
+ <pardocumentation:LayerSeparation xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,31 +24,32 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>LayerSeparation</name>
34
- <type>pardocumentation:LayerSeparation</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Parser vs BOM vs core vs serializer vs validator</is>
37
-
38
- <documentation>Five layers relevant to parsing:
39
-
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Parser vs BOM vs core vs serializer vs validator
32
+ </is>
33
+ <documentation>
34
+ Five layers relevant to parsing:
35
+
40
36
  org.blockml.bml.bom.* (@blockml/bom) — Urmodell data structures the parser produces
41
37
  (BomDocument, BlockDefinition, MemberDefinition, …). ParseOptions and ParseResult (B26).
42
-
38
+
43
39
  org.blockml.bml.compiler.parser.* (this package) — BML → BOM mapping algorithm,
44
40
  Stage 1 pipeline [1]–[5], parse() entry point contract.
45
-
41
+
46
42
  org.blockml.bml.definition.* (@blockml/core) — BML meta-model. Parser links to Definition
47
43
  blocks for canonical paths; does not duplicate language grammar.
48
-
44
+
49
45
  org.blockml.bml.compiler.serializer.* (@blockml/serializer) — inverse mapping (BOM → BML).
50
46
  Emit rules B12–B25 live there, not here.
51
-
47
+
52
48
  @blockml/framework utilities — parseExpression() (Stage 2 AST), TypeRegistry, validateTypes.
53
- Parser stores ExpressionValue.raw only (B4); never writes AST to Urmodell.</documentation>
54
-
49
+ Parser stores ExpressionValue.raw only (B4); never writes AST to Urmodell.
50
+ </documentation>
55
51
  <references>
56
52
  <see type="pardocumentation:ArchitectureOverview" relation="ReadNext" />
57
53
  <see type="bomdocumentation:LayerSeparation" relation="SeeAlso" />
58
54
  </references>
59
-
60
- </block>
55
+ </pardocumentation:LayerSeparation>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — MappingPrinciples
3
- FQN: org.blockml.bml.compiler.parser.documentation.MappingPrinciples
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — MappingPrinciples
2
+ FQN: org.blockml.bml.compiler.parser.documentation.MappingPrinciples-->
3
+ <pardocumentation:MappingPrinciples xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,24 +24,25 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>MappingPrinciples</name>
34
- <type>pardocumentation:MappingPrinciples</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Fundamental mapping rule — structure + preservation</is>
37
-
38
- <documentation>BML → BOM → BML must always be possible. The mapper preserves authored structure
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Fundamental mapping rule — structure + preservation
32
+ </is>
33
+ <documentation>
34
+ BML → BOM → BML must always be possible. The mapper preserves authored structure
39
35
  and values — directives, aggregation declarations, literal syntax, unresolved type
40
36
  references, namespace bindings, and bml:xml metadata.
41
-
37
+
42
38
  Mapper responsibility: structure + classification + preservation.
43
39
  NOT mapper responsibility: canonicalization, expansion, merge, evaluation.
44
-
40
+
45
41
  BOM makes no statement about directive expansion, aggregation interpretation, or
46
- block rendering. Maximum authored surface: store as much as Urmodell can carry.</documentation>
47
-
42
+ block rendering. Maximum authored surface: store as much as Urmodell can carry.
43
+ </documentation>
48
44
  <references>
49
45
  <see type="pardocumentation:MemberMappingOrder" relation="ReadNext" />
50
46
  <see type="bomdocumentation:AbstractionPrinciple" relation="SeeAlso" />
51
47
  </references>
52
-
53
- </block>
48
+ </pardocumentation:MappingPrinciples>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — MemberMapping
3
- FQN: org.blockml.bml.compiler.parser.documentation.MemberMapping
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — MemberMapping
2
+ FQN: org.blockml.bml.compiler.parser.documentation.MemberMapping-->
3
+ <pardocumentation:MemberMapping xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,12 +24,15 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>MemberMapping</name>
34
- <type>pardocumentation:MemberMapping</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Member definition and composition mapping</is>
37
-
38
- <documentation><![CDATA[Property/aggregation/association/capability members:
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Member definition and composition mapping
32
+ </is>
33
+ <documentation>
34
+ <![CDATA[
35
+ Property/aggregation/association/capability members:
39
36
  • Element QName = member identity (deprecated namespace= attr → error)
40
37
  • type attribute → TypeExpression; value/memberValues for properties
41
38
  • One <value> per namespace on a property member. Unprefixed <value> /
@@ -56,12 +53,12 @@
56
53
  explicit type:TypeReferenceEntity); bound B = core:Exception
57
54
  • Sub-Blocks and embedded blocks → nested BlockDefinition trees
58
55
  • Redundant aggregation type on override → validator warning B19; parser must not apply
59
-
60
- Directives on composition: bml:each, bml:if, bml:unless, bml:with — stored unexpanded.]]></documentation>
61
-
56
+
57
+ Directives on composition: bml:each, bml:if, bml:unless, bml:with — stored unexpanded.
58
+ ]]>
59
+ </documentation>
62
60
  <references>
63
61
  <see type="pardocumentation:ExpressionCapture" relation="ReadNext" />
64
62
  <see type="parcap:MapBlockInstanceNode" relation="SeeAlso" />
65
63
  </references>
66
-
67
- </block>
64
+ </pardocumentation:MemberMapping>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — MemberMappingOrder
3
- FQN: org.blockml.bml.compiler.parser.documentation.MemberMappingOrder
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — MemberMappingOrder
2
+ FQN: org.blockml.bml.compiler.parser.documentation.MemberMappingOrder-->
3
+ <pardocumentation:MemberMappingOrder xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,22 +24,23 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>MemberMappingOrder</name>
34
- <type>pardocumentation:MemberMappingOrder</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>BML document order preserved in members[]</is>
37
-
38
- <documentation>Append to members[] in BML document order — the order elements appear in source.
39
-
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ BML document order preserved in members[]
32
+ </is>
33
+ <documentation>
34
+ Append to members[] in BML document order — the order elements appear in source.
35
+
40
36
  • Element localName = member name (no name= attribute on member elements)
41
37
  • MUST NOT sort by name, kind, or type
42
38
  • Ordinal = index in members[] — roundtrip must preserve array order
43
39
  • Parser accepts any authored sibling order; serializer emits canonical order (B12)
44
-
45
- Inside containers (properties/aggregations/…): filter by kind, keep BOM array order.</documentation>
46
-
40
+
41
+ Inside containers (properties/aggregations/…): filter by kind, keep BOM array order.
42
+ </documentation>
47
43
  <references>
48
44
  <see type="pardocumentation:AttributeClassification" relation="ReadNext" />
49
45
  </references>
50
-
51
- </block>
46
+ </pardocumentation:MemberMappingOrder>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — PackageOwnership
3
- FQN: org.blockml.bml.compiler.parser.documentation.PackageOwnership
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — PackageOwnership
2
+ FQN: org.blockml.bml.compiler.parser.documentation.PackageOwnership-->
3
+ <pardocumentation:PackageOwnership xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,26 +24,27 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>PackageOwnership</name>
34
- <type>pardocumentation:PackageOwnership</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Toolchain package responsibilities for parsing</is>
37
-
38
- <documentation>@blockml/parser — BML XML → BomDocument; parse() → ParseResult.
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Toolchain package responsibilities for parsing
32
+ </is>
33
+ <documentation>
34
+ @blockml/parser — BML XML → BomDocument; parse() → ParseResult.
39
35
  Owns mapping algorithm, Stage 1 pipeline [1]–[5], this BML library.
40
-
36
+
41
37
  @blockml/bom — Urmodell types, ParseOptions/ParseResult (B26), Diagnostic,
42
38
  bomEquals/stripProvenance (B20). Parser produces; does not redefine.
43
-
39
+
44
40
  @blockml/framework — TypeRegistry, parseExpression(), Definition meta-model, validateTypes.
45
41
  Parser consumes implicit namespace rules; defers AST and semantic validation.
46
-
42
+
47
43
  @blockml/serializer — BOM → BML inverse. @blockml/validator — Stage 2 checks.
48
- @blockml/cli — TypeRegistry bootstrap and orchestration.</documentation>
49
-
44
+ @blockml/cli — TypeRegistry bootstrap and orchestration.
45
+ </documentation>
50
46
  <references>
51
47
  <see type="pardocumentation:ScopeExclusions" relation="ReadNext" />
52
48
  <see type="bomdocumentation:PackageOwnership" relation="SeeAlso" />
53
49
  </references>
54
-
55
- </block>
50
+ </pardocumentation:PackageOwnership>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — PublicApi
3
- FQN: org.blockml.bml.compiler.parser.documentation.PublicApi
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — PublicApi
2
+ FQN: org.blockml.bml.compiler.parser.documentation.PublicApi-->
3
+ <pardocumentation:PublicApi xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,13 +24,16 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>PublicApi</name>
34
- <type>pardocumentation:PublicApi</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>parse() entry point (B26)</is>
37
-
38
- <documentation><![CDATA[parse(source: string, options?: ParseOptions): ParseResult
39
-
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ parse() entry point (B26)
32
+ </is>
33
+ <documentation>
34
+ <![CDATA[
35
+ parse(source: string, options?: ParseOptions): ParseResult
36
+
40
37
  ParseOptions (owned by @blockml/bom):
41
38
  • filePath — default "<memory>"; written to BomDocument.source.filePath
42
39
  • continueOnError — default true; keep mapping after errors when possible
@@ -44,12 +41,12 @@
44
41
  registry bootstrap). When set, scalar member values use the hook only;
45
42
  Boolean/number heuristics run only during bootstrap (no hook). Expression
46
43
  and interpolation classification always run.
47
-
44
+
48
45
  ParseResult (owned by @blockml/bom):
49
46
  • document — BomDocument | null (null on hard fail)
50
47
  • diagnostics — Diagnostic[]
51
48
  • success — false if any diagnostic has severity === "error"
52
-
49
+
53
50
  Behaviour:
54
51
  • B24 detect → [2] xmldom → [3]–[5] map
55
52
  • Hard fail → document: null (unsupported format, missing root, invalid root)
@@ -57,13 +54,13 @@
57
54
  carries a span; otherwise BML_MAP_ERROR at 1:1. continueOnError still returns
58
55
  document when possible
59
56
  • Sync only; no throw on recoverable errors
60
- • Does NOT call validator; does NOT expand directives]]></documentation>
61
-
57
+ • Does NOT call validator; does NOT expand directives
58
+ ]]>
59
+ </documentation>
62
60
  <references>
63
61
  <see type="bomapi:ParseOptions" relation="Defines" />
64
62
  <see type="bomapi:ParseResult" relation="Defines" />
65
63
  <see type="parcap:Parse" relation="Defines" />
66
64
  <see type="pardocumentation:MappingPrinciples" relation="ReadNext" />
67
65
  </references>
68
-
69
- </block>
66
+ </pardocumentation:PublicApi>
@@ -1,12 +1,6 @@
1
- <!--
2
- Parser Documentation — RoundtripContract
3
- FQN: org.blockml.bml.compiler.parser.documentation.RoundtripContract
4
- -->
5
- <block
6
- xmlns="http://blockml.org/bml"
7
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8
- xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
9
- "
1
+ <!--Parser Documentation — RoundtripContract
2
+ FQN: org.blockml.bml.compiler.parser.documentation.RoundtripContract-->
3
+ <pardocumentation:RoundtripContract xmlns="http://blockml.org/bml"
10
4
  xmlns:blockml="org.blockml.bml"
11
5
  xmlns:bom="org.blockml.bml.bom"
12
6
  xmlns:bomapi="org.blockml.bml.bom.api"
@@ -30,26 +24,27 @@
30
24
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
31
25
  xmlns:doc="org.blockml.bml.documentation">
32
26
 
33
- <name>RoundtripContract</name>
34
- <type>pardocumentation:RoundtripContract</type>
35
- <baseType>core:Documentation</baseType>
36
- <is>Parse-side roundtrip obligations (B10/B11/B13/B20)</is>
37
-
38
- <documentation>Phase-A gate: bomEquals(stripProvenance(parse(serialize(parse(f)))), parse(f)).
27
+ <baseType>
28
+ core:Documentation
29
+ </baseType>
30
+ <is>
31
+ Parse-side roundtrip obligations (B10/B11/B13/B20)
32
+ </is>
33
+ <documentation>
34
+ Phase-A gate: bomEquals(stripProvenance(parse(serialize(parse(f)))), parse(f)).
39
35
  Shared definition in @blockml/bom (B20).
40
-
36
+
41
37
  Parser obligations:
42
38
  • Preserve semantic content for serializer re-emit
43
39
  • Store xmlRendering, authoredPlacement, authoredCharacterDataForm, namespaceBindings
44
40
  • Do NOT require storing formatting whitespace (B13)
45
41
  • Single-file roundtrip tests do not require TypeRegistry bootstrap
46
-
47
- XML byte fidelity NOT a gate — see @blockml/serializer RoundtripContract.</documentation>
48
-
42
+
43
+ XML byte fidelity NOT a gate — see @blockml/serializer RoundtripContract.
44
+ </documentation>
49
45
  <references>
50
46
  <see type="bomcap:BomEquals" relation="SeeAlso" />
51
47
  <see type="serdocumentation:RoundtripContract" relation="SeeAlso" />
52
48
  <see type="pardocumentation:Diagnostics" relation="ReadNext" />
53
49
  </references>
54
-
55
- </block>
50
+ </pardocumentation:RoundtripContract>