You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Load SysML-graphical-bnf.kgbnf into the code generator #438
I have verified that I am running the latest version of the SysML2.NET
I have searched open and closed issues to ensure it has not already been reported
Description
Resources/kebnf.g4 cannot parse the graphical grammar shipped by the SysML v2 release (bnf/SysML-graphical-bnf.kgbnf). Add a kgbnf.g4 variant, loaded through GrammarLoader, that accepts =| / |= partial productions (merged per name: compartment ×24, usage-node ×24, definition-node ×22, general-relationship ×16), &end edge ends, <img src="…"> elements, lowercase hyphenated names, and '«', '»', '…' terminals.
For each <img>, read the slot names from the SVG's <tspan> text (no geometry). They are the only link from a shape to its children (part.svg → part-name-compartment, compartment-stack, port-l*, …); without them 135 productions are unreferenced.
Resolve every reference and report the ones that do not:
textual names against the loaded .kebnf rules: 58 of 63 resolve; usageDeclaration, ValueOrFlowPart, ActionUsageParameterList, CalculationUsageParameterPart, requireMemberPrefix do not;
graphical names against defined productions: ~20 do not, mostly misspellings (event-occurence, element-in-textual-compartment, perform-action-swimlanes, snapshot-name-compartment, exhibit-state-scompartment-element).
Correct them in a new GraphicalGrammarErrata, separate from GrammarErrata: a shared table would report each grammar's entries as unapplied on the other's load, and both touch OccurrenceUsagePrefix. Add the .kgbnf and bnf/images/ to Resources/ from the same release tag as the .kebnf.
Activity
Fix #438: Grammar loader for kgbnf