Skip to content

[Feature]: Load SysML-graphical-bnf.kgbnf into the code generator #438

Closed

Description

@antoineatsoprasteria

What type of issue is this?

  • Bug report
  • Feature request

Prerequisites

  • I have written a descriptive issue title
  • 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

  1. added a commit that references this issue on Nov 12, 2026
    6c27be3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions