diff --git a/.gitignore b/.gitignore index b4874ece2..cc555c854 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ dependency-reduced-pom.xml # MacOS Finder .DS_Store +# Generated Python files +*.pyc diff --git a/tool-support/bnf_grammar_tools/.gitignore b/tool-support/bnf_grammar_tools/.gitignore new file mode 100644 index 000000000..ab3023ea6 --- /dev/null +++ b/tool-support/bnf_grammar_tools/.gitignore @@ -0,0 +1,3 @@ +build/ +dist/ +scratch/ diff --git a/tool-support/bnf_grammar_tools/README.adoc b/tool-support/bnf_grammar_tools/README.adoc new file mode 100644 index 000000000..0f17c09ed --- /dev/null +++ b/tool-support/bnf_grammar_tools/README.adoc @@ -0,0 +1,190 @@ += bnf_grammar_tools + +Tools that process KerML and SysML2 concrete language grammars from their respective specifications, check them for correctness and generates two kinds of grammar listings: (1) machine-readable plain text BNF files and (2) human-readable hyperlinked BNF files in HTML format. + +== Usage of the Tools + +=== Obtain a Complete KerML or SysML Specification in HTML Source Format + +Instructions on how to export a selected version of the specification from View Editor to a self-standing HTML file. + +> Note: These instructions are tested with View Editor version 4 with the FireFox browser v130.0.1 on Windows 11. In other browsers the menu or key to inspect the source code may be different. + +1. Open the selected spec in View Editor. +2. Load the full document by clicking the "Full Document" icon (image:VE-full-document-icon.png[]) at the top of the left panel. This may take several minutes. +3. Click the print icon, image:VE-print-icon.png[] left next to the EXPORT icon at the top of the document panel. +4. Wait for a new browser tab to appear with the complete HTML document and a popup print dialog. Again, be patient, this may take several minutes. +5. Cancel the popup print dialog. +6. In the complete HTML document tab, open a Developer / Inspector panel via menu *More tools > Web Developer Tools* or by hitting `Ctrl+Shift+I`. (Note: a direct *Save page as ...* or `Ctlr+S` does not work, as it saves a script.) +7. In the Inspector tab of the Developer panel, right-click the top level `` element, and select *Copy > Outer HTML* from the context menu. +8. Open a new, appropriately named `.html` file in a text editor, paste the contents and save. +9. Close the complete HTML document tab. + +=== Install the Python Environment + +Ensure that Python version 3.8 or higher is installed on your machine. The most convenient way is to use the https://www.jetbrains.com/pycharm/[PyCharm] tool. Create a dedicated `conda` or `venv` development environment and activate it. The best tool to install a Python base environment is https://github.com/conda-forge/miniforge[miniforge]. + +After installation check the active Python version, e.g.: + +[source,shell] +---- + $ python --version + Python 3.12.12 +---- + +Also ensure that the latest version of the following packages are installed. You can use `pip` or `conda` or `mamba`. + +* Package https://pypi.org/project/beautifulsoup4/[beautifulsoup4] is used to parse the HTML input file. +* Package https://pypi.org/project/lark/[lark] is used to parse and verify the extracted BNF source. +* Package https://pypi.org/project/pytest/[pytest] is used to run unit tests. + +for example with the following commands: + +[source,shell] +---- + $ pip install beautifulsoup4 + $ pip install lark + $ pip install pytest +---- + +=== Run the bnf_grammar_processor + +The usage info for the `bnf_grammar_processor` is as below, as usual obtained with the `-h` or `--help` option. +Go to the `tool-support/bnf_grammar_tools` directory and run `python .\bnf_grammar\bnf_grammar_processor.py -h`. + +[source,shell] +---- +usage: python bnf_grammar_processor [-h] [-i [INPUT_DIR]] [-o [OUTPUT_DIR]] SOURCE_DATA + +Extract or parse textual and/or graphical grammars from given KerML or SysML specifications and generate plain text and html BNF grammar files. + +positional arguments: + SOURCE_DATA JSON file defining source data - see examples under + the tests directory + +options: + -h, --help show this help message and exit + -i [INPUT_DIR], --input-dir [INPUT_DIR] + input directory path + -o [OUTPUT_DIR], --output-dir [OUTPUT_DIR] + output directory path + +The processor supports to two main capabilities: +1) Extract the KerML or SysML grammar(s) + from provided raw .html file(s) exported from KerML and SysML specifications in the View Editor tool, + and then validate the extracted grammars, report possible errors, and generate these outputs: + - .json dumps of the processed intermediate data model(s), + - .kebnf and/or .kgbnf plain text files, + - -marked_up.kebnf and/or -marked_up.kgbnf marked up text files, that can be used as a basis for corrected grammars, + - .html files with hyperlinked, human-readable versions of the grammars. +2) Validate corrected -marked_up.kebnf or -marked_up.kgbnf input files + and generate the same files as under 1), but now for the corrected grammars. + +Option 2) is selected when the input filename(s) end on '-marked_up.kebnf' or '-marked_up.kgbnf', otherwise option 1). +Both options will produce a log file named 'bnf_grammar_processor.log' in the working directory. +In SOURCE_DATA the input files should be given in reverse dependendy order, i.e., first KerML textual, then SysML textual, then SysML graphical notation. +Via diff'ing of the extracted and corrected .kebnf and/or .kgbnf files a list of corrections to be fed into the OMG issue trackers can be compiled. +---- + +Note. The file extensions `.kebnf` and `.kgbnf` are inspired by the `.kpar` extension for the KerML archive files. + +The BNF grammars are defined in the format of the https://github.com/lark-parser/lark[Lark] parsing toolkit for Python. The definitions are in: + +* `bnf_grammar/kebnf_textual_grammar.lark`, and, +* `bnf_grammar/kgbnf_graphical_grammar.lark`. + +Inside the `bnf_grammar_processer` Lark is used to check each production individually. Some additional heuristic validation is also performed to permit processing of incorrect grammar or note fragments. All diagnostics are reported in the `bnf_grammar_processor.log` file. For the graphical grammar this includes a mapping table between the existing (PNG) images in the specs from the View Editor source and the new SVG images in `images` subdirectory. + +.Example command line arguments +For the time being, example input and output directories with `SOURCE_DATA` files can be found under the `tests` folder. + +For option 1): + +- `INPUT_DIR` = `tests/KerML_and_SysML_spec_sources` +- `OUTPUT-DIR` = `tests/KerML_and_SysML_grammars` +- `SOURCE_DATA` = `source_specs.json` (in `INPUT_DIR`) + +The style information for the generated HTML outputs resides in `tests/KerML_and_SysML_grammars/bnf_styles.css`. + +For option 2): + +- `INPUT_DIR` = `tests/KerML_and_SysML_grammars` +- `OUTPUT-DIR` = `tests/KerML_and_SysML_grammars` +- `SOURCE_DATA` = `source_marked_ups.json` (in `INPUT_DIR`) + +.Example generated outputs for option 1) (extract) +The bnf_grammar_processor with produces the following outputs (see directory `tests/KerML_and_SysML_grammars`): + +[cols="2,3"] +|=== +| `KerML-textual-bnf-elements.json` | dump of the processed intermediate data model(s) +| `KerML-textual-bnf.kebnf` | generated plain text KerML textual grammar file +| `KerML-textual-bnf-marked_up.kebnf` | generated editable marked up KerML textual grammar file +| `KerML-textual-bnf.html` | generated browsable, hyperlinked HTML KerML textual grammar file +| `SysML-textual-bnf-elements.json` | dump of the processed intermediate data model(s) +| `SysML-textual-bnf.kebnf` | generated plain text SysML textual grammar file +| `SysML-textual-bnf-marked_up.kebnf` | generated editable marked up SysML textual grammar file +| `SysML-textual-bnf.html` | generated browsable, hyperlinked HTML SysML textual grammar file +| `SysML-graphical-bnf-elements.json` | dump of the processed intermediate data model(s) +| `SysML-graphical-bnf.kgbnf` | generated plain text SysML graphical grammar file +| `SysML-graphical-bnf-marked_up.kgbnf` | generated editable marked up SysML textual grammar file +| `SysML-graphical-bnf.html` | generated browsable, hyperlinked HTML SysML textual grammar file (See Note) +|=== + +Note. The SVG images for the graphical BNF productions reside in `tests/KerML_and_SysML_grammars/images`. They are copied from the source in https://github.com/Systems-Modeling/Graphical-Specification-WG/tree/main/src/Graphical-BNF/_svg[Graphical-Specification-WG github repo]. + +Each run of the `bnf_grammar_processor` produces a log on the console and in file `bnf_grammar_processor.log`. The log of the previous run is saved in `bnf_grammar_processor.log.backup`, which can be used to detect differences between runs. + +=== Correct the Extracted Grammar Files and Reprocess with the bnf_grammar_processor + +If there are errors in the grammar files, the following workflow can be used to apply bulk corrections. + +. Copy `KerML-textual-bnf-marked_up.kebnf` to `KerML-textual-bnf-corrected-marked_up.kebnf` +. Copy `SysML-textual-bnf-marked_up.kebnf` to `SysML-textual-bnf-corrected-marked_up.kebnf` +. Copy `SysML-graphical-bnf-marked_up.kgbnf` to `SysML-graphical-bnf-corrected-marked_up.kgbnf` +. Check the errors in the log files, and modify the `...-corrected-marked_up.k*bnf` files in a text editor to correct the errors. +. After every couple of corrections, run the `bnf_grammar_processor` with the option 2) arguments. This will validate the corrected `.kebnf` and `.kgbnf` and generate the set of files described in the table below, similar to option 1) +. Iterate the steps 4 and 5, until satisfied. +. By making a diff between pairs of original (`...-bnf-marked_up.k*bnf`) and corrected (`...-bnf-corrected-marked_up.k*bnf`) files the required changes to be raised in OMG issues can be systematically compiled. + +.Example generated files for option 2) +[cols="2,3"] +|=== +| `KerML-textual-bnf-corrected-elements.json` | dump of the corrected intermediate data model(s) +| `KerML-textual-bnf-corrected.kebnf` | generated corrected plain text KerML textual grammar file +| `KerML-textual-bnf-corrected.html` | generated corrected browsable, hyperlinked HTML KerML textual grammar file +| `SysML-textual-bnf-corrected-elements.json` | dump of the processed intermediate corrected data model(s) +| `SysML-textual-bnf-corrected.kebnf` | generated corrected plain text SysML textual grammar file +| `SysML-textual-bnf-corrected.html` | generated corrected browsable, hyperlinked HTML SysML textual grammar file +| `SysML-graphical-bnf-corrected-elements.json` | dump of the corrected intermediate data model(s) +| `SysML-graphical-bnf-corrected.kgbnf` | generated corrected plain text SysML graphical grammar file +| `SysML-graphical-bnf-corrected.html` | generated corrected browsable, hyperlinked HTML SysML textual grammar file +|=== + +=== Use the bnf_file_parser for Final Checks + +As a final check the `bnf_file_parser` can be used to validate complete, corrected BNF grammar files. + +The usage info for the `bnf_file_parser` is as below, as usual obtained with the `-h` or `--help` option. +Go to the `tool-support/bnf_grammar_tools` directory and run `python .\bnf_grammar\bnf_file_parser.py -h`. + +[source,shell] +---- +usage: bnf_file_parser [-h] BNF_PATH + +Parse KerML or SysML grammar files in textual or graphical BNF format. + +positional arguments: + BNF_PATH Path to plain text BNF file with extension .kebnf or .kgbnf + +options: + -h, --help show this help message and exit +---- + +Run `bnf_file_parser` on the following files: + +* `KerML-textual-bnf-corrected.kebnf` +* `SysML-textual-bnf-corrected.kebnf` +* `SysML-graphical-bnf-corrected.kgbnf` + +The console and the log file `bnf_file_parser.log` will list any errors still present. Otherwise, if the parse is completely successful, a dump of the resulting abstract syntax tree (in Lark's pretty print format) will be listed. diff --git a/tool-support/bnf_grammar_tools/VE-full-document-icon.png b/tool-support/bnf_grammar_tools/VE-full-document-icon.png new file mode 100644 index 000000000..709493157 Binary files /dev/null and b/tool-support/bnf_grammar_tools/VE-full-document-icon.png differ diff --git a/tool-support/bnf_grammar_tools/VE-print-icon.png b/tool-support/bnf_grammar_tools/VE-print-icon.png new file mode 100644 index 000000000..7089eedd7 Binary files /dev/null and b/tool-support/bnf_grammar_tools/VE-print-icon.png differ diff --git a/tool-support/bnf_grammar_tools/__init__.py b/tool-support/bnf_grammar_tools/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tool-support/bnf_grammar_tools/bnf_file_parser.log b/tool-support/bnf_grammar_tools/bnf_file_parser.log new file mode 100644 index 000000000..e69de29bb diff --git a/tool-support/bnf_grammar_tools/bnf_file_parser.log.backup b/tool-support/bnf_grammar_tools/bnf_file_parser.log.backup new file mode 100644 index 000000000..e69de29bb diff --git a/tool-support/bnf_grammar_tools/bnf_grammar/__init__.py b/tool-support/bnf_grammar_tools/bnf_grammar/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tool-support/bnf_grammar_tools/bnf_grammar/bnf_file_parser.py b/tool-support/bnf_grammar_tools/bnf_grammar/bnf_file_parser.py new file mode 100644 index 000000000..4e8ad4f22 --- /dev/null +++ b/tool-support/bnf_grammar_tools/bnf_grammar/bnf_file_parser.py @@ -0,0 +1,110 @@ +#!python + +""" +bnf_file_parser is a command line tool that parses a KerML or SysML plain text grammar file. + +The supported file formats are: +- .kebnf for a KerML or SysML textual notation grammar +- .kgbnf for a SysML graphical notation grammar + +Its usage is described below in the main() function. + +@author: Hans Peter de Koning (DEKonsult) + +Requirements: + +This tool requires installation of the following packages: +- lark (See https://pypi.org/project/lark) + +""" + +import sys +import os +import shutil +import argparse +from datetime import datetime, timezone +from typing import Optional +from lark import Lark, UnexpectedInput + +# Create logger for debug, info, warning, error, critical messages +import logging +LOGGER = logging.getLogger() + + +class BnfParser: + def __init__(self) -> None: + self.start_timestamp: Optional[datetime] = None + self.bnf_filepath: Optional[str] = None + self.parser: Optional[Lark] = None + + def parse(self, bnf_filepath: str) -> None: + self.start_timestamp = datetime.now(timezone.utc).isoformat(timespec="seconds").replace("+00:00", "Z") + self.bnf_filepath = bnf_filepath + + LOGGER.info(f"Started parsing {self.bnf_filepath} at {self.start_timestamp}") + + basename, ext = os.path.splitext(bnf_filepath) + grammar_file = None + if ext == ".kebnf": + grammar_file = "kebnf_textual_grammar.lark" + elif ext == ".kgbnf": + grammar_file = "kgbnf_graphical_grammar.lark" + else: + LOGGER.critical(f"Unrecognized file extension for BNF_PATH {bnf_filepath}, terminating ...") + sys.exit(1) + + self.parser = Lark.open(grammar_file, rel_to=__file__, parser="lalr") + + bnf_file = open(bnf_filepath, "r", encoding="utf-8") + bnf_input = bnf_file.read() + bnf_file.close() + + try: + parse_tree = self.parser.parse(bnf_input) + except UnexpectedInput as e: + LOGGER.error(f"Parse error in {self.bnf_filepath}:\n{e}") + else: + LOGGER.info(f"Parse completed successfully") + LOGGER.info(f"The resulting (AST) parse tree is:\n\n{parse_tree.pretty()}") + + +def main() -> None: + # Initialize logging + LOGGER.setLevel(logging.DEBUG) + formatter = logging.Formatter("%(levelname)-8s: %(message)s") + + console_handler = logging.StreamHandler() + console_handler.set_name("console") + console_handler.setLevel(logging.INFO) + console_handler.setFormatter(formatter) + LOGGER.addHandler(console_handler) + + log_file_name = "bnf_file_parser.log" + if os.path.exists(log_file_name): + # Create backup copy of the log-file to inspect differences between runs + shutil.copy2(log_file_name, log_file_name + ".backup") + + file_handler = logging.FileHandler(log_file_name, mode="w", encoding="utf-8") + file_handler.set_name("logfile") + file_handler.setLevel(logging.INFO) + file_handler.setFormatter(formatter) + LOGGER.addHandler(file_handler) + + LOGGER.debug(f"bnf_grammar_parser started in {os.getcwd()}") + + # Parse command line + parser = argparse.ArgumentParser( + prog="bnf_file_parser", + allow_abbrev=False, + description="Parse KerML or SysML grammar files in textual or graphical BNF format.") + parser.add_argument("bnf_path", metavar="BNF_PATH", type=str, help="Path to plain text BNF file with extension .kebnf or .kgbnf") + args = parser.parse_args() + LOGGER.debug(f"args={args}") + + # Run the parser + bnf_parser = BnfParser() + bnf_parser.parse(args.bnf_path) + + +if __name__ == "__main__": + main() diff --git a/tool-support/bnf_grammar_tools/bnf_grammar/bnf_grammar_processor.py b/tool-support/bnf_grammar_tools/bnf_grammar/bnf_grammar_processor.py new file mode 100644 index 000000000..db2d0cf75 --- /dev/null +++ b/tool-support/bnf_grammar_tools/bnf_grammar/bnf_grammar_processor.py @@ -0,0 +1,1431 @@ +#!python + +""" +bnf_grammar_processor is a command line tool that +1. can extract the textual and graphical BNF grammars from + exports of the KerML and SysML specifications in raw HTML format +2. can parse and validate (manually) corrected BNF grammar files. + +Detailed usage documentation is below in the main() function, +and also be obtained by running the tool with the --help option. + +@author: Hans Peter de Koning (DEKonsult) + +Requirements: +This tool requires installation of the following packages: +- beautifulsoup4 (See https://pypi.org/project/beautifulsoup4/) +- lark (See https://pypi.org/project/lark) +""" + +import os +import shutil +import sys +import json +import re +import argparse +from datetime import datetime, timezone +from dataclasses import dataclass, asdict +from enum import Enum, auto +from logging import Logger +from textwrap import wrap +from types import NoneType +from typing import Any, ClassVar, Iterable, Optional + +from bs4 import BeautifulSoup, Tag, PageElement, NavigableString + +from lark import Lark, Transformer, Tree, UnexpectedInput + +# Create logger for diagnostic messages at debug, info, warning, error and critical levels +import logging + +from lxml.html.defs import list_tags + +LOGGER: Logger = logging.getLogger() + +# Marker denoting start of a line comment in generated output +LINE_COMMENT_MARKER = "//" + +# Images directory to hold SVG images as part of graphical BNF productions +IMAGES_DIR = "images" + +# Scaling factor for right-sizing SVG images in graphical BNF productions +SVG_SCALING_FACTOR = 1.5 + + +class TokenKind(Enum): + TERMINAL = auto() + NON_TERMINAL = auto() + NOTE = auto() + EQUALS = auto() + COLON = auto() + IMAGE = auto() + INTERPUNCTION = auto() + WHITESPACE = auto() + LINE_COMMENT = auto() + + +class RenderMode(Enum): + HTML = auto() + TXT = auto() + +@dataclass +class Token: + kind: TokenKind = None + text: str = "" + + +@dataclass +class ListStackItem: + kind: str = "" + level: int = 0 + item_count: int = 0 + + +@dataclass +class Grammar: + name: str + production_names: set[str] + + +@dataclass +class GrammarElement: + """Abstract superclass for any element of the internal grammar metamodel""" + processor: ClassVar["GrammarProcessor"] + """the activated GrammarProcessor instance""" + clause_id: str + lines: list[str] + + def get_marked_up_txt(self) -> str: + LOGGER.error(f"GrammarElement.get_marked_up_txt() should be overridden in subclass {self.__class__.__name__}, never called.") + return "" + + def get_txt(self) -> str: + LOGGER.error(f"GrammarElement.get_txt() should be overridden in subclass {self.__class__.__name__}, never called.") + return "" + + def get_html(self) -> str: + rendered_lines = "\n".join(self.lines) + return f"
\n{rendered_lines}\n\n\n"
+
+ def get_as_dict(self) -> dict[str, Any]:
+ self_as_dict = asdict(self)
+ self_as_dict["@type"] = self.__class__.__name__
+ return self_as_dict
+
+ @staticmethod
+ def get_safe_anchor_id(candidate_anchor_id: str) -> str:
+ """
+ Return safe anchor id for given candidate string.
+
+ To avoid name collisions between PascalCase and UPPER_SNAKE_CASE identifiers,
+ append "_" to all uppercase tokens because the HTML anchor id attribute is not case-sensitive
+ """
+ return f"{candidate_anchor_id}_" if candidate_anchor_id.isupper() else candidate_anchor_id
+
+
+#dataclass
+class Comment(GrammarElement):
+ def get_marked_up_txt(self) -> str:
+ return self.get_txt()
+
+ def get_txt(self) -> str:
+ rendered_string = "\n".join(self.lines)
+ return f"{rendered_string}\n\n"
+
+ def get_html(self) -> str:
+ if self.lines[0].startswith("<"):
+ rendered_string = "".join(self.lines)
+ else:
+ rendered_string = "{rendered_string}\n
\n" + + +@dataclass +class Info(GrammarElement): + source: str + timestamp: str + + def get_marked_up_txt(self) -> str: + return self.get_txt() + + def get_txt(self) -> str: + rendered_lines = [ + line_comment(f"Source document: {self.source}"), + line_comment(f"Generated by bnf_grammar_processor at: {self.timestamp}") + ] + [line_comment(x) for x in self.lines] + rendered_string = "".join(rendered_lines) + return f"{rendered_string}\n\n" + + def get_html(self) -> str: + rendered_lines = [ + f"{LINE_COMMENT_MARKER} Source document: {self.source}", + f"{LINE_COMMENT_MARKER} Generated by bnf_grammar_processor at: {self.timestamp}" + ] + [f"{LINE_COMMENT_MARKER} {x}" for x in self.lines] + rendered_string = "{rendered_string}\n
\n" + + +@dataclass +class Heading(GrammarElement): + def get_marked_up_txt(self) -> str: + return self.get_txt() + + def get_txt(self) -> str: + assert len(self.lines) == 1 + return f"{line_comment(self.lines[0])}\n" + + def get_html(self) -> str: + assert len(self.lines) == 1 + if self.clause_id: + anchor = f'' + level = self.clause_id.count(".") + 1 + else: + anchor = "" + level = 1 + html_string = f'{rendered_lines}\n\n"
+ return hyperlinked_production
+
+
+@dataclass
+class Image(GrammarElement):
+ def get_marked_up_txt(self) -> str:
+ return self.get_txt()
+
+ def get_txt(self) -> str:
+ rendered_lines = "\n".join(self.lines)
+ return f"{rendered_lines}\n"
+
+ def get_html(self) -> str:
+ rendered_lines = "\n".join(self.lines)
+ return f"{rendered_lines}\n"
+
+
+@dataclass
+class NoteRef(GrammarElement):
+ def get_marked_up_txt(self) -> str:
+ return self.get_txt()
+
+ def get_txt(self) -> str:
+ rendered_lines = "".join(self.lines)
+ return f"{line_comment(rendered_lines)}\n"
+
+ def get_html(self) -> str:
+ rendered_lines = "".join(self.lines)
+ return f"{line_comment(rendered_lines, False)}
\n" + + +@dataclass +class NoteList(GrammarElement): + html_snippet: str + + def get_marked_up_txt(self) -> str: + list_tag_pattern = re.compile(r"(<(ol|ul|li)>)") + snippet_with_linebreaks = list_tag_pattern.sub(r"\n\1", self.html_snippet).strip() + rendered_lines = ["Notes:"] + rendered_lines += snippet_with_linebreaks.split("\n") + comment_prefix = f"{LINE_COMMENT_MARKER} " + rendered_string = comment_prefix + f"\n{comment_prefix}".join(rendered_lines) + "\n\n" + return rendered_string + + def get_txt(self) -> str: + rendered_lines = ["Notes:"] + rendered_lines += render_nested_lists(self.html_snippet, mode=RenderMode.TXT, apply_line_comment=False).split("\n") + rendered_string = block_comment(rendered_lines) + rendered_string = remove_html_tags(rendered_string) + return rendered_string + + def get_html(self) -> str: + rendered_lines = [f"{LINE_COMMENT_MARKER} Notes:
"] + rendered_lines.extend(render_nested_lists(self.html_snippet, mode=RenderMode.HTML, apply_line_comment=True).split("\n")) + rendered_string = "\n".join(rendered_lines) + return rendered_string + + +class GrammarProcessor: + """ + Grammar processor that handles KerML and SysML2 BNF grammars + + The processor has two main methods: + - extract_bnf_from_spec(...): extracts BNF grammar snippets from a given KerML or SysML spec file in raw (View Editor) HTML format + - process_marked_up_bnf(...): processes a (corrected) BNF grammar from a given KerML or SysML marked_up text file + + Both can process two kinds of grammars: + - concrete textual notation + - concrete graphical notation + + Mistakes or ambiguous productions and notes are logged in the form of WARNING or ERROR messages. + """ + def __init__(self): + self.start_timestamp = datetime.now(timezone.utc).isoformat(timespec="seconds").replace("+00:00", "Z") + self.input_dir = "" + self.output_dir = "" + self.input_path: str = "" + self.input_path_previous: Optional[str] = None + self.soup: Optional[BeautifulSoup] = None + self.spec_title = "" + self.bnf_clause_id: str = "" + self.bnf_path: str = "" + self.syntax_kind: str = "" + self.elements: list[GrammarElement] = [] + self.grammars: list[Grammar] = [] + self.reserved_keyword_set: set[str] = set() + self.extracted_keyword_set: set[str] = set() + self.reserved_symbol_set: set[str] = set() + self.extracted_symbol_set: set[str] = set() + self.parser: Optional[Lark] = None + self.partial_productions: dict[str, list[str]] = dict() + self.missing_svgs: list[str] = [] + self.image_map: dict[str, str] = dict() + self.unresolved_non_terminals_dict: dict[str, list[str]] = dict() + + # Provide a backlink to this GrammarExtractor inside the GrammarElements + GrammarElement.processor = self + + def extract_bnf_from_spec(self, input_dir: str, output_dir: str, input_file: str, syntax_kind: str, bnf_clause_id: str): + """ + extract BNF productions and notes from raw HTML dump of a KerML or SysML specification + + This method produces the following outputs: + - a plain text file containing a machine-readable version of each BNF grammar, + with extension .kebnf for a textual EBNF source and extension .kgbnf for a graphical EBNF source; + - an HTML file containing a human-readable version of each BNF grammar, in which all references to terms are hyperlinked to their declaration; + - a log file containing diagnostic information (DEBUG, INFO, WARNING, ERROR messages) about the processed grammars. + + This method uses heuristics to process the raw HTML input, which may contain format and content errors. + """ + self.input_dir = input_dir + self.output_dir = output_dir + self.input_path = os.path.join(self.input_dir, input_file) + + if syntax_kind == "textual-bnf": + self.syntax_kind = syntax_kind + self.bnf_path = input_file.replace("-spec.html", "-textual-bnf") + self.parser = Lark.open("kebnf_textual_grammar.lark", rel_to=__file__, parser="lalr") + elif syntax_kind == "graphical-bnf": + self.syntax_kind = syntax_kind + self.bnf_path = input_file.replace("-spec.html", "-graphical-bnf") + self.parser = Lark.open("kgbnf_graphical_grammar.lark", rel_to=__file__, parser="lalr") + elif syntax_kind == "kerml-library": + raise NotImplementedError + elif syntax_kind == "sysml-library": + raise NotImplementedError + else: + LOGGER.critical(f"Unsupported BNF mode: {syntax_kind}, terminating ...\n") + sys.exit(1) + + self.bnf_clause_id = bnf_clause_id + self.spec_title = "" + self.elements = [] + self.grammars.append(Grammar(self.bnf_path, set())) + self.reserved_keyword_set = set() + self.extracted_keyword_set = set() + self.reserved_symbol_set = set() + self.extracted_symbol_set = set() + self.partial_productions = dict() + self.image_map = dict() + self.unresolved_non_terminals_dict: dict[str, list[str]] = dict() + + LOGGER.info(20 * "=") + LOGGER.info(f"Extract BNF from {self.input_path} syntax-kind={syntax_kind} clause={self.bnf_clause_id} at {self.start_timestamp}") + LOGGER.info(20 * "=") + + self.elements.append(Info("", [], source=self.input_path.replace("\\", "/"), timestamp=self.start_timestamp)) + + # Regular expression patterns + KEYWORD_PATTERN = re.compile(r"('[a-z]{2,}')") + SYMBOL_PATTERN = re.compile(r"('[^A-Za-z\s]+')") + SEE_NOTE_PATTERN = re.compile(r"^[ \t]*[(]?[ \t]*See Note.*$", flags=re.IGNORECASE) + + if self.input_path == self.input_path_previous: + # Skip reparsing the HTML spec and reuse self.soup + pass + else: + with open(self.input_path, mode="r", encoding="utf-8") as html_spec: + self.soup = BeautifulSoup(html_spec, "html.parser") + + inside_bnf_clause = False + contains_note_reference = False + contains_notes_section = False + contains_pre_tag = False + count = 0 + clause_id = "" + clause_title = "" + + # Walk through all HTML elements (tags) and extract + # - clause headings + # - grammar productions and their notes from the given textual or graphical notation clause + for tag in self.soup.find_all(name=["h1", "pre", "p", "ol"], recursive=True): + assert isinstance(tag, Tag) + count += 1 + LOGGER.debug(f"Visit tag #{count} {tag.name}") + + if tag.name == "h1": + # Process clause heading + contains_note_reference = False + contains_notes_section = False + contains_pre_tag = False + # LOGGER.debug(f"tag{count}={tag}") + + class_attribute = tag.attrs.get("class") + if class_attribute and "view-title" in class_attribute: + # LOGGER.debug(f"view-title tag={tag}") + clause_id = tag.find("span", {"class": "ve-view-number"}).string + clause_id = clause_id.strip() if clause_id else "" + clause_title = tag.find("transclude-name").find("span").string + clause_title = clause_title.strip() if clause_title else "" + + if clause_id == self.bnf_clause_id: + inside_bnf_clause = True + elif inside_bnf_clause and not clause_id.startswith(self.bnf_clause_id): + inside_bnf_clause = False + + if inside_bnf_clause or clause_id == "": + if clause_id == "": + clause_string = clause_title + self.spec_title = clause_title + else: + clause_string = f"Clause {clause_id} {clause_title}" + + LOGGER.info(f"PROCESSING {clause_string}") + self.elements.append(Heading(clause_id, [clause_string])) + + # TODO: Properly check forelements in notes lists, i.e. contained in
element that contains BNF grammar lines + if tag.parent.name == "li": + LOGGER.warning(f"appearing inside
element: {candidate_prod}")
+ current_note_ref = NoteRef(clause_id, lines=[line])
+ self.elements.append(current_note_ref)
+ else:
+ if line.find("=|") >= 0:
+ # Process partial graphical BNF productions
+ is_partial = True
+ lhs, rhs = line.split("=|", 1)
+ production_name = lhs.strip()
+ abstract_type = ""
+ if not production_name in self.partial_productions:
+ self.partial_productions[production_name] = []
+ for term in [x.strip() for x in rhs.split("|")]:
+ if term:
+ self.partial_productions[production_name].append(term)
+ else:
+ # Process other BNF productions
+ is_partial = False
+ lhs1 = line.split("=")[0].strip()
+ lhs2 = lhs1.split(":", 1)
+ production_name = lhs2[0].strip()
+ if len(lhs2) == 2:
+ abstract_type = lhs2[1].strip()
+ elif is_pascal_case(production_name):
+ abstract_type = production_name
+ else:
+ abstract_type = ""
+ if production_name in self.grammars[-1].production_names:
+ LOGGER.error(f"Non-unique production name: {production_name} in {self.grammars[-1].production_names}")
+ else:
+ self.grammars[-1].production_names.add(production_name)
+
+ current_production = Production(clause_id, [line], production_name, abstract_type, is_partial)
+ self.elements.append(current_production)
+
+ if line[0] in (" ", "\t"):
+ LOGGER.error(f"Production start line starts with a space or tab: {line}")
+ line = line.strip()
+ ONE_EQUALS_PATTERN = re.compile(r"( = | =$)")
+ if not ONE_EQUALS_PATTERN.search(line):
+ LOGGER.warning(f"Production start line does not contain exactly one '=': {line}")
+ elif current_note_ref:
+ current_note_ref.lines.append(line)
+ elif " element: tag={subtag}")
+
+ elif tag.name == "p" and inside_bnf_clause and contains_pre_tag:
+ LOGGER.debug(f"note
tag={tag}") + if tag.string == "Notes": + contains_notes_section = True + elif (tag.contents and tag.contents[0].name == "strong" + and tag.contents[0].string and tag.contents[0].string.strip() in ("Note.", "Note:")): + # Note in graphical BNF + text_content = clean_text_content(" ".join(tag.stripped_strings), True) + self.elements.append(NoteRef(clause_id, lines=[text_content])) + + + elif tag.name == "ol" and inside_bnf_clause and contains_pre_tag and tag.parent.name != "li": + LOGGER.debug(f"note
single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.ESCAPE_SEQUENCE is specified in 8.2.2.3.PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).MetadataFeature is defined in the Kernel layer (see 8.2.5.12).REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:/* and final */ characters./*, up to and including the first line terminator (if any).*\", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up \"rich text\" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::\" punctuation, optionally with the global scope qualifier \"$\" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.ESCAPE_SEQUENCE is specified in 8.2.2.3.PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).MetadataFeature is defined in the Kernel layer (see 8.2.5.12).REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:
+// /* and final */ characters./*, up to and including the first line terminator (if any).*", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)// Source document: tests/KerML_and_SysML_grammars/KerML-textual-bnf-corrected-marked_up.kebnf
+// Generated by bnf_grammar_processor at: 2025-12-04T19:29:18Z
+
// Source document: tests\KerML_and_SysML_spec_sources\KerML-spec.html
+// Generated by bnf_grammar_processor at: 2025-11-14T23:08:48Z
+
// Manual corrections by HP de Koning +
+LINE_TERMINATOR = + '\n' | '\r' | '\r\n' +// implementation defined character sequence ++ +
LINE_TEXT = + '[^\r\n]*' +// character sequence excluding LINE_TERMINATORs ++ +
WHITE_SPACE = + ' ' | '\t' | '\f' | LINE_TERMINATOR +// space | tab | form_feed | LINE_TERMINATOR ++
// Notes:
+SINGLE_LINE_NOTE = + '//' LINE_TEXT ++ +
MULTILINE_NOTE = + '//*' COMMENT_TEXT '*/' ++ +
REGULAR_COMMENT = + '/*' COMMENT_TEXT '*/' ++ +
COMMENT_TEXT = + ( COMMENT_LINE_TEXT | LINE_TERMINATOR )* ++ +
COMMENT_LINE_TEXT = + '.*(?=(\r|\n|\*/))' +// LINE_TEXT excluding the sequence '*/' ++
NAME = + BASIC_NAME | UNRESTRICTED_NAME ++ +
BASIC_NAME = + BASIC_INITIAL_CHARACTER BASIC_NAME_CHARACTER* ++ +
SINGLE_QUOTE = + '#x27' ++ +
UNRESTRICTED_NAME = + SINGLE_QUOTE ( NAME_CHARACTER | ESCAPE_SEQUENCE )* SINGLE_QUOTE ++
// (See Note 1) +
+ +BASIC_INITIAL_CHARACTER = + ALPHABETIC_CHARACTER | '_' ++ +
BASIC_NAME_CHARACTER = + BASIC_INITIAL_CHARACTER | DECIMAL_DIGIT ++ +
ALPHABETIC_CHARACTER = + 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | + 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' +// any character 'a' through 'z' or 'A' through 'Z' ++ +
DECIMAL_DIGIT = + '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ++ +
NAME_CHARACTER = + 'any printable character other than backslash or single_quote' ++ +
ESCAPE_SEQUENCE = + '\f' | '\n' | '\t' | '\r' | '\v' +// (See Note 2) ++
// Notes:
+single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE = + DECIMAL_DIGIT+ ++ +
EXPONENTIAL_VALUE =
+ DECIMAL_VALUE ('e' | 'E') ('+' | '-')? DECIMAL_VALUE
+
+// Notes:
+DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.STRING_VALUE = + '"' ( STRING_CHARACTER | ESCAPE_SEQUENCE )* '"' ++ +
STRING_CHARACTER = + 'any printable character other than backslash or "' ++
// Notes:
+ESCAPE_SEQUENCE is specified in 8.2.2.3.RESERVED_KEYWORD = + 'about' | 'abstract' | 'alias' | 'all' | 'and' | 'as' | 'assoc' | 'behavior' | 'binding' | 'bool' | 'by' | 'chains' + | 'class' | 'classifier' | 'comment' | 'composite' | 'conjugate' | 'conjugates' | 'conjugation' | 'connector' + | 'const' | 'crosses' | 'datatype' | 'default' | 'dependency' | 'derived' | 'differences' | 'disjoining' | 'disjoint' + | 'doc' | 'else' | 'end' | 'expr' | 'false' | 'feature' | 'featured' | 'featuring' | 'filter' | 'first' | 'flow' + | 'for' | 'from' | 'function' | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'inout' | 'interaction' + | 'intersects' | 'inv' | 'inverse' | 'inverting' | 'istype' | 'language' | 'library' | 'locale' | 'member' | 'meta' + | 'metaclass' | 'metadata' | 'multiplicity' | 'namespace' | 'nonunique' | 'not' | 'null' | 'of' | 'or' | 'ordered' + | 'out' | 'package' | 'portion' | 'predicate' | 'private' | 'protected' | 'public' | 'redefines' | 'redefinition' + | 'references' | 'rep' | 'return' | 'specialization' | 'specializes' | 'standard' | 'step' | 'struct' + | 'subclassifier' | 'subset' | 'subsets' | 'subtype' | 'succession' | 'then' | 'to' | 'true' | 'type' | 'typed' + | 'typing' | 'unions' | 'var' | 'xor' ++
RESERVED_SYMBOL =
+ '~' | '}' | '|' | '{' | '^' | ']' | '[' | '@' | '??' | '?' | '>=' | '>' | '=>' | '===' | '==' | '=' | '<=' | '<'
+ | ';' | ':>>' | ':>' | ':=' | '::>' | '::' | ':' | '/' | '.?' | '..' | '.' | '->' | '-' | ',' | '+' | '**' | '*' | ')'
+ | '(' | '&' | '%' | '$' | '#' | '!==' | '!='
+
+
+TYPED_BY = ':' | 'typed' 'by' ++ +
SPECIALIZES = ':>' | 'specializes' ++ +
SUBSETS = ':>' | 'subsets' ++ +
REFERENCES = '::>' | 'references' ++ +
CROSSES = '=>' | 'crosses' ++ +
REDEFINES = ':>>' | 'redefines' ++ +
CONJUGATES = '~' | 'conjugates' ++
Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? ++ +
RelationshipBody : Relationship =
+ ';' | '{' RelationshipOwnedElement* '}'
+
+
+RelationshipOwnedElement : Relationship = + ownedRelatedElement += OwnedRelatedElement + | ownedRelationship += OwnedAnnotation ++ +
OwnedRelatedElement : Element = + NonFeatureElement | FeatureElement ++
Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' ( Identification? 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + RelationshipBody ++
// Notes:
+PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).Annotation = + annotatedElement = [QualifiedName] ++ +
OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature ++
// Notes:
+MetadataFeature is defined in the Kernel layer (see 8.2.5.12).Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++ +
Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++
// Notes:
+REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:
+/* and final */ characters./*, up to and including the first line terminator (if any).*", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE + body = REGULAR_COMMENT ++
// Notes:
+REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.RootNamespace : Namespace = + NamespaceBodyElement* ++
// (See Note 1) +
+ +Namespace = + ( ownedRelationship += PrefixMetadataMember )* + NamespaceDeclaration NamespaceBody ++
// (See Note 2) +
+ +NamespaceDeclaration : Namespace = + 'namespace' Identification ++ +
NamespaceBody : Namespace =
+ ';' | '{' NamespaceBodyElement* '}'
+
+
+NamespaceBodyElement : Namespace = + ownedRelationship += NamespaceMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? ++ +
VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' ++ +
NamespaceMember : OwningMembership = + NonFeatureMember + | NamespaceFeatureMember ++ +
NonFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += MemberElement ++ +
NamespaceFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += FeatureElement ++ +
AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody ++ +
QualifiedName = + ( '$' '::' )? ( NAME '::' )* NAME ++
// (See Note 3) +
+// Notes:
+Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration RelationshipBody ++ +
ImportDeclaration : Import = + MembershipImport | NamespaceImport ++ +
MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? ++
// (See Note 1) +
+ +NamespaceImport =
+ importedNamespace = [QualifiedName] '::' '*'
+ ( '::' isRecursive ?= '**' )?
+ | importedNamespace = FilterPackage
+ { ownedRelatedElement += importedNamespace }
+
+
+FilterPackage : Package = + ownedRelationship += ImportDeclaration + ( ownedRelationship += FilterPackageMember )+ ++ +
FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' ++
// Notes:
+importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).MemberElement : Element = + AnnotatingElement | NonFeatureElement ++ +
NonFeatureElement : Element = + Dependency + | Namespace + | Type + | Classifier + | DataType + | Class + | Structure + | Metaclass + | Association + | AssociationStructure + | Interaction + | Behavior + | Function + | Predicate + | Multiplicity + | Package + | LibraryPackage + | Specialization + | Conjugation + | Subclassification + | Disjoining + | FeatureInverting + | FeatureTyping + | Subsetting + | Redefinition + | TypeFeaturing ++ +
FeatureElement : Feature = + Feature + | Step + | Expression + | BooleanExpression + | Invariant + | Connector + | BindingConnector + | Succession + | Flow + | SuccessionFlow ++
Type = + TypePrefix 'type' + TypeDeclaration TypeBody ++ +
TypePrefix : Type = + ( isAbstract ?= 'abstract' )? + ( ownedRelationship += PrefixMetadataMember )* ++ +
TypeDeclaration : Type = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SpecializationPart | ConjugationPart )+ + TypeRelationshipPart* ++ +
SpecializationPart : Type = + SPECIALIZES ownedRelationship += OwnedSpecialization + ( ',' ownedRelationship += OwnedSpecialization )* ++ +
ConjugationPart : Type = + CONJUGATES ownedRelationship += OwnedConjugation ++ +
TypeRelationshipPart : Type = + DisjoiningPart + | UnioningPart + | IntersectingPart + | DifferencingPart ++ +
DisjoiningPart : Type = + 'disjoint' 'from' ownedRelationship += OwnedDisjoining + ( ',' ownedRelationship += OwnedDisjoining )* ++ +
UnioningPart : Type = + 'unions' ownedRelationship += Unioning + ( ',' ownedRelationship += Unioning )* ++ +
IntersectingPart : Type = + 'intersects' ownedRelationship += Intersecting + ( ',' ownedRelationship += Intersecting )* ++ +
DifferencingPart : Type = + 'differences' ownedRelationship += Differencing + ( ',' ownedRelationship += Differencing )* ++ +
TypeBody : Type =
+ ';' | '{' TypeBodyElement* '}'
+
+
+TypeBodyElement : Type = + ownedRelationship += NonFeatureMember + | ownedRelationship += FeatureMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++
Specialization = + ( 'specialization' Identification )? + 'subtype' SpecificType + SPECIALIZES GeneralType + RelationshipBody ++ +
OwnedSpecialization : Specialization = + GeneralType ++ +
SpecificType : Specialization =
+ specific = [QualifiedName]
+ | specific += OwnedFeatureChain
+ { ownedRelatedElement += specific }
+
+
+GeneralType : Specialization =
+ general = [QualifiedName]
+ | general += OwnedFeatureChain
+ { ownedRelatedElement += general }
+
+Conjugation =
+ ( 'conjugation' Identification )?
+ 'conjugate'
+ ( conjugatedType = [QualifiedName]
+ | conjugatedType = FeatureChain
+ { ownedRelatedElement += conjugatedType }
+ )
+ CONJUGATES
+ ( originalType = [QualifiedName]
+ | originalType = FeatureChain
+ { ownedRelatedElement += originalType }
+ )
+ RelationshipBody
+
+
+OwnedConjugation : Conjugation =
+ originalType = [QualifiedName]
+ | originalType = FeatureChain
+ { ownedRelatedElement += originalType }
+
+Disjoining =
+ ( 'disjoining' Identification )?
+ 'disjoint'
+ ( typeDisjoined = [QualifiedName]
+ | typeDisjoined = FeatureChain
+ { ownedRelatedElement += typeDisjoined }
+ )
+ 'from'
+ ( disjoiningType = [QualifiedName]
+ | disjoiningType = FeatureChain
+ { ownedRelatedElement += disjoiningType }
+ )
+ RelationshipBody
+
+
+OwnedDisjoining : Disjoining =
+ disjoiningType = [QualifiedName]
+ | disjoiningType = FeatureChain
+ { ownedRelatedElement += disjoiningType }
+
+Unioning = + unioningType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++ +
Intersecting = + intersectingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++ +
Differencing = + differencingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++
FeatureMember : OwningMembership = + TypeFeatureMember + | OwnedFeatureMember ++ +
TypeFeatureMember : OwningMembership = + MemberPrefix 'member' ownedRelatedElement += FeatureElement ++ +
OwnedFeatureMember : FeatureMembership = + MemberPrefix ownedRelatedElement += FeatureElement ++
Classifier = + TypePrefix 'classifier' + ClassifierDeclaration TypeBody ++ +
ClassifierDeclaration : Classifier = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SuperclassingPart | ConjugationPart )? + TypeRelationshipPart* ++ +
SuperclassingPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* ++
Subclassification = + ( 'specialization' Identification )? + 'subclassifier' subclassifier = [QualifiedName] + SPECIALIZES superclassifier = [QualifiedName] + RelationshipBody ++ +
OwnedSubclassification : Subclassification = + superclassifier = [QualifiedName] ++
Feature = + ( FeaturePrefix + ( 'feature' | ownedRelationship += PrefixMetadataMember ) + FeatureDeclaration? + | ( EndFeaturePrefix | BasicFeaturePrefix ) + FeatureDeclaration + ) + ValuePart? TypeBody ++
// (See Note 1) +
+ +EndFeaturePrefix : Feature =
+ ( isConstant ?= 'const' { isVariable = true } )?
+ isEnd ?= 'end'
+
+
+BasicFeaturePrefix : Feature =
+ ( direction = FeatureDirection )?
+ ( isDerived ?= 'derived' )?
+ ( isAbstract ?= 'abstract' )?
+ ( isComposite ?= 'composite' | isPortion ?= 'portion' )?
+ ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )?
+
+
+FeaturePrefix = + ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )? + | BasicFeaturePrefix + ) + ( ownedRelationship += PrefixMetadataMember )* ++
// (See Note 1) +
+ +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature ++ +
OwnedCrossFeature : Feature = + BasicFeaturePrefix FeatureDeclaration ++ +
FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' ++ +
FeatureDeclaration : Feature = + ( isSufficient ?= 'all' )? + ( FeatureIdentification + ( FeatureSpecializationPart | ConjugationPart )? + | FeatureSpecializationPart + | ConjugationPart + ) + FeatureRelationshipPart* ++ +
FeatureIdentification : Feature = + '<' declaredShortName = NAME '>' ( declaredName = NAME )? + | declaredName = NAME ++ +
FeatureRelationshipPart : Feature = + TypeRelationshipPart + | ChainingPart + | InvertingPart + | TypeFeaturingPart ++ +
ChainingPart : Feature = + 'chains' + ( ownedRelationship += OwnedFeatureChaining + | FeatureChain ) ++ +
InvertingPart : Feature = + 'inverse' 'of' ownedRelationship += OwnedFeatureInverting ++ +
TypeFeaturingPart : Feature = + 'featured' 'by' ownedRelationship += OwnedTypeFeaturing + ( ',' ownedTypeFeaturing += OwnedTypeFeaturing )* ++ +
FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* ++ +
MultiplicityPart : Feature =
+ ownedRelationship += OwnedMultiplicity
+ | ( ownedRelationship += OwnedMultiplicity )?
+ ( isOrdered ?= 'ordered' ( {isUnique = false} 'nonunique' )?
+ | {isUnique = false} 'nonunique' ( isOrdered ?= 'ordered' )? )
+
+
+FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions ++ +
Typings : Feature = + TypedBy ( ',' ownedRelationship += OwnedFeatureTyping )* ++ +
TypedBy : Feature = + TYPED_BY ownedRelationship += OwnedFeatureTyping ++ +
Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* ++ +
Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting ++ +
References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting ++ +
Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting ++ +
Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* ++ +
Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition ++
// Notes:
+PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).FeatureTyping = + ( 'specialization' Identification )? + 'typing' typedFeature = [QualifiedName] + TYPED_BY GeneralType + RelationshipBody ++ +
OwnedFeatureTyping : FeatureTyping = + GeneralType ++
Subsetting = + ( 'specialization' Identification )? + 'subset' SpecificType + SUBSETS GeneralType + RelationshipBody ++ +
OwnedSubsetting : Subsetting = + GeneralType ++ +
OwnedReferenceSubsetting : ReferenceSubsetting = + GeneralType ++ +
OwnedCrossSubsetting : CrossSubsetting = + GeneralType ++
Redefinition = + ( 'specialization' Identification )? + 'redefinition' SpecificType + REDEFINES GeneralType + RelationshipBody ++ +
OwnedRedefinition : Redefinition = + GeneralType ++
OwnedFeatureChain : Feature = + FeatureChain ++ +
FeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ ++ +
OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] ++
FeatureInverting =
+ ( 'inverting' Identification? )?
+ 'inverse'
+ ( featureInverted = [QualifiedName]
+ | featureInverted = OwnedFeatureChain
+ { ownedRelatedElement += featureInverted }
+ )
+ 'of'
+ ( invertingFeature = [QualifiedName]
+ | ownedRelatedElement += OwnedFeatureChain
+ { ownedRelatedElement += invertingFeature }
+ )
+ RelationshipBody
+
+
+OwnedFeatureInverting : FeatureInverting =
+ invertingFeature = [QualifiedName]
+ | invertingFeature = OwnedFeatureChain
+ { ownedRelatedElement += invertingFeature }
+
+TypeFeaturing = + 'featuring' ( Identification 'of' )? + featureOfType = [QualifiedName] + 'by' featuringType = [QualifiedName] + RelationshipBody ++ +
OwnedTypeFeaturing : TypeFeaturing = + featuringType = [QualifiedName] ++
DataType = + TypePrefix 'datatype' + ClassifierDeclaration TypeBody ++
Class = + TypePrefix 'class' + ClassifierDeclaration TypeBody ++
Structure = + TypePrefix 'struct' + ClassifierDeclaration TypeBody ++
Association = + TypePrefix 'assoc' + ClassifierDeclaration TypeBody ++ +
AssociationStructure = + TypePrefix 'assoc' 'struct' + ClassifierDeclaration TypeBody ++
Connector = + FeaturePrefix 'connector' + ( FeatureDeclaration? ValuePart? + | ConnectorDeclaration + ) + TypeBody ++ +
ConnectorDeclaration : Connector = + BinaryConnectorDeclaration | NaryConnectorDeclaration ++ +
BinaryConnectorDeclaration : Connector = + ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember ++ +
NaryConnectorDeclaration : Connector =
+ FeatureDeclaration?
+ '(' ownedRelationship += ConnectorEndMember ','
+ ownedRelationship += ConnectorEndMember
+ ( ',' ownedRelationship += ConnectorEndMember )*
+ ')'
+
+
+ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd ++ +
ConnectorEnd : Feature = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity ++ +
OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity ++
BindingConnector = + FeaturePrefix 'binding' + BindingConnectorDeclaration TypeBody ++ +
BindingConnectorDeclaration : BindingConnector = + FeatureDeclaration + ( 'of' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + | ( isSufficient ?= 'all' )? + ( 'of'? ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? ++
Succession = + FeaturePrefix 'succession' + SuccessionDeclaration TypeBody ++ +
SuccessionDeclaration : Succession = + FeatureDeclaration + ( 'first' ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + | ( s.isSufficient ?= 'all' )? + ( 'first'? ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? ++
Behavior = + TypePrefix 'behavior' + ClassifierDeclaration TypeBody ++
Step = + FeaturePrefix + 'step' FeatureDeclaration ValuePart? + TypeBody ++
Function = + TypePrefix 'function' + ClassifierDeclaration FunctionBody ++ +
FunctionBody : Type =
+ ';' | '{' FunctionBodyPart '}'
+
+
+FunctionBodyPart : Type = + ( TypeBodyElement + | ownedRelationship += ReturnFeatureMember + )* + ( ownedRelationship += ResultExpressionMember )? ++ +
ReturnFeatureMember : ReturnParameterMembership = + MemberPrefix 'return' + ownedRelatedElement += FeatureElement ++ +
ResultExpressionMember : ResultExpressionMembership = + MemberPrefix + ownedRelatedElement += OwnedExpression ++
Expression = + FeaturePrefix + 'expr' FeatureDeclaration ValuePart? + FunctionBody ++
Predicate = + TypePrefix 'predicate' + ClassifierDeclaration FunctionBody ++
BooleanExpression = + FeaturePrefix + 'bool' FeatureDeclaration ValuePart? + FunctionBody ++ +
Invariant = + FeaturePrefix + 'inv' ( 'true' | isNegated ?= 'false' )? + FeatureDeclaration ValuePart? + FunctionBody ++
OwnedExpressionReferenceMember : FeatureMembership = + ownedRelationship += OwnedExpressionReference ++ +
OwnedExpressionReference : FeatureReferenceExpression = + ownedRelationship += OwnedExpressionMember ++ +
OwnedExpressionMember : FeatureMembership = + ownedFeatureMember = OwnedExpression ++ +
OwnedExpression : Expression = + ConditionalExpression + | ConditionalBinaryOperatorExpression + | BinaryOperatorExpression + | UnaryOperatorExpression + | ClassificationExpression + | MetaclassificationExpression + | ExtentExpression + | PrimaryExpression ++ +
ConditionalExpression : OperatorExpression = + operator = 'if' + ownedRelationship += ArgumentMember '?' + ownedRelationship += ArgumentExpressionMember 'else' + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember ++ +
ConditionalBinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = ConditionalBinaryOperator + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember ++ +
ConditionalBinaryOperator = + '??' | 'or' | 'and' | 'implies' ++ +
BinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = BinaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember ++ +
BinaryOperator = + '|' | '&' | 'xor' | '..' + | '==' | '!=' | '===' | '!==' + | '<' | '>' | '<=' | '>=' + | '+' | '-' | '*' | '/' + | '%' | '^' | '**' ++ +
UnaryOperatorExpression : OperatorExpression = + operator = UnaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember ++ +
UnaryOperator = + '+' | '-' | '~' | 'not' ++ +
ClassificationExpression : OperatorExpression = + ( ownedRelationship += ArgumentMember )? + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = CastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember ++ +
ClassificationTestOperator = + 'istype' | 'hastype' | '@' ++ +
CastOperator = + 'as' ++ +
MetaclassificationExpression : OperatorExpression = + ownedRelationship += MetadataArgumentMember + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = MetaCastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember ++ +
ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument ++ +
Argument : Feature = + ownedRelationship += ArgumentValue ++ +
ArgumentValue : FeatureValue = + value = OwnedExpression ++ +
ArgumentExpressionMember : FeatureMembership = + ownedRelatedElement += ArgumentExpression ++ +
ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue ++ +
ArgumentExpressionValue : FeatureValue = + value = OwnedExpressionReference ++ +
MetadataArgumentMember : ParameterMembership = + ownedRelatedElement += MetadataArgument ++ +
MetadataArgument : Feature = + ownedRelationship += MetadataValue ++ +
MetadataValue : FeatureValue = + value = MetadataReference ++ +
MetadataReference : MetadataAccessExpression = + ownedRelationship += ElementReferenceMember ++ +
MetaclassificationTestOperator = + '@@' ++ +
MetaCastOperator = + 'meta' ++ +
ExtentExpression : OperatorExpression = + operator = 'all' + ownedRelationship += TypeReferenceMember ++ +
TypeReferenceMember : ParameterMembership = + ownedMemberFeature = TypeReference ++ +
TypeResultMember : ResultParameterMembership = + ownedMemberFeature = TypeReference ++ +
TypeReference : Feature = + ownedRelationship += ReferenceTyping ++ +
ReferenceTyping : FeatureTyping = + type = [QualifiedName] ++ +
EmptyResultMember : ReturnParameterMembership = + ownedRelatedElement += EmptyFeature ++ +
EmptyFeature : Feature =
+ { }
+
+// Notes:
+OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.PrimaryExpression : Expression = + FeatureChainExpression + | NonFeatureChainPrimaryExpression ++ +
PrimaryArgumentValue : FeatureValue = + value = PrimaryExpression ++ +
PrimaryArgument : Feature = + ownedRelationship += PrimaryArgumentValue ++ +
PrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument ++ +
NonFeatureChainPrimaryExpression : Expression = + BracketExpression + | IndexExpression + | SequenceExpression + | SelectExpression + | CollectExpression + | FunctionOperationExpression + | BaseExpression ++ +
NonFeatureChainPrimaryArgumentValue : FeatureValue = + value = NonFeatureChainPrimaryExpression ++ +
NonFeatureChainPrimaryArgument : Feature = + ownedRelationship += NonFeatureChainPrimaryArgumentValue ++ +
NonFeatureChainPrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument ++ +
BracketExpression : OperatorExpression = + ownedRelationship += PrimaryArgumentMember + operator = '[' + ownedRelationship += SequenceExpressionListMember ']' ++ +
IndexExpression =
+ ownedRelationship += PrimaryArgumentMember '#'
+ '(' ownedRelationship += SequenceExpressionListMember ')'
+
+
+SequenceExpression : Expression =
+ '(' SequenceExpressionList ')'
+
+
+SequenceExpressionList : Expression = + OwnedExpression ','? | SequenceOperatorExpression ++ +
SequenceOperatorExpression : OperatorExpression = + ownedRelationship += OwnedExpressionMember + operator = ',' + ownedRelationship += SequenceExpressionListMember ++ +
SequenceExpressionListMember : FeatureMembership = + ownedMemberFeature = SequenceExpressionList ++ +
FeatureChainExpression = + ownedRelationship += NonFeatureChainPrimaryArgumentMember '.' + ownedRelationship += FeatureChainMember ++ +
CollectExpression = + ownedRelationship += PrimaryArgumentMember '.' + ownedRelationship += BodyArgumentMember ++ +
SelectExpression = + ownedRelationship += PrimaryArgumentMember '.?' + ownedRelationship += BodyArgumentMember ++ +
FunctionOperationExpression : InvocationExpression = + ownedRelationship += PrimaryArgumentMember '->' + ownedRelationship += InvocationTypeMember + ( ownedRelationship += BodyArgumentMember + | ownedRelationship += FunctionReferenceArgumentMember + | ArgumentList ) + ownedRelationship += EmptyResultMember ++ +
BodyArgumentMember : ParameterMembership = + ownedMemberParameter = BodyArgument ++ +
BodyArgument : Feature = + ownedRelationship += BodyArgumentValue ++ +
BodyArgumentValue : FeatureValue = + value = BodyExpression ++ +
FunctionReferenceArgumentMember : ParameterMembership = + ownedMemberParameter = FunctionReferenceArgument ++ +
FunctionReferenceArgument : Feature = + ownedRelationship += FunctionReferenceArgumentValue ++ +
FunctionReferenceArgumentValue : FeatureValue = + value = FunctionReferenceExpression ++ +
FunctionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FunctionReferenceMember ++ +
FunctionReferenceMember : FeatureMembership = + ownedMemberFeature = FunctionReference ++ +
FunctionReference : Expression = + ownedRelationship += ReferenceTyping ++ +
FeatureChainMember : Membership = + FeatureReferenceMember + | OwnedFeatureChainMember ++ +
OwnedFeatureChainMember : OwningMembership = + ownedMemberElement = FeatureChain ++
// Notes:
+InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.BaseExpression : Expression = + NullExpression + | LiteralExpression + | FeatureReferenceExpression + | MetadataAccessExpression + | InvocationExpression + | ConstructorExpression + | BodyExpression ++ +
NullExpression : NullExpression =
+ 'null' | '(' ')'
+
+
+FeatureReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureReferenceMember + ownedRelationship += EmptyResultMember ++ +
FeatureReferenceMember : Membership = + memberElement = FeatureReference ++ +
FeatureReference : Feature = + [QualifiedName] ++ +
MetadataAccessExpression = + ownedRelationship += ElementReferenceMember '.' 'metadata' ++ +
ElementReferenceMember : Membership = + memberElement = [QualifiedName] ++ +
InvocationExpression : InvocationExpression = + ownedRelationship += InstantiatedTypeMember + ArgumentList + ownedRelationship += EmptyResultMember ++ +
ConstructorExpression = + 'new' ownedRelationship += InstantiatedTypeMember + ownedRelationship += ConstructorResultMember ++ +
ConstructorResultMember : ReturnParameterMembership = + ownedRelatedElement += ConstructorResult ++ +
ConstructorResult : Feature = + ArgumentList ++ +
InstantiatedTypeMember : Membership = + memberElement = InstantiatedTypeReference + | OwnedFeatureChainMember ++ +
InstantiatedTypeReference : Type = + [QualifiedName] ++ +
ArgumentList : Feature =
+ '(' ( PositionalArgumentList | NamedArgumentList )? ')'
+
+
+PositionalArgumentList : Feature = + e.ownedRelationship += ArgumentMember + ( ',' e.ownedRelationship += ArgumentMember )* ++ +
NamedArgumentList : Feature = + ownedRelationship += NamedArgumentMember + ( ',' ownedRelationship += NamedArgumentMember )* ++ +
NamedArgumentMember : FeatureMembership = + ownedMemberFeature = NamedArgument ++ +
NamedArgument : Feature = + ownedRelationship += ParameterRedefinition '=' + ownedRelationship += ArgumentValue ++ +
ParameterRedefinition : Redefinition = + redefinedFeature = [QualifiedName] ++ +
BodyExpression : FeatureReferenceExpression = + ownedRelationship += ExpressionBodyMember ++ +
ExpressionBodyMember : FeatureMembership = + ownedMemberFeature = ExpressionBody ++ +
ExpressionBody : Expression =
+ '{' FunctionBodyPart '}'
+
+LiteralExpression = + LiteralBoolean + | LiteralString + | LiteralInteger + | LiteralReal + | LiteralInfinity ++ +
LiteralBoolean = + value = BooleanValue ++ +
BooleanValue : Boolean = + 'true' | 'false' ++ +
LiteralString = + value = STRING_VALUE ++ +
LiteralInteger = + value = DECIMAL_VALUE ++ +
LiteralReal = + value = RealValue ++ +
RealValue : Real = + DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) + | EXPONENTIAL_VALUE ++ +
LiteralInfinity = + '*' ++
Interaction = + TypePrefix 'interaction' + ClassifierDeclaration TypeBody ++
Flow = + FeaturePrefix 'flow' + FlowDeclaration TypeBody ++ +
SuccessionFlow = + FeaturePrefix 'succession' 'flow' + FlowDeclaration TypeBody ++ +
FlowDeclaration : Flow = + FeatureDeclaration ValuePart? + ( 'of' ownedRelationship += PayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ( isSufficient ?= 'all' )? + ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember ++ +
PayloadFeatureMember : FeatureMembership = + ownedRelatedElement = PayloadFeature ++ +
PayloadFeature = + Identification PayloadFeatureSpecializationPart ValuePart? + | Identification ValuePart + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ( ownedRelationship += OwnedFeatureTyping )? ++ +
PayloadFeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ ++ +
FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd ++ +
FlowEnd = + ( ownedRelationship += OwnedReferenceSubsetting '.' )? + ownedRelationship += FlowFeatureMember ++ +
FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature ++ +
FlowFeature : Feature = + ownedRelationship += FlowFeatureRedefinition ++
// (See Note 1) +
+ +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] ++
// Notes:
+FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)ValuePart : Feature = + ownedRelationship += FeatureValue ++ +
FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression ++
Multiplicity = + MultiplicitySubset | MultiplicityRange ++ +
MultiplicitySubset : Multiplicity = + 'multiplicity' Identification Subsets + TypeBody ++ +
MultiplicityRange = + 'multiplicity' Identification MultiplicityBounds + TypeBody ++ +
OwnedMultiplicity : OwningMembership = + ownedRelatedElement += OwnedMultiplicityRange ++ +
OwnedMultiplicityRange : MultiplicityRange = + MultiplicityBounds ++ +
MultiplicityBounds : MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' ++ +
MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) ++
Metaclass = + TypePrefix 'metaclass' + ClassifierDeclaration TypeBody ++ +
PrefixMetadataAnnotation : Annotation = + '#' ownedRelatedElement += PrefixMetadataFeature ++ +
PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement += PrefixMetadataFeature ++ +
PrefixMetadataFeature : MetadataFeature = + ownedRelationship += OwnedFeatureTyping ++ +
MetadataFeature = + ( ownedRelationship += PrefixMetadataMember )* + ( '@' | 'metadata' ) + MetadataFeatureDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody ++ +
MetadataFeatureDeclaration : MetadataFeature = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping ++ +
MetadataBody : Feature =
+ ';' | '{' ( ownedRelationship += MetadataBodyElement )* '}'
+
+
+MetadataBodyElement : Membership = + NonFeatureMember + | MetadataBodyFeatureMember + | AliasMember + | Import ++ +
MetadataBodyFeatureMember : FeatureMembership = + ownedMemberFeature = MetadataBodyFeature ++ +
MetadataBodyFeature : Feature = + 'feature'? ( ':>>' | 'redefines')? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody ++
Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
PackageDeclaration : Package = + 'package' Identification ++ +
PackageBody : Package =
+ ';'
+ | '{' ( NamespaceBodyElement
+ | ownedRelationship += ElementFilterMember
+ )*
+ '}'
+
+
+ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' condition = OwnedExpression ';' ++
// End of BNF
+
+
single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.ESCAPE_SEQUENCE is specified in 8.2.2.3.PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).MetadataFeature is defined in the Kernel layer (see 8.2.5.12).REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:/* and final */ characters./*, up to and including the first line terminator (if any).*\", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up \"rich text\" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::\" punctuation, optionally with the global scope qualifier \"$\" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.ESCAPE_SEQUENCE is specified in 8.2.2.3.PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).MetadataFeature is defined in the Kernel layer (see 8.2.5.12).REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:
+// /* and final */ characters./*, up to and including the first line terminator (if any).*", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)// Source document: tests/KerML_and_SysML_spec_sources/KerML-spec.html
+// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z
+
LINE_TERMINATOR = + implementation defined character sequence ++ +
LINE_TEXT = + character sequence excluding LINE_TERMINATORs ++ +
WHITE_SPACE = + space | tab | form_feed | LINE_TERMINATOR ++
// Notes:
+SINGLE_LINE_NOTE = + '//' LINE_TEXT ++ +
MULTILINE_NOTE = + '//*' COMMENT_TEXT '*/' ++ +
REGULAR_COMMENT = + '/*' COMMENT_TEXT '*/' ++ +
COMMENT_TEXT = + ( COMMENT_LINE_TEXT | LINE_TERMINATOR )* ++ +
COMMENT_LINE_TEXT = + LINE_TEXT excluding the sequence '*/' ++
NAME = + BASIC_NAME | UNRESTRICTED_NAME ++ +
BASIC_NAME = + BASIC_INITIAL_CHARACTER BASIC_NAME_CHARACTER* ++ +
UNRESTRICTED_NAME = + single_quote ( NAME_CHARACTER | ESCAPE_SEQUENCE )* single_quote ++
// (See Note 1)
+ +BASIC_INITIAL_CHARACTER = + ALPHABETIC_CHARACTER | '_' ++ +
BASIC_NAME_CHARACTER = + BASIC_INITIAL_CHARACTER | DECIMAL_DIGIT ++ +
ALPHABETIC_CHARACTER = + any character 'a' through 'z' or 'A' through 'Z' ++ +
DECIMAL_DIGIT = + any character '0' through '9' ++ +
NAME_CHARACTER = + any printable character other than backslash or single_quote ++ +
ESCAPE_SEQUENCE = ++
// (See Note 2)
+// Notes:
+single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name.ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name.DECIMAL_VALUE = + DECIMAL_DIGIT+ ++ +
EXPONENTIAL_VALUE =
+ DECIMAL_VALUE ('e' | 'E') ('+' | '-')? DECIMAL_VALUE
+
+// Notes:
+DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax.EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals.STRING_VALUE = + '"' ( STRING_CHARACTER | ESCAPE_SEQUENCE )* '"' ++ +
STRING_CHARACTER = + any printable character other than backslash or '"' ++
// Notes:
+ESCAPE_SEQUENCE is specified in 8.2.2.3.RESERVED_KEYWORD = + 'about' | 'abstract' | 'alias' | 'all' | 'and' | 'as' | 'assoc' | 'behavior' | 'binding' | 'bool' | 'by' | 'chains' + | 'class' | 'classifier' | 'comment' | 'composite' | 'conjugate' | 'conjugates' | 'conjugation' | 'connector' + | 'const' | 'crosses' | 'datatype' | 'default' | 'dependency' | 'derived' | 'differences' | 'disjoining' | 'disjoint' + | 'doc' | 'else' | 'end' | 'expr' | 'false' | 'feature' | 'featured' | 'featuring' | 'filter' | 'first' | 'flow' + | 'for' | 'from' | 'function' | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'inout' | 'interaction' + | 'intersects' | 'inv' | 'inverse' | 'inverting' | 'istype' | 'language' | 'library' | 'locale' | 'member' | 'meta' + | 'metaclass' | 'metadata' | 'multiplicity' | 'namespace' | 'nonunique' | 'not' | 'null' | 'of' | 'or' | 'ordered' + | 'out' | 'package' | 'portion' | 'predicate' | 'private' | 'protected' | 'public' | 'redefines' | 'redefinition' + | 'references' | 'rep' | 'return' | 'specialization' | 'specializes' | 'standard' | 'step' | 'struct' + | 'subclassifier' | 'subset' | 'subsets' | 'subtype' | 'succession' | 'then' | 'to' | 'true' | 'type' | 'typed' + | 'typing' | 'unions' | 'var' | 'xor' ++
RESERVED_SYMBOL =
+ '~' | '}' | '|' | '{' | '^' | ']' | '[' | '@' | '??' | '?' | '>=' | '>' | '=>' | '===' | '==' | '=' | '<=' | '<'
+ | ';' | ':>>' | ':>' | ':=' | '::>' | '::' | ':' | '/' | '.?' | '..' | '.' | '->' | '-' | ',' | '+' | '**' | '*' | ')'
+ | '(' | '&' | '%' | '$' | '#' | '!==' | '!='
+
+
+TYPED_BY = ':' | 'typed' 'by' ++ +
SPECIALIZES = ':>' | 'specializes' ++ +
SUBSETS = ':>' | 'subsets' ++ +
REFERENCES = '::>' | 'references' ++ +
CROSSES = '=>' | 'crosses' ++ +
REDEFINES = ':>>' | 'redefines' ++ +
CONJUGATES = '~' | 'conjugates' ++
Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? ++ +
RelationshipBody : Relationship =
+ ';' | '{' RelationshipOwnedElement* '}'
+
+
+RelationshipOwnedElement : Relationship = + ownedRelatedElement += OwnedRelatedElement + | ownedRelationship += OwnedAnnotation ++ +
OwnedRelatedElement : Element = + NonFeatureElement | FeatureElement ++
Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' ( Identification? 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + RelationshipBody ++
// Notes:
+PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12).Annotation = + annotatedElement = [QualifiedName] ++ +
OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature ++
// Notes:
+MetadataFeature is defined in the Kernel layer (see 8.2.5.12).Comment = + ( 'comment' Identification + ( 'about' ownedRelationsip += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++ +
Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++
// Notes:
+REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation:
+/* and final */ characters./*, up to and including the first line terminator (if any).*", remove it.Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above.TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE + body = REGULAR_COMMENT ++
// Notes:
+REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation.language names recognized for a TextualRepresentation.RootNamespace : Namespace = + NamespaceBodyElement* ++
// (See Note 1)
+ +Namespace = + ( ownedRelationship += PrefixMetadataMember )* + NamespaceDeclaration NamespaceBody ++
// (See Note 2)
+ +NamespaceDeclaration : Namespace = + 'namespace' Identification ++ +
NamespaceBody : Namespace =
+ ';' | '{' NamespaceBodyElement* '}'
+
+
+NamespaceBodyElement : Namespace = + ownedRelationship += NamespaceMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? ++ +
VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' ++ +
NamespaceMember : OwningMembership = + NonFeatureMember + | NamespaceFeatureMember ++ +
NonFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += MemberElement ++ +
NamespaceFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += FeatureElement ++ +
AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody ++ +
QualifiedName = + ( '$' '::' )? ( NAME '::' )* NAME ++
// (See Note 3)
+// Notes:
+Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production.PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12).::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1).Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration RelationshipBody ++ +
ImportDeclaration : Import + MembershipImport | NamespaceImport ++ +
MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? ++
// (See Note 1)
+ +NamespaceImport =
+ importedNamespace = [QualifiedName] '::' '*'
+ ( '::' isRecursive ?= '**' )?
+ | importedNamespace = FilterPackage
+ { ownedRelatedElement += importedNamespace }
+
+
+FilterPackage : Package = + ownedRelationship += ImportDeclaration + ( ownedRelationship += FilterPackageMember )+ ++ +
FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' ++
// Notes:
+importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5).MemberElement : Element = + AnnotatingElement | NonFeatureElement ++ +
NonFeatureElement : Element = + Dependency + | Namespace + | Type + | Classifier + | DataType + | Class + | Structure + | Metaclass + | Association + | AssociationStructure + | Interaction + | Behavior + | Function + | Predicate + | Multiplicity + | Package + | LibraryPackage + | Specialization + | Conjugation + | Subclassification + | Disjoining + | FeatureInverting + | FeatureTyping + | Subsetting + | Redefinition + | TypeFeaturing ++ +
FeatureElement : Feature = + Feature + | Step + | Expression + | BooleanExpression + | Invariant + | Connector + | BindingConnector + | Succession + | Flow + | SuccessionFlow ++
Type = + TypePrefix 'type' + TypeDeclaration TypeBody ++ +
TypePrefix : Type = + ( isAbstract ?= 'abstract' )? + ( ownedRelationship += PrefixMetadataMember )* ++ +
TypeDeclaration : Type = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SpecializationPart | ConjugationPart )+ + TypeRelationshipPart* ++ +
SpecializationPart : Type = + SPECIALIZES ownedRelationship += OwnedSpecialization + ( ',' ownedRelationship += OwnedSpecialization )* ++ +
ConjugationPart : Type = + CONJUGATES ownedRelationship += OwnedConjugation ++ +
TypeRelationshipPart : Type = + DisjoiningPart + | UnioningPart + | IntersectingPart + | DifferencingPart ++ +
DisjoiningPart : Type = + 'disjoint' 'from' ownedRelationship += OwnedDisjoining + ( ',' ownedRelationship += OwnedDisjoining )* ++ +
UnioningPart : Type = + 'unions' ownedRelationship += Unioning + ( ',' ownedRelationship += Unioning )* ++ +
IntersectingPart : Type = + 'intersects' ownedRelationship += Intersecting + ( ',' ownedRelationship += Intersecting )* ++ +
DifferencingPart : Type = + 'differences' ownedRelationship += Differencing + ( ',' ownedRelationship += Differencing )* ++ +
TypeBody : Type =
+ ';' | '{' TypeBodyElement* '}'
+
+
+TypeBodyElement : Type = + ownedRelationship += NonFeatureMember + | ownedRelationship += FeatureMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++
Specialization = + ( 'specialization' Identification )? + 'subtype' SpecificType + SPECIALIZES GeneralType + RelationshipBody ++ +
OwnedSpecialization : Specialization = + GeneralType ++ +
SpecificType : Specialization :
+ specific = [QualifiedName]
+ | specific += OwnedFeatureChain
+ { ownedRelatedElement += specific }
+
+
+GeneralType : Specialization =
+ general = [QualifiedName]
+ | general += OwnedFeatureChain
+ { ownedRelatedElement += general }
+
+Conjugation =
+ ( 'conjugation' Identification )?
+ 'conjugate'
+ ( conjugatedType = [QualifiedName]
+ | conjugatedType = FeatureChain
+ { ownedRelatedElement += conjugatedType }
+ )
+ CONJUGATES
+ ( originalType = [QualifiedName]
+ | originalType = FeatureChain
+ { ownedRelatedElement += originalType }
+ )
+ RelationshipBody
+
+
+OwnedConjugation : Conjugation =
+ originalType = [QualifiedName]
+ | originalType = FeatureChain
+ { ownedRelatedElement += originalType }
+
+Disjoining =
+ ( 'disjoining' Identification )?
+ 'disjoint'
+ ( typeDisjoined = [QualifiedName]
+ | typeDisjoined = FeatureChain
+ { ownedRelatedElement += typeDisjoined }
+ )
+ 'from'
+ ( disjoiningType = [QualifiedName]
+ | disjoiningType = FeatureChain
+ { ownedRelatedElement += disjoiningType }
+ )
+ RelationshipBody
+
+
+OwnedDisjoining : Disjoining =
+ disjoiningType = [QualifiedName]
+ | disjoiningType = FeatureChain
+ { ownedRelatedElement += disjoiningType }
+
+Unioning = + unioningType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++ +
Intersecting = + intersectingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++ +
Differencing = + differencingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain ++
FeatureMember : OwningMembership = + TypeFeatureMember + | OwnedFeatureMember ++ +
TypeFeatureMember : OwningMembership = + MemberPrefix 'member' ownedRelatedElement += FeatureElement ++ +
OwnedFeatureMember : FeatureMembership = + MemberPrefix ownedRelatedElement += FeatureElement ++
Classifier = + TypePrefix 'classifier' + ClassifierDeclaration TypeBody ++ +
ClassifierDeclaration : Classifier = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SuperclassingPart | ConjugationPart )? + TypeRelationshipPart* ++ +
SuperclassingPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* ++
Subclassification = + ( 'specialization' Identification )? + 'subclassifier' subclassifier = [QualifiedName] + SPECIALIZES superclassifier = [QualifiedName] + RelationshipBody ++ +
OwnedSubclassification : Subclassification = + superclassifier = [QualifiedName] ++
Feature = + ( FeaturePrefix + ( 'feature' | ownedRelationship += PrefixMetadataMember ) + FeatureDeclaration? + ) + | ( EndFeaturePrefix | BasicFeaturePrefix ) + FeatureDeclaration + ) + ValuePart? TypeBody ++
// (See Note 1)
+ +EndFeaturePrefix : Feature =
+ ( isConstant ?= 'const' { isVariable = true } )?
+ isEnd ?= 'end'
+
+
+BasicFeaturePrefix : Feature :
+ ( direction = FeatureDirection )?
+ ( isDerived ?= 'derived' )?
+ ( isAbstract ?= 'abstract' )?
+ ( isComposite ?= 'composite' | isPortion ?= 'portion' )?
+ ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )?
+
+
+FeaturePrefix : + ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )? + | BasicFeaturePrefix + ) + ( ownedRelationship += PrefixMetadataMember )* ++
// (See Note 1)
+ +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature ++ +
OwnedCrossFeature : Feature = + BasicFeaturePrefix FeatureDeclaration ++ +
FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' ++ +
FeatureDeclaration : Feature = + ( isSufficient ?= 'all' )? + ( FeatureIdentification + ( FeatureSpecializationPart | ConjugationPart )? + | FeatureSpecializationPart + | ConjugationPart + ) + FeatureRelationshipPart* ++ +
FeatureIdentification : Feature = + '<' declaredShortName = NAME '>' ( declaredName = NAME )? + | declaredName = NAME ++ +
FeatureRelationshipPart : Feature = + TypeRelationshipPart + | ChainingPart + | InvertingPart + | TypeFeaturingPart ++ +
ChainingPart : Feature = + 'chains' + ( ownedRelationship += OwnedFeatureChaining + | FeatureChain ) ++ +
InvertingPart : Feature = + 'inverse' 'of' ownedRelationship += OwnedFeatureInverting ++ +
TypeFeaturingPart : Feature = + 'featured' 'by' ownedRelatioship += OwnedTypeFeaturing + ( ',' ownedTypeFeaturing += OwnedTypeFeaturing )* ++ +
FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* ++ +
MultiplicityPart : Feature =
+ ownedRelationship += OwnedMultiplicity
+ | ( ownedRelationship += OwnedMultiplicity )?
+ ( isOrdered ?= 'ordered' ( {isUnique = false} 'nonunique' )?
+ | {isUnique = false} 'nonunique' ( isOrdered ?= 'ordered' )? )
+
+
+FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions ++ +
Typings : Feature = + TypedBy ( ',' ownedRelationship += OwnedFeatureTyping )* ++ +
TypedBy : Feature = + TYPED_BY ownedRelationship += OwnedFeatureTyping ++ +
Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* ++ +
Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting ++ +
References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting ++ +
Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting ++ +
Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* ++ +
Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition ++
// Notes:
+PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12).FeatureTyping = + ( 'specialization' Identification )? + 'typing' typedFeature = [QualifiedName] + TYPED_BY GeneralType + RelationshipBody ++ +
OwnedFeatureTyping : FeatureTyping = + GeneralType ++
Subsetting = + ( 'specialization' Identification )? + 'subset' SpecificType + SUBSETS GeneralType + RelationshipBody ++ +
OwnedSubsetting : Subsetting = + GeneralType ++ +
OwnedReferenceSubsetting : ReferenceSubsetting = + GeneralType ++ +
OwnedCrossSubsetting : CrossSubsetting = + GeneralType ++
Redefinition = + ( 'specialization' Identification )? + 'redefinition' SpecificType + REDEFINES GeneralType + RelationshipBody ++ +
OwnedRedefinition : Redefinition = + GeneralType ++
OwnedFeatureChain : Feature = + FeatureChain ++ +
FeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ ++ +
OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] ++
FeatureInverting =
+ ( 'inverting' Identification? )?
+ 'inverse'
+ ( featureInverted = [QualifiedName]
+ | featureInverted = OwnedFeatureChain
+ { ownedRelatedElement += featureInverted }
+ )
+ 'of'
+ ( invertingFeature = [QualifiedName]
+ | ownedRelatedElement += OwnedFeatureChain
+ { ownedRelatedElement += invertingFeature }
+ )
+ RelationshipBody
+
+
+OwnedFeatureInverting : FeatureInverting =
+ invertingFeature = [QualifiedName]
+ | invertingFeature = OwnedFeatureChain
+ { ownedRelatedElement += invertingFeature }
+
+TypeFeaturing = + 'featuring' ( Identification 'of' )? + featureOfType = [QualifiedName] + 'by' featuringType = [QualifiedName] + RelationshipBody ++ +
OwnedTypeFeaturing : TypeFeaturing = + featuringType = [QualifiedName] ++
DataType = + TypePrefix 'datatype' + ClassifierDeclaration TypeBody ++
Class = + TypePrefix 'class' + ClassifierDeclaration TypeBody ++
Structure = + TypePrefix 'struct' + ClassifierDeclaration TypeBody ++
Association = + TypePrefix 'assoc' + ClassifierDeclaration TypeBody ++ +
AssociationStructure = + TypePrefix 'assoc' 'struct' + ClassifierDeclaration TypeBody ++
Connector = + FeaturePrefix 'connector' + ( FeatureDeclaration? ValuePart? + | ConnectorDeclaration + ) + TypeBody ++ +
ConnectorDeclaration : Connector = + BinaryConnectorDeclaration | NaryConnectorDeclaration ++ +
BinaryConnectorDeclaration : Connector = + ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember ++ +
NaryConnectorDeclaration : Connector =
+ FeatureDeclaration?
+ '(' ownedRelationship += ConnectorEndMember ','
+ ownedRelationship += ConnectorEndMember
+ ( ',' ownedRelationship += ConnectorEndMember )*
+ ')'
+
+
+ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd ++ +
ConnectorEnd : Feature = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity ++ +
OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity ++
BindingConnector = + FeaturePrefix 'binding' + BindingConnectorDeclaration TypeBody ++ +
BindingConnectorDeclaration : BindingConnector = + FeatureDeclaration + ( 'of' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + | ( isSufficient ?= 'all' )? + ( 'of'? ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? ++
Succession = + FeaturePrefix 'succession' + SuccessionDeclaration TypeBody ++ +
SuccessionDeclaration : Succession = + FeatureDeclaration + ( 'first' ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + | ( s.isSufficient ?= 'all' )? + ( 'first'? ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? ++
Behavior = + TypePrefix 'behavior' + ClassifierDeclaration TypeBody ++
Step = + FeaturePrefix + 'step' FeatureDeclaration ValuePart? + TypeBody ++
Function = + TypePrefix 'function' + ClassifierDeclaration FunctionBody ++ +
FunctionBody : Type =
+ ';' | '{' FunctionBodyPart '}'
+
+
+FunctionBodyPart : Type = + ( TypeBodyElement + | ownedRelationship += ReturnFeatureMember + )* + ( ownedRelationship += ResultExpressionMember )? ++ +
ReturnFeatureMember : ReturnParameterMembership = + MemberPrefix 'return' + ownedRelatedElement += FeatureElement ++ +
ResultExpressionMember : ResultExpressionMembership = + MemberPrefix + ownedRelatedElement += OwnedExpression ++
Expression = + FeaturePrefix + 'expr' FeatureDeclaration ValuePart? + FunctionBody ++
Predicate = + TypePrefix 'predicate' + ClassifierDeclaration FunctionBody ++
BooleanExpression = + FeaturePrefix + 'bool' FeatureDeclaration ValuePart? + FunctionBody ++ +
Invariant = + FeaturePrefix + 'inv' ( 'true' | isNegated ?= 'false' )? + FeatureDeclaration ValuePart? + FunctionBody ++
OwnedExpressionReferenceMember : FeatureMembership = + ownedRelationship += OwnedExpressionReference ++ +
OwnedExpressionReference : FeatureReferenceExpression = + ownedRelationship += OwnedExpressionMember ++ +
OwnedExpressionMember : FeatureMembership = + ownedFeatureMember = OwnedExpression ++ +
OwnedExpression : Expression = + ConditionalExpression + | ConditionalBinaryOperatorExpression + | BinaryOperatorExpression + | UnaryOperatorExpression + | ClassificationExpression + | MetaclassificationExpression + | ExtentExpression + | PrimaryExpression ++ +
ConditionalExpression : OperatorExpression = + operator = 'if' + ownedRelationship += ArgumentMember '?' + ownedRelationship += ArgumentExpressionMember 'else' + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember ++ +
ConditionalBinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = ConditionalBinaryOperator + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember ++ +
ConditionalBinaryOperator = + '??' | 'or' | 'and' | 'implies' ++ +
BinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = BinaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember ++ +
BinaryOperator = + '|' | '&' | 'xor' | '..' + | '==' | '!=' | '===' | '!==' + | '<' | '>' | '<=' | '>=' + | '+' | '-' | '*' | '/' + | '%' | '^' | '**' ++ +
UnaryOperatorExpression : OperatorExpression = + operator = UnaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember ++ +
UnaryOperator = + '+' | '-' | '~' | 'not' ++ +
ClassificationExpression : OperatorExpression = + ( ownedRelationship += ArgumentMember )? + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = CastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember ++ +
ClassificationTestOperator = + 'istype' | 'hastype' | '@' ++ +
CastOperator = + 'as' ++ +
MetaclassificationExpression : OperatorExpression = + ownedRelationship += MetadataArgumentMember + ( operator = MetaClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = MetaCastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember ++ +
ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument ++ +
Argument : Feature = + ownedRelationship += ArgumentValue ++ +
ArgumentValue : FeatureValue = + value = OwnedExpression ++ +
ArgumentExpressionMember : FeatureMembership = + ownedRelatedElement += ArgumentExpression ++ +
ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue ++ +
ArgumentExpressionValue : FeatureValue = + value = OwnedExpressionReference ++ +
MetadataArgumentMember : ParameterMembership = + ownedRelatedElement += MetadataArgument ++ +
MetadataArgument : Feature = + ownedRelationship += MetadataValue ++ +
MetadataValue : FeatureValue = + value = MetadataReference ++ +
MetadataReference : MetadataAccessExpression = + ownedRelationship += ElementReferenceMember ++ +
MetaclassificationTestOperator = + '@@' ++ +
MetaCastOperator = + 'meta' ++ +
ExtentExpression : OperatorExpression = + operator = 'all' + ownedRelationship += TypeReferenceMember ++ +
TypeReferenceMember : ParameterMembership = + ownedMemberFeature = TypeReference ++ +
TypeResultMember : ResultParameterMembership = + ownedMemberFeature = TypeReference ++ +
TypeReference : Feature = + ownedRelationship += ReferenceTyping ++ +
ReferenceTyping : FeatureTyping = + type = [QualifiedName] ++ +
EmptyResultMember : ReturnParameterMembership = + ownedRelatedElement += EmptyFeature ++ +
EmptyFeature : Feature =
+ { }
+
+// Notes:
+OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details).OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right).operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.PrimaryExpression : Expression = + FeatureChainExpression + | NonFeatureChainPrimaryExpression ++ +
PrimaryArgumentValue : FeatureValue = + value = PrimaryExpression ++ +
PrimaryArgument : Feature = + ownedRelationship += PrimaryArgumentValue ++ +
PrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument ++ +
NonFeatureChainPrimaryExpression : Expression = + BracketExpression + | IndexExpression + | SequenceExpression + | SelectExpression + | CollectExpression + | FunctionOperationExpression + | BaseExpression ++ +
NonFeatureChainPrimaryArgumentValue : FeatureValue = + value = NonFeatureChainPrimaryExpression ++ +
NonFeatureChainPrimaryArgument : Feature = + ownedRelationship += NonFeatureChainPrimaryArgumentValue ++ +
NonFeatureChainPrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument ++ +
BracketExpression : OperatorExpression = + ownedRelationship += PrimaryArgumentMember + operator = '[' + ownedRelationship += SequenceExpressionListMember ']' ++ +
IndexExpression =
+ ownedRelationship += PrimaryArgumentMember '#'
+ '(' ownedRelationship += SequenceExpressionListMember ')'
+
+
+SequenceExpression : Expression =
+ '(' SequenceExpressionList ')'
+
+
+SequenceExpressionList : Expression = + OwnedExpression ','? | SequenceOperatorExpression ++ +
SequenceOperatorExpression : OperatorExpression = + ownedRelationship += OwnedExpressionMember + operator = ',' + ownedRelationship += SequenceExpressionListMember ++ +
SequenceExpressionListMember : FeatureMembership = + ownedMemberFeature = SequenceExpressionList ++ +
FeatureChainExpression = + ownedRelationship += NonFeatureChainPrimaryArgumentMember '.' + ownedRelationship += FeatureChainMember ++ +
CollectExpression = + ownedRelationship += PrimaryArgumentMember '.' + ownedRelationship += BodyArgumentMember ++ +
SelectExpression = + ownedRelationship += PrimaryArgumentMember '.?' + ownedRelationship += BodyArgumentMember ++ +
FunctionOperationExpression : InvocationExpression = + ownedRelationship += PrimaryArgumentMember '->' + ownedRelationship += InvocationTypeMember + ( ownedRelationship += BodyArgumentMember + | ownedRelationship += FunctionReferenceArgumentMember + | ArgumentList ) + ownedRelationship += EmptyResultMember ++ +
BodyArgumentMember : ParameterMembership = + ownedMemberParameter = BodyArgument ++ +
BodyArgument : Feature = + ownedRelationship += BodyArgumentValue ++ +
BodyArgumentValue : FeatureValue = + value = BodyExpression ++ +
FunctionReferenceArgumentMember : ParameterMembership = + ownedMemberParameter = FunctionReferenceArgument ++ +
FunctionReferenceArgument : Feature = + ownedRelationship += FunctionReferenceArgumentValue ++ +
FunctionReferenceArgumentValue : FeatureValue = + value = FunctionReferenceExpression ++ +
FunctionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FunctionReferenceMember ++ +
FunctionReferenceMember : FeatureMembership = + ownedMemberFeature = FunctionReference ++ +
FunctionReference : Expression = + ownedRelationship += ReferenceTyping ++ +
FeatureChainMember : Membership = + FeatureReferenceMember + | OwnedFeatureChainMember ++ +
OwnedFeatureChainMember : OwningMembership = + ownedMemberElement = FeatureChain ++
// Notes:
+InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18).[...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used.BaseExpression : Expression = + NullExpression + | LiteralExpression + | FeatureReferenceExpression + | MetadataAccessExpression + | InvocationExpression + | ConstructorExpression + | BodyExpression ++ +
NullExpression : NullExpression =
+ 'null' | '(' ')'
+
+
+FeatureReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureReferenceMember + ownedRelationship += EmptyResultMember ++ +
FeatureReferenceMember : Membership = + memberElement = FeatureReference ++ +
FeatureReference : Feature = + [QualifiedName] ++ +
MetadataAccessExpression = + ownedRelationship += ElementReferenceMember '.' 'metadata' ++ +
ElementReferenceMember : Membership = + memberElement = [QualifiedName] ++ +
InvocationExpression : InvocationExpression = + ownedRelationship += InstatiatedTypeMember + ArgumentList + ownedRelationship += EmptyResultMember ++ +
ConstructorExpression = + 'new' ownedRelationship += InstantiatedTypeMember + ownedRelationship += ConstructorResultMember ++ +
ConstructorResultMember : ReturnParameterMembership = + ownedRelatedElement += ConstructorResult ++ +
ConstructorResult : Feature = + ArgumentList ++ +
InstantiatedTypeMember : Membership = + memberElement = InstantiatedTypeReference + | OwnedFeatureChainMember ++ +
InstantiatedTypeReference : Type = + [QualifiedName] ++ +
ArgumentList : Feature =
+ '(' ( PositionalArgumentList | NamedArgumentList )? ')'
+
+
+PositionalArgumentList : Feature = + e.ownedRelationship += ArgumentMember + ( ',' e.ownedRelationship += ArgumentMember )* ++ +
NamedArgumentList : Feature = + ownedRelationship += NamedArgumentMember + ( ',' ownedRelationship += NamedArgumentMember )* ++ +
NamedArgumentMember : FeatureMembership = + ownedMemberFeature = NamedArgument ++ +
NamedArgument : Feature = + ownedRelationship += ParameterRedefinition '=' + ownedRelationship += ArgumentValue ++ +
ParameterRedefinition : Redefinition = + redefinedFeature = [QualifiedName] ++ +
BodyExpression : FeatureReferenceExpression = + ownedRelationship += ExpressionBodyMember ++ +
ExpressionBodyMember : FeatureMembership = + ownedMemberFeature = ExpressionBody ++ +
ExpressionBody : Expression =
+ '{' FunctionBodyPart '}'
+
+LiteralExpression = + LiteralBoolean + | LiteralString + | LiteralInteger + | LiteralReal + | LiteralInfinity ++ +
LiteralBoolean = + value = BooleanValue ++ +
BooleanValue : Boolean = + 'true' | 'false' ++ +
LiteralString = + value = STRING_VALUE ++ +
LiteralInteger = + value = DECIMAL_VALUE ++ +
LiteralReal = + value = RealValue ++ +
RealValue : Real = + DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) + | EXPONENTIAL_VALUE ++ +
LiteralInfinity = + '*' ++
Interaction = + TypePrefix 'interaction' + ClassifierDeclaration TypeBody ++
Flow = + FeaturePrefix 'flow' + ItemFlowDeclaration TypeBody ++ +
SuccessionFlow = + FeaturePrefix 'succession' 'flow' + ItemFlowDeclaration TypeBody ++ +
FlowDeclaration : Flow = + FeatureDeclaration ValuePart? + ( 'of' ownedRelationship += PayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ( isSufficient ?= 'all' )? + ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember ++ +
PayloadFeatureMember : FeatureMembership = + ownedRelatedElement = PayloadFeature ++ +
PayloadFeature = + Identification PayloadFeatureSpecializationPart ValuePart? + | Identification ValuePart + | ( ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ( ownedRelationship += OwnedFeatureTyping )? ++ +
PayloadFeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ ++ +
FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd ++ +
FlowEnd = + ( ownedRelationship += OwnedReferenceSubsetting '.' )? + ownedRelationship += FlowFeatureMember ++ +
FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature ++ +
FlowFeature : Feature = + ownedRelationship += FlowFeatureRedefinition ++
// (See Note 1)
+ +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] ++
// Notes:
+FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)ValuePart : Feature = + ownedRelationship += FeatureValue ++ +
FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression ++
Multiplicity = + MultiplicitySubset | MultiplicityRange ++ +
MultiplicitySubset : Multiplicity = + 'multiplicity' Identification Subsets + TypeBody ++ +
MultiplicityRange = + 'multiplicity' Identification MultiplicityBounds + TypeBody ++ +
OwnedMultiplicity : OwningMembership = + ownedRelatedElement += OwnedMultiplicityRange ++ +
OwnedMultiplicityRange : MultiplicityRange = + MultiplicityBounds ++ +
MultiplicityBounds : MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' ++ +
MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) ++
Metaclass = + TypePrefix 'metaclass' + ClassifierDeclaration TypeBody ++ +
PrefixMetadataAnnotation : Annotation = + '#' ownedRelatedElement += PrefixMetadataFeature ++ +
PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement += PrefixMetadataFeature ++ +
PrefixMetadataFeature : MetadataFeature : + ownedRelationship += OwnedFeatureTyping ++ +
MetadataFeature = + ( ownedRelationship += PrefixMetadataMember )* + ( '@' | 'metadata' ) + MetadataFeatureDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody ++ +
MetadataFeatureDeclaration : MetadataFeature = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping ++ +
MetadataBody : Feature =
+ ';' | '{' ( ownedRelationship += MetadataBodyElement )* '}'
+
+
+MetadataBodyElement : Membership = + NonFeatureMember + | MetadataBodyFeatureMember + | AliasMember + | Import ++ +
MetadataBodyFeatureMember : FeatureMembership = + ownedMemberFeature = MetadataBodyFeature ++ +
MetadataBodyFeature : Feature = + 'feature'? ( ':>>' | 'redefines')? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody ++
Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
PackageDeclaration : Package = + 'package' Identification ++ +
PackageBody : Package =
+ ';'
+ | '{' ( NamespaceBodyElement
+ | ownedRelationship += ElementFilterMember
+ )*
+ '}'
+
+
+ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' condition = OwnedExpression ';' ++
// End of BNF + +
+ + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/KerML-textual-bnf.kebnf b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/KerML-textual-bnf.kebnf new file mode 100644 index 000000000..e4441e46a --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/KerML-textual-bnf.kebnf @@ -0,0 +1,1461 @@ +// Source document: tests/KerML_and_SysML_spec_sources/KerML-spec.html +// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z + + +// Part 1 - Kernel Modeling Language (KerML) + +// Clause 8.2 Concrete Syntax + +// Clause 8.2.1 Concrete Syntax Overview + +// Clause 8.2.2 Lexical Structure + +// Clause 8.2.2.1 Line Terminators and White Space + +LINE_TERMINATOR = + implementation defined character sequence + +LINE_TEXT = + character sequence excluding LINE_TERMINATORs + +WHITE_SPACE = + space | tab | form_feed | LINE_TERMINATOR + +// Notes: +// 1. Notation text is divided up into lines separated by line terminators. A line terminator may be a single character (such as a line feed) or a sequence of characters (such as a carriage return/line feed combination). This specification does not require any specific encoding for a line terminator, but any encoding used must be consistent throughout any specific input text. +// 2. Any characters in text line that are not a part of the line terminator are referred to as line text. +// 3. A white space character is a space, tab, form feed or line terminator. Any contiguous sequence of white space characters can be used to separate tokens that would otherwise be considered to be part of a single token. It is otherwise ignored, with the single exception that a line terminator is used to mark the end of a single-line note (see 8.2.2.2). + +// Clause 8.2.2.2 Notes and Comments + +SINGLE_LINE_NOTE = + '//' LINE_TEXT + +MULTILINE_NOTE = + '//*' COMMENT_TEXT '*/' + +REGULAR_COMMENT = + '/*' COMMENT_TEXT '*/' + +COMMENT_TEXT = + ( COMMENT_LINE_TEXT | LINE_TERMINATOR )* + +COMMENT_LINE_TEXT = + LINE_TEXT excluding the sequence '*/' + +// Clause 8.2.2.3 Names + +NAME = + BASIC_NAME | UNRESTRICTED_NAME + +BASIC_NAME = + BASIC_INITIAL_CHARACTER BASIC_NAME_CHARACTER* + +UNRESTRICTED_NAME = + single_quote ( NAME_CHARACTER | ESCAPE_SEQUENCE )* single_quote + +// (See Note 1) + +BASIC_INITIAL_CHARACTER = + ALPHABETIC_CHARACTER | '_' + +BASIC_NAME_CHARACTER = + BASIC_INITIAL_CHARACTER | DECIMAL_DIGIT + +ALPHABETIC_CHARACTER = + any character 'a' through 'z' or 'A' through 'Z' + +DECIMAL_DIGIT = + any character '0' through '9' + +NAME_CHARACTER = + any printable character other than backslash or single_quote + +ESCAPE_SEQUENCE = + +// (See Note 2) + +// Notes: +// 1. The single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name. +// 2. An ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name. + +// Clause 8.2.2.4 Numeric Values + +DECIMAL_VALUE = + DECIMAL_DIGIT+ + +EXPONENTIAL_VALUE = + DECIMAL_VALUE ('e' | 'E') ('+' | '-')? DECIMAL_VALUE + +// Notes: +// 1. A DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax. +// 2. An EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals. + +// Clause 8.2.2.5 String Value + +STRING_VALUE = + '"' ( STRING_CHARACTER | ESCAPE_SEQUENCE )* '"' + +STRING_CHARACTER = + any printable character other than backslash or '"' + +// Notes: +// 1. ESCAPE_SEQUENCE is specified in 8.2.2.3. + +// Clause 8.2.2.6 Reserved Words + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'alias' | 'all' | 'and' | 'as' | 'assoc' | 'behavior' | 'binding' | 'bool' | 'by' | 'chains' + | 'class' | 'classifier' | 'comment' | 'composite' | 'conjugate' | 'conjugates' | 'conjugation' | 'connector' + | 'const' | 'crosses' | 'datatype' | 'default' | 'dependency' | 'derived' | 'differences' | 'disjoining' | 'disjoint' + | 'doc' | 'else' | 'end' | 'expr' | 'false' | 'feature' | 'featured' | 'featuring' | 'filter' | 'first' | 'flow' + | 'for' | 'from' | 'function' | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'inout' | 'interaction' + | 'intersects' | 'inv' | 'inverse' | 'inverting' | 'istype' | 'language' | 'library' | 'locale' | 'member' | 'meta' + | 'metaclass' | 'metadata' | 'multiplicity' | 'namespace' | 'nonunique' | 'not' | 'null' | 'of' | 'or' | 'ordered' + | 'out' | 'package' | 'portion' | 'predicate' | 'private' | 'protected' | 'public' | 'redefines' | 'redefinition' + | 'references' | 'rep' | 'return' | 'specialization' | 'specializes' | 'standard' | 'step' | 'struct' + | 'subclassifier' | 'subset' | 'subsets' | 'subtype' | 'succession' | 'then' | 'to' | 'true' | 'type' | 'typed' + | 'typing' | 'unions' | 'var' | 'xor' + +// Clause 8.2.2.7 Symbols + +RESERVED_SYMBOL = + '~' | '}' | '|' | '{' | '^' | ']' | '[' | '@' | '??' | '?' | '>=' | '>' | '=>' | '===' | '==' | '=' | '<=' | '<' + | ';' | ':>>' | ':>' | ':=' | '::>' | '::' | ':' | '/' | '.?' | '..' | '.' | '->' | '-' | ',' | '+' | '**' | '*' | ')' + | '(' | '&' | '%' | '$' | '#' | '!==' | '!=' + +TYPED_BY = ':' | 'typed' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +CONJUGATES = '~' | 'conjugates' + +// Clause 8.2.3 Root Concrete Syntax + +// Clause 8.2.3.1 Elements and Relationships Concrete Syntax + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' RelationshipOwnedElement* '}' + +RelationshipOwnedElement : Relationship = + ownedRelatedElement += OwnedRelatedElement + | ownedRelationship += OwnedAnnotation + +OwnedRelatedElement : Element = + NonFeatureElement | FeatureElement + +// Clause 8.2.3.2 Dependencies Concrete Syntax + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' ( Identification? 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + RelationshipBody + +// Notes: +// 1. PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3 Annotations Concrete Syntax + +// Clause 8.2.3.3.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Notes: +// 1. MetadataFeature is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationsip += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Notes: +// 1. The text of a lexical REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation: +// • Remove the initial /* and final */ characters. +// • Remove any white space immediately after the initial /*, up to and including the first line terminator (if any). +// • On each subsequent line of the text: +// • Strip initial white space other than line terminators. +// • Then, if the first remaining character is "*", remove it. +// • Then, if the first remaining character is now a space, remove it. +// 2. The body text of a Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above. + +// Clause 8.2.3.3.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE + body = REGULAR_COMMENT + +// Notes: +// 1. The lexical text of a REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation. +// 2. See also 8.3.2.3.6 on the standard language names recognized for a TextualRepresentation. + +// Clause 8.2.3.4 Namespaces Concrete Syntax + +// Clause 8.2.3.4.1 Namespaces + +RootNamespace : Namespace = + NamespaceBodyElement* + +// (See Note 1) + +Namespace = + ( ownedRelationship += PrefixMetadataMember )* + NamespaceDeclaration NamespaceBody + +// (See Note 2) + +NamespaceDeclaration : Namespace = + 'namespace' Identification + +NamespaceBody : Namespace = + ';' | '{' NamespaceBodyElement* '}' + +NamespaceBodyElement : Namespace = + ownedRelationship += NamespaceMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +NamespaceMember : OwningMembership = + NonFeatureMember + | NamespaceFeatureMember + +NonFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += MemberElement + +NamespaceFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += FeatureElement + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +QualifiedName = + ( '$' '::' )? ( NAME '::' )* NAME + +// (See Note 3) + +// Notes: +// 1. A root Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production. +// 2. PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12). +// 3. A qualified name is notated as a sequence of segment names separated by "::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1). + +// Clause 8.2.3.4.2 Imports + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration RelationshipBody + +ImportDeclaration : Import + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +// (See Note 1) + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamespace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += ImportDeclaration + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +// Notes: +// 1. The importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5). + +// Clause 8.2.3.4.3 Namespace Elements + +MemberElement : Element = + AnnotatingElement | NonFeatureElement + +NonFeatureElement : Element = + Dependency + | Namespace + | Type + | Classifier + | DataType + | Class + | Structure + | Metaclass + | Association + | AssociationStructure + | Interaction + | Behavior + | Function + | Predicate + | Multiplicity + | Package + | LibraryPackage + | Specialization + | Conjugation + | Subclassification + | Disjoining + | FeatureInverting + | FeatureTyping + | Subsetting + | Redefinition + | TypeFeaturing + +FeatureElement : Feature = + Feature + | Step + | Expression + | BooleanExpression + | Invariant + | Connector + | BindingConnector + | Succession + | Flow + | SuccessionFlow + +// Clause 8.2.3.5 Name Resolution + +// Clause 8.2.3.5.1 Name Resolution Overview + +// Clause 8.2.3.5.2 Local and Global Namespaces + +// Clause 8.2.3.5.3 Local and Visible Resolution + +// Clause 8.2.3.5.4 Full Resolution + +// Clause 8.2.4 Core Concrete Syntax + +// Clause 8.2.4.1 Types Concrete Syntax + +// Clause 8.2.4.1.1 Types + +Type = + TypePrefix 'type' + TypeDeclaration TypeBody + +TypePrefix : Type = + ( isAbstract ?= 'abstract' )? + ( ownedRelationship += PrefixMetadataMember )* + +TypeDeclaration : Type = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SpecializationPart | ConjugationPart )+ + TypeRelationshipPart* + +SpecializationPart : Type = + SPECIALIZES ownedRelationship += OwnedSpecialization + ( ',' ownedRelationship += OwnedSpecialization )* + +ConjugationPart : Type = + CONJUGATES ownedRelationship += OwnedConjugation + +TypeRelationshipPart : Type = + DisjoiningPart + | UnioningPart + | IntersectingPart + | DifferencingPart + +DisjoiningPart : Type = + 'disjoint' 'from' ownedRelationship += OwnedDisjoining + ( ',' ownedRelationship += OwnedDisjoining )* + +UnioningPart : Type = + 'unions' ownedRelationship += Unioning + ( ',' ownedRelationship += Unioning )* + +IntersectingPart : Type = + 'intersects' ownedRelationship += Intersecting + ( ',' ownedRelationship += Intersecting )* + +DifferencingPart : Type = + 'differences' ownedRelationship += Differencing + ( ',' ownedRelationship += Differencing )* + +TypeBody : Type = + ';' | '{' TypeBodyElement* '}' + +TypeBodyElement : Type = + ownedRelationship += NonFeatureMember + | ownedRelationship += FeatureMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +// Clause 8.2.4.1.2 Specialization + +Specialization = + ( 'specialization' Identification )? + 'subtype' SpecificType + SPECIALIZES GeneralType + RelationshipBody + +OwnedSpecialization : Specialization = + GeneralType + +SpecificType : Specialization : + specific = [QualifiedName] + | specific += OwnedFeatureChain + { ownedRelatedElement += specific } + +GeneralType : Specialization = + general = [QualifiedName] + | general += OwnedFeatureChain + { ownedRelatedElement += general } + +// Clause 8.2.4.1.3 Conjugation + +Conjugation = + ( 'conjugation' Identification )? + 'conjugate' + ( conjugatedType = [QualifiedName] + | conjugatedType = FeatureChain + { ownedRelatedElement += conjugatedType } + ) + CONJUGATES + ( originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + ) + RelationshipBody + +OwnedConjugation : Conjugation = + originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + +// Clause 8.2.4.1.4 Disjoining + +Disjoining = + ( 'disjoining' Identification )? + 'disjoint' + ( typeDisjoined = [QualifiedName] + | typeDisjoined = FeatureChain + { ownedRelatedElement += typeDisjoined } + ) + 'from' + ( disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + ) + RelationshipBody + +OwnedDisjoining : Disjoining = + disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + +// Clause 8.2.4.1.5 Unioning, Intersecting and Differencing + +Unioning = + unioningType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Intersecting = + intersectingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Differencing = + differencingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.4.1.6 Feature Membership + +FeatureMember : OwningMembership = + TypeFeatureMember + | OwnedFeatureMember + +TypeFeatureMember : OwningMembership = + MemberPrefix 'member' ownedRelatedElement += FeatureElement + +OwnedFeatureMember : FeatureMembership = + MemberPrefix ownedRelatedElement += FeatureElement + +// Clause 8.2.4.2 Classifiers Concrete Syntax + +// Clause 8.2.4.2.1 Classifiers + +Classifier = + TypePrefix 'classifier' + ClassifierDeclaration TypeBody + +ClassifierDeclaration : Classifier = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SuperclassingPart | ConjugationPart )? + TypeRelationshipPart* + +SuperclassingPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +// Clause 8.2.4.2.2 Subclassification + +Subclassification = + ( 'specialization' Identification )? + 'subclassifier' subclassifier = [QualifiedName] + SPECIALIZES superclassifier = [QualifiedName] + RelationshipBody + +OwnedSubclassification : Subclassification = + superclassifier = [QualifiedName] + +// Clause 8.2.4.3 Features Concrete Syntax + +// Clause 8.2.4.3.1 Features + +Feature = + ( FeaturePrefix + ( 'feature' | ownedRelationship += PrefixMetadataMember ) + FeatureDeclaration? + ) + | ( EndFeaturePrefix | BasicFeaturePrefix ) + FeatureDeclaration + ) + ValuePart? TypeBody + +// (See Note 1) + +EndFeaturePrefix : Feature = + ( isConstant ?= 'const' { isVariable = true } )? + isEnd ?= 'end' + +BasicFeaturePrefix : Feature : + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' )? + ( isComposite ?= 'composite' | isPortion ?= 'portion' )? + ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )? + +FeaturePrefix : + ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )? + | BasicFeaturePrefix + ) + ( ownedRelationship += PrefixMetadataMember )* + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : Feature = + BasicFeaturePrefix FeatureDeclaration + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +FeatureDeclaration : Feature = + ( isSufficient ?= 'all' )? + ( FeatureIdentification + ( FeatureSpecializationPart | ConjugationPart )? + | FeatureSpecializationPart + | ConjugationPart + ) + FeatureRelationshipPart* + +FeatureIdentification : Feature = + '<' declaredShortName = NAME '>' ( declaredName = NAME )? + | declaredName = NAME + +FeatureRelationshipPart : Feature = + TypeRelationshipPart + | ChainingPart + | InvertingPart + | TypeFeaturingPart + +ChainingPart : Feature = + 'chains' + ( ownedRelationship += OwnedFeatureChaining + | FeatureChain ) + +InvertingPart : Feature = + 'inverse' 'of' ownedRelationship += OwnedFeatureInverting + +TypeFeaturingPart : Feature = + 'featured' 'by' ownedRelatioship += OwnedTypeFeaturing + ( ',' ownedTypeFeaturing += OwnedTypeFeaturing )* + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( {isUnique = false} 'nonunique' )? + | {isUnique = false} 'nonunique' ( isOrdered ?= 'ordered' )? ) + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += OwnedFeatureTyping )* + +TypedBy : Feature = + TYPED_BY ownedRelationship += OwnedFeatureTyping + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +// Notes: +// 1. PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12). + +// Clause 8.2.4.3.2 Feature Typing + +FeatureTyping = + ( 'specialization' Identification )? + 'typing' typedFeature = [QualifiedName] + TYPED_BY GeneralType + RelationshipBody + +OwnedFeatureTyping : FeatureTyping = + GeneralType + +// Clause 8.2.4.3.3 Subsetting + +Subsetting = + ( 'specialization' Identification )? + 'subset' SpecificType + SUBSETS GeneralType + RelationshipBody + +OwnedSubsetting : Subsetting = + GeneralType + +OwnedReferenceSubsetting : ReferenceSubsetting = + GeneralType + +OwnedCrossSubsetting : CrossSubsetting = + GeneralType + +// Clause 8.2.4.3.4 Redefinition + +Redefinition = + ( 'specialization' Identification )? + 'redefinition' SpecificType + REDEFINES GeneralType + RelationshipBody + +OwnedRedefinition : Redefinition = + GeneralType + +// Clause 8.2.4.3.5 Feature Chaining + +OwnedFeatureChain : Feature = + FeatureChain + +FeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.4.3.6 Feature Inverting + +FeatureInverting = + ( 'inverting' Identification? )? + 'inverse' + ( featureInverted = [QualifiedName] + | featureInverted = OwnedFeatureChain + { ownedRelatedElement += featureInverted } + ) + 'of' + ( invertingFeature = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + ) + RelationshipBody + +OwnedFeatureInverting : FeatureInverting = + invertingFeature = [QualifiedName] + | invertingFeature = OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + +// Clause 8.2.4.3.7 Type Featuring + +TypeFeaturing = + 'featuring' ( Identification 'of' )? + featureOfType = [QualifiedName] + 'by' featuringType = [QualifiedName] + RelationshipBody + +OwnedTypeFeaturing : TypeFeaturing = + featuringType = [QualifiedName] + +// Clause 8.2.5 Kernel Concrete Syntax + +// Clause 8.2.5.1 Data Types Concrete Syntax + +DataType = + TypePrefix 'datatype' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.2 Classes Concrete Syntax + +Class = + TypePrefix 'class' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.3 Structures Concrete Syntax + +Structure = + TypePrefix 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.4 Associations Concrete Syntax + +Association = + TypePrefix 'assoc' + ClassifierDeclaration TypeBody + +AssociationStructure = + TypePrefix 'assoc' 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.5 Connectors Concrete Syntax + +// Clause 8.2.5.5.1 Connectors + +Connector = + FeaturePrefix 'connector' + ( FeatureDeclaration? ValuePart? + | ConnectorDeclaration + ) + TypeBody + +ConnectorDeclaration : Connector = + BinaryConnectorDeclaration | NaryConnectorDeclaration + +BinaryConnectorDeclaration : Connector = + ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorDeclaration : Connector = + FeatureDeclaration? + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* + ')' + +ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : Feature = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.5.5.2 Binding Connectors + +BindingConnector = + FeaturePrefix 'binding' + BindingConnectorDeclaration TypeBody + +BindingConnectorDeclaration : BindingConnector = + FeatureDeclaration + ( 'of' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + | ( isSufficient ?= 'all' )? + ( 'of'? ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.5.3 Successions + +Succession = + FeaturePrefix 'succession' + SuccessionDeclaration TypeBody + +SuccessionDeclaration : Succession = + FeatureDeclaration + ( 'first' ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + | ( s.isSufficient ?= 'all' )? + ( 'first'? ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.6 Behaviors Concrete Syntax + +// Clause 8.2.5.6.1 Behaviors + +Behavior = + TypePrefix 'behavior' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.6.2 Steps + +Step = + FeaturePrefix + 'step' FeatureDeclaration ValuePart? + TypeBody + +// Clause 8.2.5.7 Functions Concrete Syntax + +// Clause 8.2.5.7.1 Functions + +Function = + TypePrefix 'function' + ClassifierDeclaration FunctionBody + +FunctionBody : Type = + ';' | '{' FunctionBodyPart '}' + +FunctionBodyPart : Type = + ( TypeBodyElement + | ownedRelationship += ReturnFeatureMember + )* + ( ownedRelationship += ResultExpressionMember )? + +ReturnFeatureMember : ReturnParameterMembership = + MemberPrefix 'return' + ownedRelatedElement += FeatureElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.7.2 Expressions + +Expression = + FeaturePrefix + 'expr' FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.7.3 Predicates + +Predicate = + TypePrefix 'predicate' + ClassifierDeclaration FunctionBody + +// Clause 8.2.5.7.4 Boolean Expressions and Invariants + +BooleanExpression = + FeaturePrefix + 'bool' FeatureDeclaration ValuePart? + FunctionBody + +Invariant = + FeaturePrefix + 'inv' ( 'true' | isNegated ?= 'false' )? + FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.8 Expressions Concrete Syntax + +// Clause 8.2.5.8.1 Operator Expressions + +OwnedExpressionReferenceMember : FeatureMembership = + ownedRelationship += OwnedExpressionReference + +OwnedExpressionReference : FeatureReferenceExpression = + ownedRelationship += OwnedExpressionMember + +OwnedExpressionMember : FeatureMembership = + ownedFeatureMember = OwnedExpression + +OwnedExpression : Expression = + ConditionalExpression + | ConditionalBinaryOperatorExpression + | BinaryOperatorExpression + | UnaryOperatorExpression + | ClassificationExpression + | MetaclassificationExpression + | ExtentExpression + | PrimaryExpression + +ConditionalExpression : OperatorExpression = + operator = 'if' + ownedRelationship += ArgumentMember '?' + ownedRelationship += ArgumentExpressionMember 'else' + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = ConditionalBinaryOperator + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperator = + '??' | 'or' | 'and' | 'implies' + +BinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = BinaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +BinaryOperator = + '|' | '&' | 'xor' | '..' + | '==' | '!=' | '===' | '!==' + | '<' | '>' | '<=' | '>=' + | '+' | '-' | '*' | '/' + | '%' | '^' | '**' + +UnaryOperatorExpression : OperatorExpression = + operator = UnaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +UnaryOperator = + '+' | '-' | '~' | 'not' + +ClassificationExpression : OperatorExpression = + ( ownedRelationship += ArgumentMember )? + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = CastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ClassificationTestOperator = + 'istype' | 'hastype' | '@' + +CastOperator = + 'as' + +MetaclassificationExpression : OperatorExpression = + ownedRelationship += MetadataArgumentMember + ( operator = MetaClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = MetaCastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : FeatureMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + value = OwnedExpressionReference + +MetadataArgumentMember : ParameterMembership = + ownedRelatedElement += MetadataArgument + +MetadataArgument : Feature = + ownedRelationship += MetadataValue + +MetadataValue : FeatureValue = + value = MetadataReference + +MetadataReference : MetadataAccessExpression = + ownedRelationship += ElementReferenceMember + +MetaclassificationTestOperator = + '@@' + +MetaCastOperator = + 'meta' + +ExtentExpression : OperatorExpression = + operator = 'all' + ownedRelationship += TypeReferenceMember + +TypeReferenceMember : ParameterMembership = + ownedMemberFeature = TypeReference + +TypeResultMember : ResultParameterMembership = + ownedMemberFeature = TypeReference + +TypeReference : Feature = + ownedRelationship += ReferenceTyping + +ReferenceTyping : FeatureTyping = + type = [QualifiedName] + +EmptyResultMember : ReturnParameterMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : Feature = + { } + +// Notes: +// 1. OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details). +// 2. Though not directly expressed in the syntactic productions given above, in any OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right). +// 3. The unary operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.2 Primary Expressions + +PrimaryExpression : Expression = + FeatureChainExpression + | NonFeatureChainPrimaryExpression + +PrimaryArgumentValue : FeatureValue = + value = PrimaryExpression + +PrimaryArgument : Feature = + ownedRelationship += PrimaryArgumentValue + +PrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +NonFeatureChainPrimaryExpression : Expression = + BracketExpression + | IndexExpression + | SequenceExpression + | SelectExpression + | CollectExpression + | FunctionOperationExpression + | BaseExpression + +NonFeatureChainPrimaryArgumentValue : FeatureValue = + value = NonFeatureChainPrimaryExpression + +NonFeatureChainPrimaryArgument : Feature = + ownedRelationship += NonFeatureChainPrimaryArgumentValue + +NonFeatureChainPrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +BracketExpression : OperatorExpression = + ownedRelationship += PrimaryArgumentMember + operator = '[' + ownedRelationship += SequenceExpressionListMember ']' + +IndexExpression = + ownedRelationship += PrimaryArgumentMember '#' + '(' ownedRelationship += SequenceExpressionListMember ')' + +SequenceExpression : Expression = + '(' SequenceExpressionList ')' + +SequenceExpressionList : Expression = + OwnedExpression ','? | SequenceOperatorExpression + +SequenceOperatorExpression : OperatorExpression = + ownedRelationship += OwnedExpressionMember + operator = ',' + ownedRelationship += SequenceExpressionListMember + +SequenceExpressionListMember : FeatureMembership = + ownedMemberFeature = SequenceExpressionList + +FeatureChainExpression = + ownedRelationship += NonFeatureChainPrimaryArgumentMember '.' + ownedRelationship += FeatureChainMember + +CollectExpression = + ownedRelationship += PrimaryArgumentMember '.' + ownedRelationship += BodyArgumentMember + +SelectExpression = + ownedRelationship += PrimaryArgumentMember '.?' + ownedRelationship += BodyArgumentMember + +FunctionOperationExpression : InvocationExpression = + ownedRelationship += PrimaryArgumentMember '->' + ownedRelationship += InvocationTypeMember + ( ownedRelationship += BodyArgumentMember + | ownedRelationship += FunctionReferenceArgumentMember + | ArgumentList ) + ownedRelationship += EmptyResultMember + +BodyArgumentMember : ParameterMembership = + ownedMemberParameter = BodyArgument + +BodyArgument : Feature = + ownedRelationship += BodyArgumentValue + +BodyArgumentValue : FeatureValue = + value = BodyExpression + +FunctionReferenceArgumentMember : ParameterMembership = + ownedMemberParameter = FunctionReferenceArgument + +FunctionReferenceArgument : Feature = + ownedRelationship += FunctionReferenceArgumentValue + +FunctionReferenceArgumentValue : FeatureValue = + value = FunctionReferenceExpression + +FunctionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FunctionReferenceMember + +FunctionReferenceMember : FeatureMembership = + ownedMemberFeature = FunctionReference + +FunctionReference : Expression = + ownedRelationship += ReferenceTyping + +FeatureChainMember : Membership = + FeatureReferenceMember + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedMemberElement = FeatureChain + +// Notes: +// 1. Primary expressions provide additional shorthand notations for certain kinds of InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18). +// 2. The grammar allows a bracket syntax [...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.3 Base Expressions + +BaseExpression : Expression = + NullExpression + | LiteralExpression + | FeatureReferenceExpression + | MetadataAccessExpression + | InvocationExpression + | ConstructorExpression + | BodyExpression + +NullExpression : NullExpression = + 'null' | '(' ')' + +FeatureReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureReferenceMember + ownedRelationship += EmptyResultMember + +FeatureReferenceMember : Membership = + memberElement = FeatureReference + +FeatureReference : Feature = + [QualifiedName] + +MetadataAccessExpression = + ownedRelationship += ElementReferenceMember '.' 'metadata' + +ElementReferenceMember : Membership = + memberElement = [QualifiedName] + +InvocationExpression : InvocationExpression = + ownedRelationship += InstatiatedTypeMember + ArgumentList + ownedRelationship += EmptyResultMember + +ConstructorExpression = + 'new' ownedRelationship += InstantiatedTypeMember + ownedRelationship += ConstructorResultMember + +ConstructorResultMember : ReturnParameterMembership = + ownedRelatedElement += ConstructorResult + +ConstructorResult : Feature = + ArgumentList + +InstantiatedTypeMember : Membership = + memberElement = InstantiatedTypeReference + | OwnedFeatureChainMember + +InstantiatedTypeReference : Type = + [QualifiedName] + +ArgumentList : Feature = + '(' ( PositionalArgumentList | NamedArgumentList )? ')' + +PositionalArgumentList : Feature = + e.ownedRelationship += ArgumentMember + ( ',' e.ownedRelationship += ArgumentMember )* + +NamedArgumentList : Feature = + ownedRelationship += NamedArgumentMember + ( ',' ownedRelationship += NamedArgumentMember )* + +NamedArgumentMember : FeatureMembership = + ownedMemberFeature = NamedArgument + +NamedArgument : Feature = + ownedRelationship += ParameterRedefinition '=' + ownedRelationship += ArgumentValue + +ParameterRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +BodyExpression : FeatureReferenceExpression = + ownedRelationship += ExpressionBodyMember + +ExpressionBodyMember : FeatureMembership = + ownedMemberFeature = ExpressionBody + +ExpressionBody : Expression = + '{' FunctionBodyPart '}' + +// Clause 8.2.5.8.4 Literal Expressions + +LiteralExpression = + LiteralBoolean + | LiteralString + | LiteralInteger + | LiteralReal + | LiteralInfinity + +LiteralBoolean = + value = BooleanValue + +BooleanValue : Boolean = + 'true' | 'false' + +LiteralString = + value = STRING_VALUE + +LiteralInteger = + value = DECIMAL_VALUE + +LiteralReal = + value = RealValue + +RealValue : Real = + DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) + | EXPONENTIAL_VALUE + +LiteralInfinity = + '*' + +// Clause 8.2.5.9 Interactions Concrete Syntax + +// Clause 8.2.5.9.1 Interactions + +Interaction = + TypePrefix 'interaction' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.9.2 Flows + +Flow = + FeaturePrefix 'flow' + ItemFlowDeclaration TypeBody + +SuccessionFlow = + FeaturePrefix 'succession' 'flow' + ItemFlowDeclaration TypeBody + +FlowDeclaration : Flow = + FeatureDeclaration ValuePart? + ( 'of' ownedRelationship += PayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ( isSufficient ?= 'all' )? + ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +PayloadFeatureMember : FeatureMembership = + ownedRelatedElement = PayloadFeature + +PayloadFeature = + Identification PayloadFeatureSpecializationPart ValuePart? + | Identification ValuePart + | ( ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ( ownedRelationship += OwnedFeatureTyping )? + +PayloadFeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += OwnedReferenceSubsetting '.' )? + ownedRelationship += FlowFeatureMember + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : Feature = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that an FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + +// Clause 8.2.5.10 Feature Values Concrete Syntax + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.11 Multiplicities Concrete Syntax + +Multiplicity = + MultiplicitySubset | MultiplicityRange + +MultiplicitySubset : Multiplicity = + 'multiplicity' Identification Subsets + TypeBody + +MultiplicityRange = + 'multiplicity' Identification MultiplicityBounds + TypeBody + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += OwnedMultiplicityRange + +OwnedMultiplicityRange : MultiplicityRange = + MultiplicityBounds + +MultiplicityBounds : MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.5.12 Metadata Concrete Syntax + +Metaclass = + TypePrefix 'metaclass' + ClassifierDeclaration TypeBody + +PrefixMetadataAnnotation : Annotation = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataFeature : MetadataFeature : + ownedRelationship += OwnedFeatureTyping + +MetadataFeature = + ( ownedRelationship += PrefixMetadataMember )* + ( '@' | 'metadata' ) + MetadataFeatureDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataFeatureDeclaration : MetadataFeature = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Feature = + ';' | '{' ( ownedRelationship += MetadataBodyElement )* '}' + +MetadataBodyElement : Membership = + NonFeatureMember + | MetadataBodyFeatureMember + | AliasMember + | Import + +MetadataBodyFeatureMember : FeatureMembership = + ownedMemberFeature = MetadataBodyFeature + +MetadataBodyFeature : Feature = + 'feature'? ( ':>>' | 'redefines')? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +// Clause 8.2.5.13 Packages Concrete Syntax + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' + | '{' ( NamespaceBodyElement + | ownedRelationship += ElementFilterMember + )* + '}' + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' condition = OwnedExpression ';' + +// End of BNF + + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-elements.json b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-elements.json new file mode 100644 index 000000000..b6cf8f4b6 --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-elements.json @@ -0,0 +1,7543 @@ +[ + { + "@type": "Info", + "clause_id": "", + "lines": [], + "source": "tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-marked_up.kgbnf", + "timestamp": "2025-12-04T19:29:18Z" + }, + { + "@type": "Comment", + "clause_id": "", + "lines": [ + "// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html", + "// Generated by bnf_grammar_processor at: 2025-11-28T15:06:37Z" + ] + }, + { + "@type": "Comment", + "clause_id": "", + "lines": [ + "// Corrected manually by HP de Koning" + ] + }, + { + "@type": "Heading", + "clause_id": "", + "lines": [ + "Part 2 - Systems Modeling Language (SysML)" + ] + }, + { + "@type": "Heading", + "clause_id": "8.2.3", + "lines": [ + "Clause 8.2.3 Graphical Notation" + ] + }, + { + "@type": "Heading", + "clause_id": "8.2.3.1", + "lines": [ + "Clause 8.2.3.1 Graphical Notation Overview" + ] + }, + { + "@type": "Heading", + "clause_id": "8.2.3.2", + "lines": [ + "Clause 8.2.3.2 Elements and Relationships Graphical Notation" + ] + }, + { + "@type": "Production", + "abstract_syntax_type": "", + "clause_id": "8.2.3.2", + "is_partial": false, + "lines": [ + "element =", + " dependencies-and-annotations-element", + " | general-element", + " | element-inside-textual-compartment" + ], + "name": "element" + }, + { + "@type": "Production", + "abstract_syntax_type": "", + "clause_id": "8.2.3.2", + "is_partial": true, + "lines": [ + "compartment =| general-compartment" + ], + "name": "compartment" + }, + { + "@type": "Production", + "abstract_syntax_type": "", + "clause_id": "8.2.3.2", + "is_partial": false, + "lines": [ + "general-compartment =", + "// Source document: tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-marked_up.kgbnf
+// Generated by bnf_grammar_processor at: 2025-12-04T19:29:18Z
+
// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html
+// Generated by bnf_grammar_processor at: 2025-11-28T15:06:37Z
+
// Corrected manually by HP de Koning +
+element = + dependencies-and-annotations-element + | general-element + | element-inside-textual-compartment ++
compartment =| general-compartment ++ +
general-compartment = ++ ++ general-view +
general-view = + (general-element)* + (dependencies-and-annotations-element)* + (ellipsis-at-lower-left-corner)? ++ +
ellipsis-at-lower-left-corner = '...' ++ +
general-element = + general-node + | general-relationship ++ +
element-node = + usage-node | definition-node | annotation-node | namespace-node ++ +
element-inside-textual-compartment = ++ ++
rel-name = + Identification + | QualifiedName ++
// Note. An element inside a textual compartment is selected by graying out a substring containing the element. The grayed-out section must cover a single element within the textual syntax inside the compartment. +
+dependencies-and-annotations-element =| dependencies-element ++
dependencies-element =| + binary-dependency + | n-ary-dependency ++ +
binary-dependency = ++ ++
n-ary-dependency = + &n-ary-association-dot (n-ary-dependency-client-or-supplier-link &element-node)+ ++ +
n-ary-dependency-client-or-supplier-link = + n-ary-dependency-client-link + | n-ary-dependency-supplier-link ++ +
n-ary-association-dot = ++ ++
n-ary-dependency-client-link = ++ ++
n-ary-dependency-supplier-link = +++
// Note. An n-ary dependency must have two or more client elements or two or more supplier elements. +
+dependencies-and-annotations-element =| + annotation-node + | annotation-link ++ +
annotation-node = + comment-node + | documentation-node + | textual-representation-node ++ +
text-block = (LINE_TEXT)* ++ +
comment-node = + comment-without-keyword + | comment-with-keyword ++ +
comment-without-keyword = ++ ++
comment-with-keyword = ++ ++
documentation-node = ++ ++
documentation-compartment = ++ ++ Identification + text-block +
textual-representation-node = ++ ++
language-string = 'language' '=' STRING_VALUE ++ +
annotation-link = ++ ++
annotated-element = + element + | element-inside-textual-compartment ++
// Note. A comment node may be attached to zero, one, or more than one annotated elements. All other annotation nodes must be attached to one and only one annotated element. +
+general-node =| namespace-node ++
namespace-node =| package-node ++ +
package-node = + package-with-name-inside + | package-with-name-in-tab + | imported-package-with-name-inside + | imported-package-with-name-in-tab ++ +
package-with-name-inside = ++ ++
package-with-name-in-tab = ++ ++
imported-package-with-name-inside = ++ ++
imported-package-with-name-in-tab = ++ ++
package-compartment = + general-compartment + | documentation-compartment + | packages-compartment + | members-compartment + | relationships-compartment ++
compartment =| package-compartment ++ +
packages-compartment = ++ ++ packages-compartment-contents +
packages-compartment-contents = packages-compartment-element* '…'? ++ +
packages-compartment-element = el-prefix? Identification ++ +
members-compartment = ++ ++ members-compartment-contents +
members-compartment-contents = members-compartment-element* '…'? ++ +
members-compartment-element = el-prefix? (DefinitionElement | UsageElement) ++ +
relationships-compartment = ++ ++ relationships-compartment-contents +
relationships-compartment-contents = (relationships-compartment-element)* '…'? ++ +
relationships-compartment-element = el-prefix? relationship-name QualifiedName ++ +
relationship-name = + 'defines' | 'defined by' | 'specializes' | 'specialized by' | 'connect to' + | 'subsets' | 'subsetted by' | 'performs' | 'performed by' | 'allocated' | 'allocated to' + | 'satisfy' | 'satisfied by' ++
general-relationship =| + import + | top-level-import + | recursive-import + | owned-membership + | unowned-membership ++ +
import = ++ ++
top-level-import = ++ ++
recursive-import = ++ ++
owned-membership = ++ ++
unowned-membership = +++
general-node =| type-node ++ +
type-node = + definition-node + | usage-node ++
general-node =| usage-node definition-node ++
namespace-node =| type-node ++ +
definition-name-with-alias =
+ DefinitionDeclaration
+ ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )?
+
+
+usage-name-with-alias =
+ '^'? UsageDeclaration
+ ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )?
+
+
+compartment-stack = (compartment)* ++
compartment =| + features-compartment + | variants-compartment + | variant-elementusages-compartment ++ +
features-compartment = ++ ++ features-compartment-contents +
features-compartment-contents = (features-compartment-element)* '…'? ++ +
features-compartment-element = el-prefix? UsagePrefix usage-cp ++ +
variants-compartment = ++ ++ variants-compartment-contents +
variants-compartment-contents = members-compartment-contents ++ +
variant-elementusages-compartment = +++ variants-compartment-contents +
general-relationship =| + type-relationship ++ +
type-relationship = + subclassification + | subsetting + | definition + | redefinition + | composite-feature-membership + | noncomposite-feature-membership ++ +
subclassification = ++ ++
definition = ++ ++
subsetting = ++ ++
reference-subsetting = ++ ++
redefinition = ++ ++
composite-feature-membership = ++ ++
noncomposite-feature-membership = ++ ++
el-prefix = '^' | '/' ++ +
usage-cp = usageDeclaration ValuePart? ++ +
extended-def = ++ ++
extended-def-name-compartment = + '«' BasicDefinitionPrefix? DefinitionExtensionKeyword+ 'def' '»' + definition-name-with-alias ++
// Note. This production is only valid for cases where one or more
+// DefinitionExtensionKeyword names a MetadataDefinition that is a direct
+// or indirect specialization of KerML metaclass SemanticMetadata.
+
definition-node =| extended-def ++ +
extended-usage = ++ ++
extended-usage-name-compartment = + '«' BasicUsagePrefix? UsageExtensionKeyword+ '»' + usage-name-with-alias ++
// Note. This production is only valid for cases where one or more
+// UsageExtensionKeyword names a MetadataDefinition that is a direct
+// or indirect specialization of KerML metaclass SemanticMetadata.
+
usage-node =| extended-usage ++
definition-node =| attribute-def ++ +
attribute-def = ++ ++
attribute-def-name-compartment = + '«' DefinitionPrefix 'attribute' 'def' '»' + definition-name-with-alias ++
usage-node =| attribute ++ +
attribute = ++ ++
attribute-name-compartment = + '«' UsagePrefix 'attribute' '»' + usage-name-with-alias ++
compartment =| attributes-compartment ++ +
attributes-compartment = ++ ++ attributes-compartment-contents +
attributes-compartment-contents = (attributes-compartment-element)* '…'? ++ +
attributes-compartment-element = el-prefix? UsagePrefix usage-cp ++
definition-node =| enumeration-def ++ +
enumeration-def = ++ ++
enumeration-def-name-compartment = + '«' DefinitionPrefix 'enum' 'def' '»' + definition-name-with-alias ++
usage-node =| enumeration ++ +
enumeration = ++ ++
enumeration-name-compartment = + '«' UsagePrefix 'enum' '»' + usage-name-with-alias ++
compartment =| enums-compartment ++ +
enums-compartment = ++ ++ enums-compartment-contents +
enums-compartment-contents = (enums-compartment-element)* '…'? ++ +
enums-compartment-element = el-prefix? UsagePrefix usage-cp ++
definition-node =| occurrence-def ++
general-relationship =| portion-relationship ++ +
occurrence-def = ++ ++
occurrence-def-name-compartment = + '«' DefinitionPrefix 'occurrence' 'def' '»' + definition-name-with-alias ++
usage-node =| + occurrence + | occurrence-ref + | timeslice-or-snapshot-node ++ +
occurrence = ++ ++
occurrence-ref = ++ ++
occurrence-name-compartment = + '«' OccurrenceUsagePrefix 'occurrence' '»' + usage-name-with-alias ++ +
timeslice-or-snapshot-node = + timeslice + | snapshot ++ +
timeslice = ++ ++
timeslice-name-compartment = + '«timeslice»' + usage-name-with-alias ++ +
snapshot = ++ ++
snapshots-name-compartment = + '«snapshot»' + usage-name-with-alias ++ +
event-occurrence-def = ++ ++
event-occurrence-def-name-compartment = + '«' DefinitionPrefix 'event' 'occurrence' 'def' '»' + definition-name-with-alias ++
definition-node =| event-occurrence-def ++ +
event-occurrence = ++ ++
event-occurrence-name-compartment = + '«' OccurrenceUsagePrefix 'event' 'occurrence' '»' + usage-name-with-alias ++
usage-node =| event-occurrence ++ +
event-edge = ++ ++
eventer = usage-node | definition-node ++ +
portion-relationship = +++
compartment =| + occurrences-compartment + | individuals-compartment + | timeslices-compartment + | snapshots-compartment + | sequence-compartment ++ +
occurrences-compartment = ++ ++ occurrences-compartment-contents +
occurrences-compartment-contents = (occurrences-compartment-element)* '…'? ++ +
occurrences-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++ +
individuals-compartment = ++ ++ individuals-compartment-contents +
individuals-compartment-contents = (individuals-compartment-element)* '…'? ++ +
individuals-compartment-element = occurrences-compartment-element ++ +
timeslices-compartment = ++ ++ timeslices-compartment-contents +
timeslices-compartment-contents = (timeslices-compartment-element)* '…'? ++ +
timeslices-compartment-element = occurrences-compartment-element ++ +
snapshots-compartment = ++ ++ snapshots-compartment-contents +
snapshots-compartment-contents = (snapshots-compartment-element)* '…'? ++ +
snapshots-compartment-element = occurrences-compartment-element ++ +
sequence-compartment = ++ ++ sequence-view +
sequence-view = (sq-graphical-element)* ++ +
sq-graphical-element = + sq-graphical-node + | sq-graphical-relationship + | dependencies-and-annotations-element ++ +
sq-graphical-node = sq-head-node | lifeline ++ +
sq-head-node = sq-part | sq-port ++ +
sq-part = ++ ++
sq-port = ++ ++
sq-port-label = UsageDeclaration ++ +
sq-l-node = + lifeline + | sq-proxy ++ +
lifeline = ++ ++
sq-proxy = ++ ++ | +
+
proxy-label = '.'? FeatureChainMember ++ +
sq-graphical-relationship = message | sq-succession ++ +
succession-label = UsageDeclaration? ++ +
sq-succession = ++ ++
succession-label = Identification ++
// Note: the proxy nodes attached to a succession must refer to an event +
+definition-node =| item-def ++
interconnection-element =| item| item-ref ++ +
item-def = ++ ++
item-def-name-compartment = + '«' DefinitionPrefix 'item' 'def' '»' + definition-name-with-alias ++
usage-node =| item ++ +
item = ++ ++
item-name-compartment = + '«' OccurrenceUsagePrefix 'item' '»' + usage-name-with-alias ++ +
item-ref = +++
compartment =| items-compartment ++ +
items-compartment = ++ ++ items-compartment-contents +
items-compartment-contents = (items-compartment-element)* '…' ++ +
items-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++
definition-node =| part-def ++
interconnection-element =| part | part-ref ++ +
part-def = ++ ++
part-def-name-compartment = + '«' DefinitionPrefix 'part' 'def' '»' + definition-name-with-alias ++
usage-node =| part ++ +
part = ++ ++
part-name-compartment = + '«' OccurrenceUsagePrefix 'part' '»' + usage-name-with-alias ++ +
part-ref = +++
compartment =| + parts-compartment + | directed-features-compartment + | interconnection-compartment ++ +
parts-compartment = ++ ++ parts-compartment-contents +
parts-compartment-contents = (parts-compartment-element)* '…'? ++ +
parts-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++ +
directed-features-compartment = ++ ++ directed-features-compartment-contents +
directed-features-compartment-contents = (directed-features-compartment-element)* '…'? ++ +
directed-features-compartment-element = + el-prefix FeatureDirection DefinitionBodyItem* ++ +
interconnection-compartment = +++ interconnection-view +
interconnection-view =| + (interconnection-element)* + (dependencies-and-annotations-element)* + (ellipsis-at-lower-left-corner)? ++
general-view =| interconnection-view ++
definition-node =| port-def ++ +
port-def = ++ ++
port-def-name-compartment = + '«' DefinitionPrefix 'port' 'def' '»' + definition-name-with-alias ++
usage-node =| port-usage ++ +
port-usage = ++ ++
port-name-compartment = + '«' OccurrenceUsagePrefix 'port' '»' + usage-name-with-alias ++
compartment =| ports-compartment ++ +
ports-compartment = ++ ++ ports-compartment-contents +
ports-compartment-contents = (ports-compartment-element)* '…'? ++ +
ports-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++
interconnection-element =| port-def | port-usage ++ +
pdh = ++ ++ | +
+ | +
+
pdv = ++ ++ | +
+ | +
+
port-l = ++ ++ | +
+ | +
+ | + proxy-v +
port-r = ++ ++ | +
+ | +
+ | + proxy-v +
port-t = ++ ++ | +
+ | +
+ | + proxy-h +
port-b = ++ ++ | +
+ | +
+ | + proxy-h +
port-label = QualifiedName (':' QualifiedName)?
+
+
+proxy-v = ++ ++ | +
+
proxy-h = +++ | +
+
// Note. Dotted line port productions (references) are only possible for nested ports +
+// Note. The proxy option of a port production is valid only on a part usage contained within an interconnection view. +
+definition-node =| connection-def ++ +
connection-def = ++ ++
connection-def-name-compartment = + '«' DefinitionPrefix 'connection' 'def' '»' + definition-name-with-alias ++
usage-node =| connection ++ +
connection = ++ ++
connection-name-compartment = + '«' OccurrenceUsagePrefix 'connection' '»' + usage-name-with-alias ++
compartment =| connections-compartment ++ +
connections-compartment = ++ ++ connections-compartment-contents +
connections-compartment-contents = (connections-compartment-element)* '…'? ++ +
connections-compartment-element = + el-prefix? OccurrenceUsagePrefix UsageDeclaration ++
interconnection-element =| + connection-def + | connection + | connection-relationship + | attribute ++ +
connection-relationship = + binding-connection + | connection-graphical + | n-ary-connection + | n-ary-connection-def + | connection-definition-elaboration + | connection-usage-elaboration + | connection-def-graphical ++ +
connection-graphical = ++ ++ | +
+
c-adornment = + (a-property | a-direction | a-subsetting |a-redefinition)* ++ +
a-property = + 'ordered' | 'nonunique' | 'abstract' | 'derived' | 'readonly' ++ +
a-direction = + 'in' | 'out' | 'inout' ++ +
a-subsetting =
+ 'subsets' OwnedSubsetting (',' OwnedSubsetting)*
+
+
+a-redefinition =
+ 'redefines' OwnedRedefinition (',' OwnedRedefinition)*
+
+
+connection-end = usage-node | usage-edge ++
usage-edge =| connection-graphical | binding-connection ++ +
connection-label = UsageDeclaration ++ +
connection-def-graphical = +++ | +
+
general-relationship =| connection-def-graphical ++ +
cdef-label = Identification ++ +
n-ary-connection-def = + n-ary-def-connection-dot n-ary-def-segment+ ++ +
n-ary-def-connection-dot = ++ ++
n-ary-def-segment = +++
definition-node =| n-ary-def-connection-dot ++
general-relationship =| n-ary-def-segment ++ +
n-ary-connection = + n-ary-connection-dot n-ary-segment+ ++ +
n-ary-connection-dot = +++
usage-node =| n-ary-connection-dot ++ +
cdot-label = UsageDeclaration ++ +
n-ary-segment = ++ ++
binding-connection = ++ ++
rolename = Identification? ++ +
multiplicity = MultiplicityRange? ++ +
connection-definition-elaboration = ++ ++
connection-usage-elaboration = +++
// Note. The usage-nodes at the ends of a binding-connection must be of compatible types. +
+definition-node =| interface-def ++
interconnection-element =| interface ++ +
interface-def = ++ ++
interface-def-name-compartment = + '«' DefinitionPrefix 'interface' 'def' '»' + definition-name-with-alias ++
usage-node =| interface ++ +
interface = ++ ++
interface-name-compartment = + '«' OccurrenceUsagePrefix 'interface' '»' + usage-name-with-alias ++
compartment =| + interfaces-compartment + | ends-compartment ++ +
interfaces-compartment = ++ ++ interfaces-compartment-contents +
interfaces-compartment-contents = (interfaces-compartment-element)* '…'? ++ +
interfaces-compartment-element = + el-prefix? OccurrenceUsagePrefix InterfaceUsageDeclaration ++ +
ends-compartment = ++ ++ ends-compartment-contents +
ends-compartment-contents = (ends-compartment-element)* '…'? ++ +
ends-compartment-element = QualifiedName (':' QualifiedName)?
+
+connection-relationship =| + interface-connection ++ +
interface-connection = ++ ++
interface-label = UsageDeclaration? ++
definition-node =| allocation-def ++ +
allocation-def = ++ ++
allocation-def-name-compartment = + '«' DefinitionPrefix 'allocation' 'def' '»' + definition-name-with-alias ++
usage-node =| allocation ++ +
allocation = ++ ++
allocation-name-compartment = + '«' OccurrenceUsagePrefix 'allocation' '»' + usage-name-with-alias ++
compartment =| allocations-compartment ++ +
allocations-compartment = ++ ++ allocations-compartment-contents +
allocations-compartment-contents = (allocations-compartment-element)* '…'? ++ +
allocations-compartment-element = + el-prefix? OccurrenceUsagePrefix AllocationUsageDeclaration UsageBody* ++
general-relationship =| allocate-relationship ++ +
allocate-relationship = ++ ++
allocation-node = + general-node + | element-in-textual-compartment ++
usage-edge =| allocate-relationship ++
definition-node =| flow-def ++ +
flow-def = ++ ++
flow-def-name-compartment = + '«' DefinitionPrefix 'succession'? 'flow' 'def' '»' + definition-name-with-alias ++
usage-node =| flow-node ++ +
flow-node = ++ ++
flow-name-compartment = + '«' OccurrenceUsagePrefix ( 'message' | 'succession'? 'flow' ) '»' + usage-name-with-alias ++
compartment =| flows-compartment ++ +
flows-compartment = ++ ++ flows-compartment-contents +
flows-compartment-contents = (flows-compartment-element)* '...'? ++ +
flows-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( 'message' MessageDeclaration + | 'succession'? FlowDeclaration + ) ++
interconnection-element =| + flow-def + | flow ++
connection-relationship =| + message-connection + | flow + | succession-flow + | flow-on-connection ++
usage-edge =| message | flow | succession-flow ++ +
msg-end-node = + occurrence| sq-l-node| item | part | port | action | state + | use-case | verification-case | analysis-case | proxy ++ +
message = +++
// Note: proxy nodes and ends of messages must refer to occurrences +
+ +message-label =
+ UsageDeclaration? ('of' FlowPayloadFeatureMember)? | FlowPayloadFeatureMember
+
+
+flow = ++ ++
flow-label =
+ UsageDeclaration? ('of' FlowPayloadFeatureMember)? | FlowPayloadFeatureMember
+
+
+flow-end-node = + parameter | proxy ++
// Note: proxy nodes at ends of flows must refer to directed features +
+ +succession-flow = ++ ++
succession-flow-label = flow-label ++ +
flow-on-connection = ++ ++
flow-node = + flow-node-r + | flow-node-l + | sflow-node-r + | sflow-node-l + | message-node-r + | message-node-l ++ +
flow-node-r = ++ ++
flow-node-l = ++ ++
sflow-node-r = ++ ++
sflow-node-l = ++ ++
message-node-r = ++ ++
message-node-l = ++ ++
flow-label = + Identification | FlowPayloadFeatureMember ++
definition-node =| action-def ++ +
action-def = ++ ++
action-def-name-compartment = + '«' DefinitionPrefix 'action' 'def' '»' + definition-name-with-alias ++
usage-node =| + action + | perform-action-usage ++ +
action = ++ ++
action-name-compartment = + '«' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
perform-action-usage = ++ ++
action-ref = ++ ++
perform-action-name-compartment = + '«' OccurrenceUsagePrefix 'perform' 'action' '»' + usage-name-with-alias ++
compartment =| + actions-compartment + | perform-actions-compartment + | parameters-compartment + | action-flow-compartment ++ +
actions-compartment = ++ ++ actions-compartment-contents +
actions-compartment-contents = (actions-compartment-element)* '…'? ++ +
actions-compartment-element = + el-prefix? OccurrenceUsagePrefix ActionUsageDeclaration ++ +
perform-actions-compartment = ++ ++ perform-actions-compartment-contents +
perform-actions-compartment-contents = (perform-actions-compartment-element)* '…'? ++ +
perform-actions-compartment-element = + el-prefix? OccurrenceUsagePrefix PerformActionUsageDeclaration ++ +
parameters-compartment = ++ ++ parameters-compartment-contents +
parameters-compartment-contents = (parameters-compartment-element)* '…'? ++ +
parameters-compartment-element = + el-prefix? FeatureDirection UsageDeclaration ValueOrFlowPart? DefinitionBodyItem* ++ +
performed-by-compartment = ++ ++ performed-by-compartment-contents +
performed-by-compartment-contents = QualifiedName* '…'? ++ +
action-flow-compartment = ++ ++ action-flow-view +
action-flow-view = + (dependencies-and-annotations-element)* + (action-flow-element)* + (perform-action-swimlanes)? ++
action-flow-element =| + action-ref + | action + | action-flow-node + | action-flow-relationship ++ +
action-flow-node = + start-node + | done-node + | terminate-node + | fork-node + | join-node + | decision-node + | merge-node + | send-action-node + | accept-action-node + | while-loop-action-node + | for-loop-action-node + | if-else-action-node + | assign-action-node ++ +
action-flow-relationship = + flow + | aflow-succession + | binding-connection + | else-branch ++ +
param-l = ++ ++ | +
+ | + proxy-v +
param-r = ++ ++ | +
+ | + proxy-v +
param-t = ++ ++ | +
+ | + proxy-h +
param-b = ++ ++ | +
+ | + proxy-h +
param-label = QualifiedName (':' QualifiedName)*
+
+
+start-node = ++ ++
done-node = ++ ++
terminate-node = ++ ++
fork-node = ++ ++
join-node = ++ ++
decision-node = ++ ++
merge-node = ++ ++
send-action-node = ++ ++
send-action-name-compartment = + '«' OccurrenceUsagePrefix 'send' 'action' '»' + usage-name-with-alias ++ +
send-action-expression = NodeParameterMember 'to' NodeParameterMember ++ +
accept-action-node = ++ ++
accept-action-name-compartment = + '«' OccurrenceUsagePrefix 'accept' 'action' '»' + usage-name-with-alias ++ +
accept-action-expression = AcceptParameterPart ++ +
while-loop-action-node = ++ ++
while-condition = ++ ++ condition-expression +
until-condition = ++ ++ condition-expression +
while-loop-action-name-compartment = + '«' OccurrenceUsagePrefix 'loop' '»' + usage-name-with-alias ++ +
for-loop-action-node = ++ ++
iteration = ++ ++ iteration-expression +
loop-body = ++ ++ action-body +
for-loop-action-name-compartment = + '«' OccurrenceUsagePrefix 'loop' '»' + usage-name-with-alias ++ +
if-else-action-node = ++ ++
if-condition = ++ ++ condition-expression +
then-body = ++ ++ action-body +
else-body = ++ ++ action-body +
ifelse-action-name-compartment = + '«' OccurrenceUsagePrefix 'if' '»' + usage-name-with-alias ++ +
action-body = + action-body-textual | action-flow-view ++ +
condition-expression = + ExpressionParameterMember ++ +
iteration-expression = + ForVariableDeclarationMember 'in' NodeParameterMember ++ +
action-body-textual = + ActionBodyParameterMember ++ +
assign-action-node = ++ ++
assign-action-name-compartment = + '«' OccurrenceUsagePrefix 'assign' '»' + usage-name-with-alias ++ +
perform-actions-swimlanes = (swimlane)* ++ +
swimlane = ++ ++
parameter = + param-l | param-r | param-t | param-b ++ +
aflow-succession = ++ ++
else-branch = ++ ++
perform-edge = ++ ++
performer-node = part | action | part-def | action-def | distinguished-parameter ++
usage-edge =| succession perform-edge ++ +
guard-expression = '[' OwnedExpression ']' ++
// Note. All swimlanes are attached to each other on vertical edges and aligned along the top and bottom horizontal edges. +
+// Note. The proxy option of a parameter production is valid only on an action usage contained within an action flow view. +
+definition-node =| state-def ++ +
state-def = ++ ++
state-def-name-compartment =
+ '«' DefinitionPrefix 'state' 'def' '»'
+ definition-name-with-alias
+ ('«' 'parallel' '»')?
+
+usage-node =| + state + | exhibit-state-usage ++ +
state = ++ ++
state-ref = ++ ++
state-name-compartment =
+ '«' OccurrenceUsagePrefix 'state' '»'
+ usage-name-with-alias
+ ('«' 'parallel' '»')?
+
+
+exhibit-state-usage = ++ ++
state-subaction-body = state-subaction-body-textual | action-flow-view ++ +
state-subaction-body-textual = state-subaction-declaration? ( '{' ActionBodyItem* '}' )?
+
+
+state-subaction-declaration = + PerformActionUsageDeclaration + | AcceptNodeDeclaration + | SendNodeDeclaration + | AssignmentNodeDeclaration ++ +
state-do-action = ++ ++ state-subaction-body +
state-entry-action = ++ ++ state-subaction-body +
state-exit-action = ++ ++ state-subaction-body +
entry-action = ++ ++ | +
+
entry-action-name-comp = + '«' 'entry' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
exit-action = ++ ++
exit-action-name-comp = + '«' 'exit' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
do-action = ++ ++
do-action-name-comp = + '«' 'do' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
exhibit-state-name-compartment = + '«exhibit-state»' + state-name-compartment ++
compartment =| + states-compartment + | state-actions-compartment + | exhibit-states-compartment + | successions-compartment + | state-transition-compartment ++ +
states-compartment = ++ ++ states-compartment-contents +
states-compartment-contents = (states-compartment-element)* '…'? ++ +
states-compartment-element = + el-prefix? OccurrenceUsagePrefix ActionUsageDeclaration ++ +
state-actions-compartment = ++ ++ state-actions-compartment-contents +
state-actions-compartment-contents = (state-actions-compartment-element)* '…'? ++ +
state-actions-compartment-element = + el-prefix? EntryActionMember | DoActionMember | ExitActionMember ++ +
exhibit-states-compartment = ++ ++ exhibit-states-compartment-contents +
exhibit-states-compartment-contents = exhibit-state-scompartment-element* '…'? ++ +
exhibit-states-compartment-element-compartment = UsageDeclaration ++ +
successions-compartment = ++ ++ successions-compartment-contents +
successions-compartment-contents = QualifiedName* '…'? ++ +
state-transition-compartment = ++ ++ state-transition-view +
state-transition-view = + (state-transition-element)* + (dependencies-and-annotations-element)* ++ +
state-transition-element = + state-transition-node + | transition + | st-succession ++ +
state-transition-node = + state + | state-ref + | start-node + | entry-action + | do-action + | exit-action + | done-node + | fork-node + | join-node + | decision-node + | merge-node + | terminate-node + | action + | perform-action-usage + | action-ref ++ +
transition = ++ ++ | +
+
state-source = + state | state-ref ++ +
transition-label = trigger-expression '/' ActionUsage ++ +
trigger-expression = AcceptParameterPart (guard-expression)? ++ +
st-succession = ++ ++ | +
+
exhibit-edge = ++ ++
exhibitor = part | part-def ++
general-relationship =| exhibit-edge ++
usage-edge =| transition | st-succession | exhibit-edge ++
definition-node =| calc-def ++ +
calc-def = ++ ++
calc-def-name-compartment = + '«' DefinitionPrefix 'calc' 'def' '»' + definition-name-with-alias ++
usage-node =| calc ++ +
calc = ++ ++
calc-name-compartment = + '«' OccurrenceUsagePrefix 'calc' '»' + usage-name-with-alias ++
action-flow-element =| + calc-def + | calc ++
compartment =| + calcs-compartment + | result-compartment ++ +
calcs-compartment = ++ ++ calcs-compartment-contents +
calcs-compartment-contents = calcs-compartment-element* '…'? ++ +
calcs-compartment-element = el-prefix? OccurrenceUsagePrefix ActionUsageDeclaration ++ +
result-compartment = ++ ++ result-compartment-contents +
result-compartment-contents = OwnedExpression ++
definition-node =| constraint-def ++ +
constraint-def = ++ ++
constraint-def-name-compartment = + '«' DefinitionPrefix 'constraint' 'def' '»' + definition-name-with-alias ++ +
usage-node = + constraint + | assert-constraint-node ++ +
constraint = ++ ++
constraint-ref = ++ ++
constraint-name-compartment = + '«' OccurrenceUsagePrefix 'constraint' '»' + usage-name-with-alias ++ +
assert-constraint-node = ++ ++
assert-constraint-name-compartment = + '«assert constraint»' + constraint-name-compartment ++ +
assume-constraint-node = ++ ++
assume-constraint-name-compartment = + '«' OccurrenceUsagePrefix 'assume' 'constraint' '»' + usage-name-with-alias ++
usage-node =| assume-constraint-node | assert-constraint-node ++ +
assume-edge = ++ ++
assumer = requirement | requirement-def ++
general-relationship =| assume-edge ++ +
assert-edge = ++ ++
assertor = usage-node | definition-node ++
general-relationship =| assert-edge ++
compartment =| + constraints-compartment + | assert-constraints-compartment ++ +
constraints-compartment = ++ ++ constraints-compartment-contents +
constraints-compartment-contents = (constraints-usage-compartment-element)* '…'? ++ +
constraints-usage-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CalculationBody* ++ +
assert-constraints-compartment = ++ ++ assert-constraints-compartment-contents +
assert-constraints-compartment-contents = (assert-constraints-compartment-element)* '…'? ++ +
assert-constraints-compartment-element = + el-prefix? OccurrenceUsagePrefix ( 'not' )? + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) + CalculationUsageParameterPart CalculationBody ++
interconnection-element =| + constraint-ref + | constraint ++
definition-node =| + requirement-def + | concern-def ++ +
requirement-def = ++ ++
requirement-def-name-compartment = + '«' DefinitionPrefix 'requirement' 'def' '»' + definition-name-with-alias ++ +
usage-node = + requirement + | satisfy-requirement-usage + | concern ++ +
requirement = ++ ++
requirement-ref = ++ ++
requirement-name-compartment = + '«' OccurrenceUsagePrefix 'requirement' '»' + usage-name-with-alias ++ +
satisfy-requirement-usage = ++ ++
satisfy-requirement-name-compartment = + '«satisfy requirement»' + requirement-name-compartment ++ +
concern-def = ++ ++
concern-def-name-compartment = + '«' DefinitionPrefix 'concern' 'def' '»' + definition-name-with-alias ++ +
concern = ++ ++
concern-name-compartment = + '«' OccurrenceUsagePrefix 'concern' '»' + usage-name-with-alias ++
compartment =| + constraints-compartment + | assert-constraints-compartment ++
compartment =| + requirements-compartment + | require-constraints-compartment + | assume-constraints-compartment + | satisfy-requirements-compartment + | satisfies-compartment + | actors-compartment + | subject-compartment + | stakeholders-compartment + | frames-compartment ++ +
requirements-compartment = ++ ++ requirements-compartment-contents +
requirements-compartment-contents = (requirements-compartment-element)* '…'? ++ +
requirements-compartment-element = + OccurrenceUsagePrefix ConstraintUsageDeclaration ++ +
require-constraints-compartment = ++ ++ require-constraints-compartment-contents +
require-constraints-compartment-contents = require-constraint-element* '…'? ++ +
require-constraint-element = + el-prefix? requireMemberPrefix? RequirementConstraintUsage ++ +
assume-constraints-compartment = ++ ++ assume-constraints-compartment-contents +
assume-constraints-compartment-contents = require-constraint-element* '…'? ++ +
satisfy-requirements-compartment = ++ ++ satisfy-requirements-compartment-contents +
satisfy-requirements-compartment-contents = text-block ++ +
satisfies-compartment = ++ ++ satisfies-compartment-contents +
satisfies-compartment-contents = UsageDeclaration* '…'? ++ +
actors-compartment = ++ ++ actors-compartment-contents +
actors-compartment-contents = (actors-compartment-element)* '…'? ++ +
actors-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
subject-compartment = ++ ++ subject-compartment-contents +
subject-compartment-contents = (subject-compartment-element)* '…'? ++ +
subject-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
stakeholders-compartment = ++ ++ stakeholders-compartment-contents +
stakeholders-compartment-contents = (stakeholders-compartment-element)* '…'? ++ +
stakeholders-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
frames-compartment = ++ ++ frames-compartment-contents +
frames-compartment-contents = (frames-compartment-element)* '…'? ++ +
frames-compartment-element = el-prefix* MemberPrefix? FramedConcernUsage ++ +
concerns-compartment = +++ concerns-compartment-contents +
interconnection-element =| + requirement-ref + | requirement + | concern + | distinguished-parameter + | distinguished-parameter-link + | concern-stakeholder-link ++
general-relationship =| frame-relationship ++
subject-actors-stakeholders-node =| requirement ++ +
distinguished-parameter = + subject + | actor + | stakeholder ++ +
subject = ++ ++
actor = ++ ++ | +
+
stakeholder = ++ ++
subject-name = UsageDeclaration ++ +
actor-name = UsageDeclaration ++ +
stakeholder-name = UsageDeclaration ++ +
distinguished-parameter-link = ++ ++
frame-relationship = ++ ++
concern-stakeholder-link = ++ ++
satisfy-edge = ++ ++
satisfier = usage-node | definition-node ++
general-relationship =| satisfy-edge ++ +
require-edge = ++ ++
requirer = usage-node | definition-node ++
general-relationship =| require-edge ++ +
require-constraint-node = ++ ++
require-constraint-name-compartment = + '«' OccurrenceUsagePrefix 'require' 'constraint' '»' + usage-name-with-alias ++
usage-node =| require-constraint-node ++ +
frame-concern-node = ++ ++
frame-concern-name-compartment = + '«' OccurrenceUsagePrefix 'frame' 'concern' '»' + usage-name-with-alias ++
usage-node =| frame-concern-node ++ +
frame-edge = ++ ++
framer = requirement | requirement-def | viewpoint | viewpoint-def ++
general-relationship =| frame-edge ++
compartment =| objective-compartment ++ +
objective-compartment = ++ ++ objective-compartment-contents +
objective-compartment-contents = (objective-compartment-element)* '…'? ++ +
objective-compartment-element = + comp-prefix? MemberPrefix ConstraintUsageDeclaration RequirementBody ++
definition-node =| analysis-def ++ +
analysis-def = ++ ++
analysis-def-name-compartment = + '«' DefinitionPrefix 'analysis' 'def' '»' + definition-name-with-alias ++
usage-node =| analysis ++ +
analysis = ++ ++
analysis-name-compartment = + '«' OccurrenceUsagePrefix 'analysis' '»' + usage-name-with-alias ++
compartment =| analyses-compartment ++ +
analyses-compartment = ++ ++ analyses-compartment-contents +
analyses-compartment-contents = analyses-compartment-element* '…'? ++ +
analyses-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CaseBody ++
action-flow-element =| + analysis-def + | analysis ++
subject-actors-stakeholders-node =| analysis | analysis-def ++
definition-node =| verification-def ++ +
verification-def = ++ ++
verification-def-name-compartment = + '«' DefinitionPrefix 'verification' 'def' '»' + definition-name-with-alias ++
usage-node =| verification ++ +
verification = ++ ++
verification-name-compartment = + '«' OccurrenceUsagePrefix 'verification' '»' + usage-name-with-alias ++ +
verify-requirement-node = ++ ++
verify-requirement-name-compartment = + '«' OccurrenceUsagePrefix 'verify' 'requirement' '»' + usage-name-with-alias ++
usage-node =| verify-requirement-node ++
compartment =| + verifications-compartment + | verifies-compartment + | verification-methods-compartment ++ +
verifications-compartment = ++ ++ verifications-compartment-contents +
verifications-compartment-contents = (verifications-compartment-element)* '…'? ++ +
verifications-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CaseBody '…' ++ +
verifies-compartment = ++ ++ verifies-compartment-contents +
verifies-compartment-contents = (verifies-compartment-element)* '…'? ++ +
verifies-compartment-element = el-prefix? MemberPrefix RequirementVerificationUsage '…' ++ +
verification-methods-compartment = ++ ++ verification-methods-compartment-contents +
verification-methods-compartment-contents = (verification-methods-compartment-element)* '…'? ++ +
verification-methods-compartment-element = MetadataBody ++
action-flow-element =| + verification-def + | verification ++
general-relationship =| verify-relationship ++ +
verify-relationship = +++
subject-actors-stakeholders-node =| verification | verification-def ++
definition-node =| use-case-def ++ +
use-case-def = ++ ++
use-case-def-name-compartment = + '«' DefinitionPrefix 'use' 'case' 'def' '»' + definition-name-with-alias ++
usage-node =| + use-case + | include-use-case-usage ++ +
use-case = ++ ++
use-case-name-compartment = + '«' OccurrenceUsagePrefix 'use' 'case' '»' + usage-name-with-alias ++ +
include-use-case-usage = ++ ++
include-use-case-name-compartment = + '«include use case»' + requirement-name-compartment ++
compartment =| + use-cases-compartment + | include-actions-compartment + | includes-compartment ++ +
use-cases-compartment = ++ ++ use-cases-compartment-contents +
use-cases-compartment-contents = use-cases-compartment-element* '…'? ++ +
use-cases-compartment-element = el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration ++ +
include-use-cases-compartment = ++ ++ include-use-cases-compartment-contents +
include-use-cases-compartment-contents = (include-use-cases-compartment-element)* '…'? ++ +
include-use-cases-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) + ( ValuePart | ActionUsageParameterList )? CaseBody ++ +
includes-compartment = ++ ++ includes-compartment-contents +
includes-compartment-contents = (includes-compartment-element)* '…'? ++ +
includes-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) ++
action-flow-element =| + use-case-def + | use-case ++
general-relationship =| include-use-case-relationship ++ +
include-use-case-relationship = +++
subject-actors-stakeholders-node =| use-case | use-case-def ++
root-view = + framed-view ++
definition-node =| + viewpoint-def + | view-def ++ +
viewpoint-def = ++ ++
viewpoint-def-name-compartment = + '«' DefinitionPrefix 'viewpoint' 'def' '»' + definition-name-with-alias ++ +
view-def = ++ ++
view-def-name-compartment = + '«' DefinitionPrefix 'view' 'def' '»' + definition-name-with-alias ++
usage-node =| + viewpoint + | view + | framed-view ++ +
viewpoint = ++ ++
viewpoint-name-compartment = + '«' OccurrenceUsagePrefix 'viewpoint' '»' + usage-name-with-alias ++ +
view = ++ ++
view-name-compartment = + '«' OccurrenceUsagePrefix 'view' '»' + usage-name-with-alias ++
compartment =| + views-compartment + | viewpoints-compartment + | exposes-compartment + | filters-compartment + | rendering-compartment ++ +
views-compartment = ++ ++ views-compartment-contents +
views-compartment-contents = (views-compartment-element)* '…' ++ +
views-compartment-element = + el-prefix? OccurrenceUsagePrefix UsageDeclaration? ValueOrFlowPart? ViewBody ++ +
viewpoints-compartment = ++ ++ viewpoints-compartment-contents +
viewpoints-compartment-contents = (viewpoints-compartment-element)* '…'? ++ +
viewpoints-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration RequirementBody ++ +
exposes-compartment = ++ ++ exposes-compartment-contents +
exposes-compartment-contents = exposes-compartment-element* '…'? ++ +
exposes-compartment-element = MembershipExpose | NamespaceExpose ++ +
filters-compartment = ++ ++ filters-compartment-contents +
filters-compartment-contents = (filters-compartment-element)* '…'? ++ +
filters-compartment-element = el-prefix? MemberPrefix OwnedExpression ++ +
rendering-compartment = ++ ++ rendering-compartment-contents +
rendering-compartment-contents = usage-cp* '…'? ++
interconnection-element =| + viewpoint-def + | viewpoint + | view-def + | view ++ +
framed-view = ++ ++
frameless-view = + general-view + | interconnection-view + | action-flow-view + | state-transition-view + | sequence-view ++ +
view-frame-name-compartment = '«view»' QualifiedName (':' QualifiedName)?
+
+
+view-frame-info-contents = Expose? ElementFilterMember? AnnotatingElement* ++ +
view-frame-info-compartment-tr = ++ ++
view-frame-info-compartment-bl = ++ ++
view-frame-info-compartment-br = +++
general-relationship =| expose-relationship ++ +
expose-relationship = + expose-r | toplevel-expose-r | recursive-expose-r ++ +
expose-r = ++ ++
toplevel-expose-r = ++ ++
recursive-expose-r = +++
// Note. The view frame info compartments are optional elements. The AnnotatingElement* enables adding any relevant supporting information related to a view, possibly using a configurable rendering. +
+// Note. A model library in Section 9.2.18 defines standard graphical view definitions for SysML. These may be supplemented by further, customized view definitions specific to a model. +
+annotation-node =| metadata-feature-annotation-node ++ +
metadata-feature-annotation-node = ++ ++
metadata-feature-decl = Identification ++ +
metadata-feature-name-value-list = + ( metadata-feature-name '=' expression-text )* ++ +
metadata-feature-name = Identification ++ +
expression-text = text-block ++ +
metadata-def = ++ ++
metadata-def-name-compartment = + '«' BasicUsagePrefix? keyword* 'metadata' 'def' '»' + definition-name-with-alias ++
// End of BNF
+
+
+// action-flow-element = +// action | action-flow-node | action-flow-relationship | action-ref | analysis | analysis-def | calc +// | calc-def | use-case | use-case-def | verification | verification-def + ++
+// annotation-node = +// metadata-feature-annotation-node + ++
+// compartment = +// action-flow-compartment | actions-compartment | actors-compartment | allocations-compartment +// | analyses-compartment | assert-constraints-compartment | assert-constraints-compartment | assume-constraints-compartment +// | attributes-compartment | calcs-compartment | connections-compartment | constraints-compartment +// | constraints-compartment | directed-features-compartment | ends-compartment | enums-compartment +// | exhibit-states-compartment | exposes-compartment | features-compartment | filters-compartment | flows-compartment +// | frames-compartment | general-compartment | include-actions-compartment | includes-compartment +// | individuals-compartment | interconnection-compartment | interfaces-compartment | items-compartment +// | objective-compartment | occurrences-compartment | package-compartment | parameters-compartment | parts-compartment +// | perform-actions-compartment | ports-compartment | rendering-compartment | require-constraints-compartment +// | requirements-compartment | result-compartment | satisfies-compartment | satisfy-requirements-compartment +// | sequence-compartment | snapshots-compartment | stakeholders-compartment | state-actions-compartment +// | state-transition-compartment | states-compartment | subject-compartment | successions-compartment +// | timeslices-compartment | use-cases-compartment | variant-elementusages-compartment | variants-compartment +// | verification-methods-compartment | verifications-compartment | verifies-compartment | viewpoints-compartment +// | views-compartment + ++
+// connection-relationship = +// flow | flow-on-connection | interface-connection | message-connection | succession-flow + ++
+// definition-node = +// action-def | allocation-def | analysis-def | attribute-def | calc-def | concern-def | connection-def +// | constraint-def | enumeration-def | event-occurrence-def | extended-def | flow-def | interface-def +// | item-def | n-ary-def-connection-dot | occurrence-def | part-def | port-def | requirement-def +// | state-def | use-case-def | verification-def | view-def | viewpoint-def + ++
+// dependencies-and-annotations-element = +// annotation-link | annotation-node | dependencies-element + ++
+// dependencies-element = +// binary-dependency | n-ary-dependency + ++
+// general-node = +// definition-node | namespace-node | type-node | usage-node + ++
+// general-relationship = +// allocate-relationship | assert-edge | assume-edge | connection-def-graphical | exhibit-edge +// | expose-relationship | frame-edge | frame-relationship | import | include-use-case-relationship +// | n-ary-def-segment | owned-membership | portion-relationship | recursive-import | require-edge +// | satisfy-edge | top-level-import | type-relationship | unowned-membership | verify-relationship + ++
+// general-view = +// interconnection-view + ++
+// interconnection-element = +// attribute | concern | concern-stakeholder-link | connection | connection-def | connection-relationship +// | constraint | constraint-ref | distinguished-parameter | distinguished-parameter-link | flow | flow-def +// | interface | item | item-ref | part | part-ref | port-def | port-usage | requirement +// | requirement-ref | view | view-def | viewpoint | viewpoint-def + ++
+// interconnection-view = +// dependencies-and-annotations-element | ellipsis-at-lower-left-corner | interconnection-element + ++
+// namespace-node = +// package-node | type-node + ++
+// subject-actors-stakeholders-node = +// analysis | analysis-def | requirement | use-case | use-case-def | verification | verification-def + ++
+// usage-edge = +// allocate-relationship | binding-connection | connection-graphical | exhibit-edge | flow | message +// | perform-edge | st-succession | succession | succession-flow | transition + ++
+// usage-node = +// action | allocation | analysis | assert-constraint-node | assume-constraint-node | attribute | calc +// | connection | enumeration | event-occurrence | exhibit-state-usage | extended-usage | flow-node +// | frame-concern-node | framed-view | include-use-case-usage | interface | item | n-ary-connection-dot +// | occurrence | occurrence-ref | part | perform-action-usage | port-usage | require-constraint-node +// | state | timeslice-or-snapshot-node | use-case | verification | verify-requirement-node | view +// | viewpoint + ++ + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected.kgbnf b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected.kgbnf new file mode 100644 index 000000000..40b8f93a2 --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected.kgbnf @@ -0,0 +1,2271 @@ +// Source document: tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-marked_up.kgbnf +// Generated by bnf_grammar_processor at: 2025-12-04T19:29:18Z + + +// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html +// Generated by bnf_grammar_processor at: 2025-11-28T15:06:37Z + +// Corrected manually by HP de Koning + +// Part 2 - Systems Modeling Language (SysML) + +// Clause 8.2.3 Graphical Notation + +// Clause 8.2.3.1 Graphical Notation Overview + +// Clause 8.2.3.2 Elements and Relationships Graphical Notation + +element = + dependencies-and-annotations-element + | general-element + | element-inside-textual-compartment + +compartment =| general-compartment + +general-compartment = +
// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html
+// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z
+
element = + dependencies-and-annotations-element + | general-element + | element-inside-textual-compartment ++
compartment =| general-compartment ++ +
general-compartment = ++ ++ general-view +
general-view = + (general-element)* + (dependencies-and-annotations-element)* + (ellipsis-at-lower-left-corner)? ++ +
ellipsis-at-lower-left-corner = '...' ++ +
general-element = + general-node + | general-relationship ++ +
element-node = + usage-node | definition-node | annotation-node | namespace-node ++ +
element-inside-textual-compartment = ++ ++
rel-name = + Identification + | QualifiedName ++
// Note. An element inside a textual compartment is selected by graying out a substring containing the element. The grayed-out section must cover a single element within the textual syntax inside the compartment.
+dependencies-and-annotations-element =| dependencies-element ++
dependencies-element =| + binary-dependency + | n-ary-dependency ++ +
binary-dependency = ++ ++
n-ary-dependency = + &n-ary-association-dot (n-ary-dependency-client-or-supplier-link &element-node)+ ++ +
n-ary-dependency-client-or-supplier-link = + n-ary-dependency-client-link + | n-ary-dependency-supplier-link ++ +
n-ary-association-dot = ++ ++
n-ary-dependency-client-link = ++ ++
n-ary-dependency-supplier-link = ++ ++
element-node = + usage-node | definition-node | annotation-node | namespace-node ++
// Note. An n-ary dependency must have two or more client elements or two or more supplier elements.
+dependencies-and-annotations-element =| + annotation-node + | annotation-link ++ +
annotation-node = + comment-node + | documentation-node + | textual-representation-node ++ +
text-block = (LINE_TEXT)* ++ +
comment-node = + comment-without-keyword + | comment-with-keyword ++ +
comment-without-keyword = ++ ++
comment-with-keyword = ++ ++
documentation-node = ++ ++
documentation-compartment = ++ ++ Identification + text-block +
textual-representation-node = ++ ++
language-string = 'language' '=' STRING_VALUE ++ +
annotation-link = ++ ++
annotated-element = + element + | element-inside-textual-compartment ++
// Note. A comment node may be attached to zero, one, or more than one annotated elements. All other annotation nodes must be attached to one and only one annotated element.
+general-node =| namespace-node ++
namespace-node =| package-node ++ +
package-node = + package-with-name-inside + | package-with-name-in-tab + | imported-package-with-name-inside + | imported-package-with-name-in-tab ++ +
package-with-name-inside = ++ ++
package-with-name-in-tab = ++ ++
imported-package-with-name-inside = ++ ++
imported-package-with-name-in-tab = ++ ++
package-compartment = + general-compartment + | documentation-compartment + | packages-compartment + | members-compartment + | relationships-compartment ++
compartment =| package-compartment ++ +
packages-compartment = ++ ++ packages-compartment-contents +
packages-compartment-contents = packages-compartment-element* '…'? ++ +
packages-compartment-element = el-prefix? Identification ++ +
members-compartment = ++ ++ members-compartment-contents +
members-compartment-contents = members-compartment-element* '…'? ++ +
members-compartment-element = el-prefix? (DefinitionElement | UsageElement) ++ +
relationships-compartment = ++ ++ relationships-compartment-contents +
relationships-compartment-contents = (relationships-compartment-element)* '…'? ++ +
relationships-compartment-element = el-prefix? relationship-name QualifiedName ++ +
relationship-name = 'defines', 'defined by', 'specializes', 'specialized by', 'connect to', + 'subsets', 'subsetted by', 'performs', 'performed by', 'allocated', 'allocated to', + 'satisfy', 'satisfied by' ++
general-relationship =| + import + | top-level-import + | recursive-import + | owned-membership + | unowned-membership ++ +
import = ++ ++
top-level-import = ++ ++
recursive-import = ++ ++
owned-membership = ++ ++
unowned-membership = +++
general-node =| type-node ++ +
type-node = + definition-node + | usage-node ++ +
general-node |= usage-node definition-node< ++
namespace-node =| type-node ++ +
definition-name-with-alias =
+ DefinitionDeclaration
+ ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )?
+
+
+usage-name-with-alias =
+ '^'? UsageDeclaration
+ ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )?
+
+
+compartment-stack = (compartment)* ++
compartment =| + | features-compartment + | variants-compartment + | variant-elementusages-compartment ++ +
features-compartment = ++ ++ features-compartment-contents +
features-compartment-contents = (features-compartment-element)* '…'? ++ +
features-compartment-element = el-prefix? UsagePrefix usage-cp ++ +
variants-compartment = ++ ++ variants-compartment-contents +
variants-compartment-contents = members-compartment-contents ++ +
variant-elementusages-compartment = +++ variants-compartment-contents +
general-relationship =| + type-relationship ++ +
type-relationship = + subclassification + | subsetting + | definition + | redefinition + | composite-feature-membership + | noncomposite-feature-membership ++ +
subclassification = ++ ++
definition = ++ ++
subsetting = ++ ++
reference-subsetting = ++ ++
redefinition = ++ ++
composite-feature-membership = ++ ++
noncomposite-feature-membership = ++ ++
el-prefix = '^' | '/' ++ +
usage-cp = usageDeclaration ValuePart? ++ +
extended-def = ++ ++
extended-def-name-compartment = + '«' BasicDefinitionPrefix? DefinitionExtensionKeyword+ 'def' '»' + definition-name-with-alias ++
// Note. This production is only valid for cases where one or more
+ +DefinitionExtensionKeyword names a MetadataDefinition that is a direct ++ +
or indirect specialization of KerML metaclass SemanticMetadata. ++ +
definition-node |= extended-def ++ +
extended-usage = ++ ++
extended-usage-name-compartment = + '«' BasicUsagePrefix? UsageExtensionKeyword+ '»' + usage-name-with-alias ++
// Note. This production is only valid for cases where one or more
+ +UsageExtensionKeyword names a MetadataDefinition that is a direct ++ +
or indirect specialization of KerML metaclass SemanticMetadata. ++ +
usage-node |= extended-usage ++
definition-node =| attribute-def ++ +
attribute-def = ++ ++
attribute-def-name-compartment = + '«' DefinitionPrefix 'attribute' 'def' '»' + definition-name-with-alias ++
usage-node =| attribute ++ +
attribute = ++ ++
attribute-name-compartment = + '«' UsagePrefix 'attribute' '»' + usage-name-with-alias ++
compartment =| attributes-compartment ++ +
attributes-compartment = ++ ++ attributes-compartment-contents +
attributes-compartment-contents = (attributes-compartment-element)* '…'? ++ +
attributes-compartment-element = el-prefix? UsagePrefix usage-cp ++
definition-node =| enumeration-def ++ +
enumeration-def = ++ ++
enumeration-def-name-compartment = + '«' DefinitionPrefix 'enum' 'def' '»' + definition-name-with-alias ++
usage-node =| enumeration ++ +
enumeration = ++ ++
enumeration-name-compartment = + '«' UsagePrefix 'enum' '»' + usage-name-with-alias ++
compartment =| enums-compartment ++ +
enums-compartment = ++ ++ enums-compartment-contents +
enums-compartment_contents = (enums-compartment-element)* '…'? ++ +
enums-compartment-element = el-prefix? UsagePrefix usage-cp ++
definition-node =| occurrence-def ++
general-relationship =| portion-relationship ++ +
occurrence-def = ++ ++
occurrence-def-name-compartment = + '«' DefinitionPrefix 'occurrence' 'def' '»' + definition-name-with-alias ++
usage-node =| + occurrence + | occurrence-refxfx + | timeslice-or-snapshot-node ++ +
occurrence = ++ ++
occurrence-ref = ++ ++
occurrence-name-compartment = + '«' OccurrenceUsagePrefix 'occurrence' '»' + usage-name-with-alias ++ +
timeslice-or-snapshot-node = + timeslice + | snapshot ++ +
timeslice = ++ ++
timeslice-name-compartment = + '«timeslice»' + usage-name-with-alias ++ +
snapshot = ++ ++
snapshots-name-compartment + '«snapshot»' + usage-name-with-alias ++ +
event-occurrence-def = ++ ++
event-occurrence-def-name-compartment = + '«' DefinitionPrefix 'event' 'occurrence' 'def' '»' + definition-name-with-alias ++ +
definition-node |= event-occurrence-def ++ +
event-occurrence = ++ ++
event-occurrence-name-compartment = + '«' OccurrenceUsagePrefix 'event' 'occurrence' '»' + usage-name-with-alias ++ +
usage-node |= event-occurrence ++ +
event-edge = ++ ++
eventer = usage-node | definition-node< ++ +
portion-relationship = +++
compartment =| + occurrences-compartment + | individuals-compartment + | timeslices-compartment + | snapshots-compartment + | sequence-compartment ++ +
occurrences-compartment = ++ ++ occurrences-compartment-contents +
occurrences-compartment-contents = (occurrences-compartment-element)* '…'? ++ +
occurrences-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++ +
individuals-compartment = ++ ++ individuals-compartment-contents +
individuals-compartment-contents = (individuals-compartment-element)* '…'? ++ +
individuals-compartment-element = occurrences-compartment-element ++ +
timeslices-compartment = ++ ++ timeslices-compartment-contents +
timeslices-compartment-contents = (timeslices-compartment-element)* '…'? ++ +
timeslices-compartment-element = occurrences-compartment-element ++ +
snapshots-compartment = ++ ++ snapshots-compartment-contents +
snapshots-compartment-contents = (snapshots-compartment-element)* '…'? ++ +
snapshots-compartment-element = occurrences-compartment-element ++ +
sequence-compartment = ++ ++ sequence-view +
sequence-view = (sq-graphical-element)* ++ +
sq-graphical-element = + sq-graphical-node + | sq-graphical-relationship + | dependencies-and-annotations-element ++ +
sq-graphical-node = sq-head-node | lifeline ++ +
sq-head-node = sq-part | sq-port ++ +
sq-part = ++ ++
sq-port = ++ ++
sq-port-label = UsageDeclaration ++ +
sq-l-node = + lifeline + | sq-proxy ++ +
lifeline = ++ ++
sq-proxy = ++ ++ | +
+
proxy-label = '.'? FeatureChainMember ++ +
sq-graphical-relationship = message | sq-succession ++ +
succession-label = UsageDeclaration? ++ +
sq-succession = ++ ++
succession-label = Identification ++
// Note: the proxy nodes attached to a succession must refer to an event
+definition-node =| item-def ++ +
interconnection-element = | item| item-ref ++ +
item-def = ++ ++
item-def-name-compartment = + '«' DefinitionPrefix 'item' 'def' '»' + definition-name-with-alias ++
usage-node =| item ++ +
item = ++ ++
item-name-compartment = + '«' OccurrenceUsagePrefix 'item' '»' + usage-name-with-alias ++ +
item-ref = +++
compartment =| items-compartment ++ +
items-compartment = ++ ++ items-compartment-contents +
items-compartment-contents = (items-compartment-element)* '…' ++ +
items-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++
definition-node =| part-def ++ +
interconnection-element = | part | part-ref ++ +
part-def = ++ ++
part-def-name-compartment = + '«' DefinitionPrefix 'part' 'def' '»' + definition-name-with-alias ++
usage-node =| part ++ +
part = ++ ++
part-name-compartment = + '«' OccurrenceUsagePrefix 'part' '»' + usage-name-with-alias ++ +
part-ref = +++
compartment =| + parts-compartment + | directed-features-compartment + | interconnection-compartment ++ +
parts-compartment = ++ ++ parts-compartment-contents +
parts-compartment-contents = (parts-compartment-element)* '…'? ++ +
parts-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++ +
directed-features-compartment = ++ ++ directed-features-compartment-contents +
directed-features-compartment-contents = (directed-features-compartment-element)* '…'? ++ +
directed-features-compartment-element = + el-prefix FeatureDirection Definition-Body-Item* ++ +
interconnection-compartment = +++ interconnection-view +
interconnection-view =| + (interconnection-element)* + (dependencies-and-annotations-element)* + (ellipsis-at-lower-left-corner)? ++
general-view =| interconnection-view ++
definition-node =| port-def ++ +
port-def = ++ ++
port-def-name-compartment = + '«' DefinitionPrefix 'port' 'def' '»' + definition-name-with-alias ++
usage-node =| port-usage ++ +
port-usage = ++ ++
port-name-compartment = + '«' OccurrenceUsagePrefix 'port' '»' + usage-name-with-alias ++
compartment =| ports-compartment ++ +
ports-compartment = ++ ++ ports-compartment-contents +
ports-compartment-contents = (ports-compartment-element)* '…'? ++ +
ports-compartment-element = el-prefix? OccurrenceUsagePrefix usage-cp ++
interconnection-element =| port-def | port ++ +
pdh = ++ ++ | +
+ | +
+
pdv = ++ ++ | +
+ | +
+
port-l = ++ ++ | +
+ | +
+ | + proxy-v +
port-r = ++ ++ | +
+
| ++ ++ | + proxy-v +
port-t = ++ ++ | +
+ | +
+ | + proxy-h +
port-b = ++ ++ | +
+ | +
+ | + proxy-h +
port-label = QualifiedName (':' QualifiedName)?
+
+
+proxy-v = ++ ++ | +
+
proxy-h = +++ | +
+
// Note. Dotted line port productions (references) are only possible for nested ports
+// Note. The proxy option of a port production is valid only on a part usage contained within an interconnection view.
+definition-node =| connection-def ++ +
connection-def = ++ ++
connection-def-name-compartment = + '«' DefinitionPrefix 'connection' 'def' '»' + definition-name-with-alias ++
usage-node =| connection ++ +
connection = ++ ++
connection-name-compartment = + '«' OccurrenceUsagePrefix 'connection' '»' + usage-name-with-alias ++
compartment =| connections-compartment ++ +
connections-compartment = ++ ++ connections-compartment-contents +
connections-compartment-contents = (connections-compartment-element)* '…'? ++ +
connections-compartment-element = + el-prefix? OccurrenceUsagePrefix UsageDeclaration ++
interconnection-element =| + connection-def + | connection + | connection-relationship + | attribute ++ +
connection-relationship = + binding-connection + | connection-graphical + | n-ary-connection + | n-ary-connection-def + | connection-definition-elaboration + | connection-usage-elaboration + | connection-def-graphical ++ +
connection-graphical = ++ ++ | +
+
c-adornment = + (a-property | a-direction | a-subsetting |a-redefinition)* ++ +
a-property = + 'ordered' | 'nonunique' | 'abstract' | 'derived' | 'readonly' ++ +
a-direction = + 'in' | 'out' | 'inout' ++ +
a-subsetting =
+ 'subsets' OwnedSubsetting (',' OwnedSubsetting)*
+
+
+a-redefinition =
+ 'redefines' OwnedRedefinition (',' OwnedRedefinition)*
+
+
+connection-end = usage-node | usage-edge ++
usage-edge =| connection-graphical | binding-connection ++ +
connection-label = UsageDeclaration ++ +
connection-def-graphical = ++ ++ | +
general-relationship |= connection-def-graphical +
cdef-label = Identification ++ +
n-ary-connection-def = + n-ary-def-connection-dot n-ary-def-segment+ ++ +
n-ary-def-connection-dot = ++ ++
n-ary-def-segment = ++ ++
definition-node |= n-ary-def-connection-dot ++ +
general-relationship |= n-ary-def-segment ++ +
n-ary-connection = + n-ary-connection-dot n-ary-segment+ ++ +
n-ary-connection-dot = ++ ++
usage-node |= n-ary-connection-dot ++ +
cdot-label = UsageDeclaration ++ +
n-ary-segment = ++ ++
binding-connection = ++ ++
rolename = Identification? ++ +
multiplicity = MultiplicityRange? ++ +
connection-definition-elaboration = ++ ++
connection-usage-elaboration = +++
// Note. The usage-nodes at the ends of a binding-connection must be of compatible types.
+definition-node =| interface-def ++
interconnection-element =| interface ++ +
interface-def = ++ ++
interface-def-name-compartment = + '«' DefinitionPrefix 'interface' 'def' '»' + definition-name-with-alias< ++
usage-node =| interface ++ +
interface = ++ ++
interface-name-compartment = + '«' OccurrenceUsagePrefix 'interface' '»' + usage-name-with-alias ++
compartment =| + interfaces-compartment + | ends-compartment ++ +
interfaces-compartment = ++ ++ interfaces-compartment-contents +
interfaces-compartment-contents = (interfaces-compartment-element)* '…'? ++ +
interfaces-compartment-element = + el-prefix? OccurenceUsagePrefix InterfaceUsageDeclaration ++ +
ends-compartment = ++ ++ ends-compartment-contents +
ends-compartment-contents = (ends-compartment-element)* '…'? ++ +
ends-compartment-element = QualifedName (':' QualifiedName)?
+
+
+connection-relationship = + | interface-connection ++ +
interface-connection = ++ ++
interface-label = UsageDeclaration? ++
definition-node =| allocation-def ++ +
allocation-def = ++ ++
allocation-def-name-compartment = + '«' DefinitionPrefix 'allocation' 'def' '»' + definition-name-with-alias ++
usage-node =| allocation ++ +
allocation = ++ ++
allocation-name-compartment = + '«' OccurrenceUsagePrefix 'allocation' '»' + usage-name-with-alias ++
compartment =| allocations-compartment ++ +
allocations-compartment = ++ ++ allocations-compartment-contents +
allocations-compartment-contents = (allocations-compartment-element)* '…'? ++ +
allocations-compartment-element = + el-prefix? OccurrenceUsagePrefix AllocationUsageDeclaration UsageBody* ++
general-relationship =| allocate-relationship ++ +
allocate-relationship = ++ ++
allocation-node = + general-node + | element-in-textual-compartment ++ +
usage-edge = |allocate-relationship ++
definition-node =| flow-def ++ +
flow-def = ++ ++
flow-def-name-compartment = + '«' DefinitionPrefix 'succession'? 'flow' 'def' '»' + definition-name-with-alias ++
usage-node =| flow-node ++ +
flow-node = ++ ++
flow-name-compartment = + '«' OccurrenceUsagePrefix ( 'message' | 'succession'? 'flow' ) '»' + usage-name-with-alias ++
compartment =| flows-compartment ++ +
flows-compartment = + + 'flows' + flows-compartment-contents ++ +
flows-compartment-contents = (flows-compartment-element)* '...'? ++ +
flows-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( 'message' MessageDeclaration + | 'succession'? FlowDeclaration + ) ++
interconnection-element =| + flow-def + | flow ++
connection-relationship =| + message-connection + | flow + | succession-flow + | flow-on-connection ++
usage-edge =| message | flow | succession-flow ++ +
msg-end-node = + occurrence| sq-l-node| item | part | port | action | state + | use-case | verification-case | analysis-case | proxy ++ +
message = +++
// Note: proxy nodes and ends of messages must refer to occurrences
+ +message-label =
+ UsageDeclaration? ('of' FlowPayloadFeatureMember)? | FlowPayloadFeatureMember
+
+
+flow = ++ ++
flow-label =
+ UsageDeclaration? ('of' FlowPayloadFeatureMember)? | FlowPayloadFeatureMember
+
+
+flow-end-node = + parameter | proxy ++
// Note: proxy nodes at ends of flows must refer to directed features
+ +succession-flow = ++ ++
succession-flow-label = flow-label ++ +
flow-on-connection = ++ ++
flow-node = + flow-node-r + | flow-node-l + | sflow-node-r + | sflow-node-l + | message-node-r + | message-node-l ++ +
flow-node-r = ++ ++
flow-node-l = ++ ++
sflow-node-r = ++ ++
sflow-node-l = ++ ++
message-node-r = ++ ++
message-node-l = ++ ++
flow-label = + Identification | FlowPayloadFeatureMember ++
definition-node =| action-def ++ +
action-def = ++ ++
action-def-name-compartment = + '«' DefinitionPrefix 'action' 'def' '»' + definition-name-with-alias< ++
usage-node =| + action + | perform-action-usage ++ +
action = ++ ++
action-name-compartment = + '«' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias< ++ +
perform-action-usage = ++ ++
action-ref = ++ ++
perform-action-name-compartment = + '«' OccurrenceUsagePrefix 'perform' 'action' '»' + usage-name-with-alias ++
compartment =| + actions-compartment + | perform-actions-compartment + | parameters-compartment + | action-flow-compartment ++ +
actions-compartment = ++ ++ actions-compartment-contents +
actions-compartment-contents = (actions-compartment-element)* '…'? ++ +
actions-compartment-element = + el-prefix? OccurrenceUsagePrefix ActionUsageDeclaration ++ +
perform-actions-compartment = ++ ++ perform-actions-compartment-contents +
perform-actions-compartment-contents = (perform-actions-compartment-element)* '…'? ++ +
perform-actions-compartment-element = + el-prefix? OccurrenceUsagePrefix PerformActionUsageDeclaration ++ +
parameters-compartment = ++ ++ parameters-compartment-contents +
parameters-compartment-contents = (parameters-compartment-element)* '…'? ++ +
parameters-compartment-element = + el-prefix? FeatureDirection UsageDeclaration ValueOrFlowPart? DefinitionBodyItem* ++ +
performed-by-compartment = ++ ++ performed-by-compartment-contents +
performed-by-compartment-contents = QualifiedName* '…'? ++ +
action-flow-compartment = ++ ++ action-flow-view +
action-flow-view = + (dependencies-and-annotations-element)* + (action-flow-element)* + (perform-action-swimlanes)? ++
action-flow-element =| + action-ref + | action + | action-flow-node + | action-flow-relationship ++ +
action-flow-node = + start-node + | done-node + | terminate-node + | fork-node + | join-node + | decision-node + | merge-node + | send-action-node + | accept-action-node + | while-loop-action-node + | for-loop-action-node + | if-else-action-node + | assign-action-node ++ +
action-flow-relationship = + flow + | aflow-succession + | binding-connection + | else-branch ++ +
param-l = ++ ++ | +
+ | + proxy-v +
param-r = ++ ++ | +
+ | + proxy-v +
param-t = ++ ++ | +
+ | + proxy-h +
param-b = ++ ++ | +
+ | + proxy-h +
param-label = QualifiedName (‘:’ QualifiedName)* ++ +
start-node = ++ ++
done-node = ++ ++
terminate-node = ++ ++
fork-node = ++ ++
join-node = ++ ++
decision-node = ++ ++
merge-node = ++ ++
send-action-node = ++ ++
send-action-name-compartment = + '«' OccurrenceUsagePrefix 'send' 'action' '»' + usage-name-with-alias ++ +
send-action-expression = NodeParameterMember 'to' NodeParameterMember ++ +
accept-action-node = ++ ++
accept-action-name-compartment = + '«' OccurrenceUsagePrefix 'accept' 'action' '»' + usage-name-with-alias ++ +
accept-action-expression = AcceptParameterPart ++ +
while-loop-action-node = ++ ++
while-condition = ++ ++ condition-expression +
until-condition = ++ ++ condition-expression +
while-loop-action-name-compartment = + '«' OccurrenceUsagePrefix 'loop' '»' + usage-name-with-alias ++ +
for-loop-action-node = ++ ++
iteration = ++ ++ iteration-expression +
loop-body = ++ ++ action-body +
for-loop-action-name-compartment = + '«' OccurrenceUsagePrefix 'loop' '»' + usage-name-with-alias ++ +
if-else-action-node = ++ ++
if-condition = ++ ++ condition-expression +
then-body = ++ ++ action-body +
else-body = ++ ++ action-body +
ifelse-action-name-compartment = + '«' OccurrenceUsagePrefix 'if' '»' + usage-name-with-alias ++ +
action-body = + action-body-textual | action-flow-view ++ +
condition-expression = + ExpressionParameterMember ++ +
iteration-expression = + ForVariableDeclarationMember 'in' NodeParameterMember ++ +
action-body-textual = + ActionBodyParameterMember ++ +
assign-action-node = ++ ++
assign-action-name-compartment = + '«' OccurrenceUsagePrefix 'assign' '»' + usage-name-with-alias ++ +
perform-actions-swimlanes = (swimlane)* ++ +
swimlane = ++ ++
parameter = + param-l | param-r | param-t | param-b ++ +
aflow-succession = ++ ++
else-branch = ++ ++
perform-edge = ++ ++
performer-node = part | action | part-def | action-def | distinguished-parameter ++ +
usage-edge = |succession perform-edge ++ +
guard-expression = '[' OwnedExpression ']' ++
// Note. All swimlanes are attached to each other on vertical edges and aligned along the top and bottom horizontal edges.
+// Note. The proxy option of a parameter production is valid only on an action usage contained within an action flow view.
+definition-node =| state-def ++ +
state-def = ++ ++
state-def-name-compartment =
+ '«' DefinitionPrefix 'state' 'def' '»'
+ definition-name-with-alias
+ ('«' 'parallel' '»')?
+
+usage-node =| + state-node + | exhibit-state-usage ++ +
state = ++ ++
state-ref = ++ ++
state-name-compartment =
+ '«' OccurrenceUsagePrefix 'state' '»'
+ usage-name-with-alias
+ ('«' 'parallel' '»')?
+
+
+exhibit-state-usage = ++ ++
state-subaction-body = state-subaction-body-textual | action-flow-view ++ +
state-subaction-body-textual = state-subaction-declaration? ( '{' ActionBodyItem* '}' )?
+
+
+state-subaction-declaration = + PerformActionUsageDeclaration + | AcceptNodeDeclaration + | SendNodeDeclaration + | AssignmentNodeDeclaration ++ +
state-do-action = ++ ++ state-subaction-body +
state-entry-action = ++ ++ state-subaction-body +
state-exit-action = ++ ++ state-subaction-body +
entry-action = ++ +| +
+
entry-action-name-comp = ++ +
'«' 'entry' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
exit-action = ++ ++
exit-action-name-comp = ++ +
'«' 'exit' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
do-action = ++ ++
do-action-name-comp = ++ +
'«' 'do' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias ++ +
exhibit-state-name-compartment = + '«exhibit-state»' + state-name-compartment ++
compartment =| + states-compartment + | states-actions-compartment + | exhibit-states-compartment + | successions-compartment + | state-transition-compartment ++ +
states-compartment = ++ ++ states-compartment-contents +
states-compartment-contents = (states-compartment-element)* '…'? ++ +
states-compartment-element = + el-prefix? OccurrencePrefix ActionUsageDeclaration ++ +
state-actions-compartment = ++ ++ state-actions-compartment-contents +
state-actions-compartment-contents = (state-actions-compartment-element)* '…'? ++ +
state-actions-compartment-element = + el-prefix? EntryActionMember | DoActionMember | ExitActionMember ++ +
exhibit-states-compartment = ++ ++ exhibit-states-compartment-contents +
exhibit-states-compartment-contents = exhibit-state-scompartment-element* '…'? ++ +
exhibit-states-compartment-element-compartment = UsageDeclaration ++ +
succession-compartment = ++ ++ succession-compartment-contents +
succession-compartment-contents = QualifiedName* '…'? ++ +
state-transition-compartment = ++ ++ state-transition-view +
state-transition-view = + (state-transition-element)* + (dependencies-and-annotations-element)* ++ +
state-transition-element = + state-transition-node + | transition + | st-succession ++ +
state-transition-node = + state-node + | state-ref-node + | start-node + | entry-action + | do-action + | exit-action + | done-node + | fork-node + | join-node + | decision-node + | merge-node + | terminate-node + | action + | perform-action-usage + | action-ref ++ +
transition = ++ ++ | +
+
state-source = + state-node | state-ref-node ++ +
transition-label = trigger-expression '/' ActionUsage ++ +
trigger-expression = AcceptParameterPart (guard-expression)? ++ +
st-succession = ++ ++ | +
+
exhibit-edge = ++ ++
exhibitor = part | part-def ++ +
general-relationship |= exhibit-edge ++ +
usage-edge = |transition | st-succession | exhibit-edge ++
definition-node =| calc-def ++ +
calc-def = ++ ++
calc-def-name-compartment = + '«' DefinitionPrefix 'calc' 'def' '»' + definition-name-with-alias ++
usage-node =| calc ++ +
calc = ++ ++
calc-name-compartment = + occurrence-name-prefix + '«' 'ref'? keyword* 'calc' '»' + definition-name-with-alias ++ +
calc-name-compartment = + '«' OccurrenceUsagePrefix 'calc' '»' + usage-name-with-alias ++
action-flow-element =| + calc-def + | calc ++
compartment =| + calcs-compartment + | result-compartment ++ +
calcs-compartment = ++ ++ calcs-compartment-contents +
calcs-compartment-contents = calcs-compartment-element* '…'? ++ +
calcs-compartment-element = el-prefix? OccurrenceUsagePrefix ActionUsageDeclaration ++ +
results-compartment = ++ ++ result-compartment-contents +
result-compartment-contents = OwnedExpression ++
definition-node =| constraint-def ++ +
constraint-def = ++ ++
constraint-def-name-compartment = + '«' DefinitionPrefix 'constraint' 'def' '»' + definition-name-with-alias ++ +
usage-node = + constraint + | assert-constraint-usage ++ +
constraint = ++ ++
constraint-ref = ++ ++
constraint-name-compartment = + '«' OccurrenceUsagePrefix 'constraint' '»' + usage-name-with-alias ++ +
assert-constraint-node = ++ ++
assert-constraint-name-compartment = + '«assert constraint»' + constraint-name-compartment ++ +
assume-constraint-node = ++ ++
assume-constraint-name-compartment = + '«' OccurrenceUsagePrefix 'assume' 'constraint' '»' + usage-name-with-alias ++
usage-node =| assume-constraint-node assert-constraint-node< ++ +
assume-edge = ++ ++
assumer = requirement | requirement-def ++ +
general-relationship |= assume-edge ++ +
assert-edge = ++ ++
assertor = usage-node | definition-node ++ +
general-relationship |= assert-edge ++
compartment =| + constraints-compartment + | assert-constraints-compartment ++ +
constraints-compartment = ++ ++ constraints-compartment-contents +
constraints-compartment-contents = (constraints-usage-compartment-element)* '…'? ++ +
constraints-usage-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CalculationBody* ++ +
assert-constraints-compartment = ++ ++ assert-constraints-compartment-contents +
assert-constraints-compartment-contents = (assert-constraints-compartment-element)* '…'? ++ +
assert-constraints-compartment-element = + el-prefix? OccurrenceUsagePrefix ( 'not' )? + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) + CalculationUsageParameterPart CalculationBody ++
interconnection-element =| + constraint-ref + | constraint ++
definition-node =| + requirement-def + | concern-def ++ +
requirement-def = ++ ++
requirement-def-name-compartment = + '«' DefinitionPrefix 'requirement' 'def' '»' + definition-name-with-alias ++ +
usage-node = + requirement + | satisfy-requirement-usage + | concern ++ +
requirement = ++ ++
requirement-ref = ++ ++
requirement-name-compartment = + '«' OccurrenceUsagePrefix 'requirement' '»' + usage-name-with-alias ++ +
satisfy-requirement-usage = ++ ++
satisfy-requirement-name-compartment = + '«satisfy requirement»' + requirement-name-compartment ++ +
concern-def = ++ ++
concern-def-name-compartment = + '«' DefinitionPrefix 'concern' 'def' '»' + definition-name-with-alias ++ +
concern = ++ ++
concern-name-compartment = + '«' OccurrenceUsagePrefix 'concern' '»' + usage-name-with-alias ++
compartment =| + constraints-compartment + | assert-constraints-compartment ++
compartment =| + requirements-compartment + | require-constraints-compartment + | assume-constraints-compartment + | satisfy-requirements-compartment + | satisfies-compartment + | actors-compartment + | subject-compartment + | stakeholders-compartment + | frames-compartment ++ +
requirements-compartment = ++ ++ requirements-compartment-contents +
requirements-compartment-contents = (requirements-compartment-element)* '…'? ++ +
requirements-compartment-element = + OccurrenceUsagePrefix ConstraintUsageDeclaration ++ +
require-constraints-compartment = ++ ++ require-constraints-compartment-contents +
require-constraints-compartment-contents = require-constraint-element* '…'? ++ +
require-constraint-element = + el-prefix? requireMemberPrefix? RequirementConstraintUsage ++ +
assume-constraints-compartment = ++ ++ assume-constraints-compartment-contents +
assume-constraints-compartment-contents = require-constraint-element* '…'? ++ +
satisfy-requirements-compartment = ++ ++ satisfy-requirements-compartment-contents +
satisfy-requirements-compartment-contents = text-block ++ +
satisfies-compartment = ++ ++ satisfies-compartment-contents +
satisfies-compartment-contents = UsageDeclaration* '…'? ++ +
actors-compartment = ++ ++ actors-compartment-contents +
actors-compartment-contents = (actors-compartment-element)* '…'? ++ +
actors-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
subject-compartment = ++ ++ subject-compartment-contents +
subject-compartment-contents = (subject-compartment-element)* '…'? ++ +
subject-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
stakeholders-compartment = ++ ++ stakeholders-compartment-contents +
stakeholders-compartment-contents = (stakeholders-compartment-element)* '…'? ++ +
stakeholders-compartment-element = el-prefix? MemberPrefix usage-cp ++ +
frames-compartment = ++ ++ frames-compartment-contents +
frames-compartment-contents = (frames-compartment-element)* '…'? ++ +
frames-compartment-element = el-prefix* MemberPrefix? FramedConcernUsage ++ +
concerns-compartment = +++ concerns-compartment-contents +
interconnection-element =| + requirement-ref + | requirement + | concern + | distinguished-parameter + | distinguished-parameter-link + | concern-stakeholder-link ++
general-relationship =| frame-relationship ++
subject-actors-stakeholders-node =| requirement ++ +
distinguished-parameter = + subject + | actor + | stakeholder ++ +
subject = ++ ++
actor = ++ ++ | +
+
stakeholder = ++ ++
subject-name = UsageDeclaration ++ +
actor-name = UsageDeclaration ++ +
stakeholder-name = UsageDeclaration ++ +
distinguished-parameter-link = ++ ++
frame-relationship = ++ ++
concern-stakeholder-link = ++ ++
satisfy-edge = ++ ++
satisfier = usage-node | definition-node ++ +
general-relationship |= satisfy-edge ++ +
require-edge = ++ ++
requirer = usage-node | definition-node ++ +
general-relationship |= require-edge ++ +
require-constraint-node = ++ ++
require-constraint-name-compartment = + '«' OccurrenceUsagePrefix 'require' 'constraint' '»' + usage-name-with-alias ++ +
usage-node |= require-constraint-node ++ +
frame-concern-node = ++ ++
frame-concern-name-compartment = + '«' OccurrenceUsagePrefix 'frame' 'concern' '»' + usage-name-with-alias ++ +
usage-node |= frame-concern-node ++ +
frame-edge = ++ ++
framer = requirement | requirement-def | viewpoint | viewpoint-def ++ +
general-relationship |= frame-edge ++
compartment =| objective-compartment ++ +
objective-compartment = ++ ++ objective-compartment-contents +
objective-compartment-contents = (objective-compartment-element)* '…'? ++ +
objective-compartment-element = + comp-prefix? MemberPrefix ConstraintUsageDeclaration RequirementBody ++
definition-node =| analysis-def ++ +
analysis-def = ++ ++
analysis-def-name-compartment = + '«' DefinitionPrefix 'analysis' 'def' '»' + definition-name-with-alias ++
usage-node =| analysis ++ +
analysis = ++ ++
analysis-name-compartment = + '«' OccurrenceUsagePrefix 'analysis' '»' + usage-name-with-alias ++
compartment =| analyses-compartment ++ +
analyses-compartment = ++ ++ analyses-compartment-contents +
analyses-compartment-contents = analyses-compartment-element* '…'? ++ +
analyses-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CaseBody ++
action-flow-element =| + analysis-def + | analysis ++
subject-actors-stakeholders-node =| analysis | analysis-def ++
definition-node =| verification-def ++ +
verification-def = ++ ++
verification-def-name-compartment = + '«' DefinitionPrefix 'verification' 'def' '»' + definition-name-with-alias ++
usage-node =| verification ++ +
verification = ++ ++
verification-name-compartment = + '«' OccurrenceUsagePrefix 'verification' '»' + usage-name-with-alias ++ +
verify-requirement-node = ++ ++
verify-requirement-name-compartment = + '«' OccurrenceUsagePrefix 'verify' 'requirement' '»' + usage-name-with-alias ++ +
usage-node |= verify-requirement-node ++
compartment =| + verifications-compartment + | verifies-compartment + | verification-methods-compartment ++ +
verifications-compartment = ++ ++ verifications-compartment-contents +
verifications-compartment-contents = (verifications-compartment-element)* '…'? ++ +
verifications-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CaseBody '…' ++ +
verifies-compartment = ++ ++ verifies-compartment-contents +
verifies-compartment-contents = (verifies-compartment-element)* '…'? ++ +
verifies-compartment-element = el-prefix? MemberPrefix RequirementVerificationUsage '…' ++ +
verification-methods-compartment = ++ ++ verification-methods-compartment-contents +
verification-methods-compartment-contents = (verification-methods-compartment-element)* '…'? ++ +
verification-methods-compartment-element = MetadataBody ++
action-flow-element =| + verification-def + | verification ++
general-relationship =| verify-relationship ++ +
verify-relationship = +++
subject-actors-stakeholders-node =| verification | verification-def ++
definition-node =| use-case-def ++ +
use-case-def = ++ ++
use-case-def-name-compartment = + '«' DefinitionPrefix 'use' 'case' 'def' '»' + definition-name-with-alias ++
usage-node =| + use-case + | include-use-case-usage ++ +
use-case = ++ ++
use-case-name-compartment = + '«' OccurrenceUsagePrefix 'use' 'case' '»' + usage-name-with-alias ++ +
include-use-case-usage = ++ ++
include-use-case-name-compartment = + '«include use case»' + requirement-name-compartment ++
compartment =| + use-cases-compartment + | include-actions-compartment + | includes-compartment ++ +
use-cases-compartment = ++ ++ use-cases-compartment-contents +
use-cases-compartment-contents = use-cases-compartment-element* '…'? ++ +
use-cases-compartment-element = el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration ++ +
include-use-cases-compartment = ++ ++ include-use-cases-compartment-contents +
include-use-cases-compartment-contents = (include-use-cases-compartment-element* '…'? ++ +
include-use-cases-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) + ( ValuePart | ActionUsageParameterList )? CaseBody ++ +
includes-compartment = ++ ++ includes-compartment-contents +
includes-compartment-contents = (includes-compartment-element)* '…'? ++ +
includes-compartment-element = + el-prefix? OccurrenceUsagePrefix + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) ++
action-flow-element =| + use-case-def + | use-case ++
general-relationship =| include-use-case-relationship ++ +
include-use-case-relationship = +++
subject-actors-stakeholders-node =| use-case | use-case-def ++
root-view = + framed-view< ++
definition-node =| + viewpoint-def + | view-def ++ +
viewpoint-def = ++ ++
viewpoint-def-name-compartment = + '«' DefinitionPrefix 'viewpoint' 'def' '»' + definition-name-with-alias ++ +
view-def = ++ ++
view-def-name-compartment = + '«' DefinitionPrefix 'view' 'def' '»' + definition-name-with-alias ++ +
usage-node |= + viewpoint + | view + | framed-view ++ +
viewpoint = ++ ++
viewpoint-name-compartment = + '«' OccurrenceUsagePrefix 'viewpoint' '»' + usage-name-with-alias ++ +
view = ++ ++
view-name-compartment = + '«' OccurrenceUsagePrefix 'view' '»' + usage-name-with-alias ++
compartment =| + | views-compartment + | viewpoints-compartment + | exposes-compartment + | filters-compartment + | rendering-compartment ++ +
views-compartment = ++ ++ views-compartment-contents +
views-compartment-contents = (views-compartment-element)* '…' ++ +
views-compartment-element = + el-prefix? OccurrenceUsagePrefix UsageDeclaration? ValueOrFlowPart? ViewBody ++ +
viewpoints-compartment = ++ ++ viewpoints-compartment-contents +
viewpoints-compartment-contents = (viewpoints-compartment-element)* '…'? ++ +
viewpoints-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration RequirementBody ++ +
exposes-compartment = ++ ++ exposes-compartment-contents +
exposes-compartment-contents = exposes-compartment-element* '…'? ++ +
exposes-compartment-element = MembershipExpose | NamespaceExpose ++ +
filters-compartment = ++ ++ filters-compartment-contents +
filters-compartment-contents = (filters-compartment-element)* '…'? ++ +
filters-compartment-element = el-prefix? MemberPrefix OwnedExpression ++ +
rendering-compartment = ++ ++ rendering-compartment-contents +
rendering-compartment-contents = usage-cp* '…'? ++
interconnection-element =| + viewpoint-def + | viewpoint + | view-def + | view ++ +
framed-view = ++ ++
frameless-view = + general-view + | interconnection-view + | action-flow-view + | state-transition-view + | sequence-view ++ +
view-frame-name-compartment = '«view»' QualifiedName (':' QualifiedName)?
+
+
+view-frame-info-contents = Expose? ElementFilterMember? AnnotatingElement* ++ +
view-frame-info-compartment-tr = ++ ++
view-frame-info-compartment-bl = ++ ++
view-frame-info-compartment-br = +++
general-relationship =| expose-relationship ++ +
expose-relationship = + expose_r | toplevel-expose-r | recursive-expose-r ++ +
expose_r = ++ ++
toplevel-expose-r = ++ ++
recursive-expose-r = +++
// Note. The view frame info compartments are optional elements. The AnnotatingElement* enables adding any relevant supporting information related to a view, possibly using a configurable rendering.
+// Note. A model library in Section 9.2.18 defines standard graphical view definitions for SysML. These may be supplemented by further, customized view definitions specific to a model.
+annotation-node =| metadata-feature-annotation-node ++ +
metadata-feature-annotation-node = ++ ++
metadata-feature-decl = Identifier ++ +
metadata-feature-name-value-list = + ( metadata-feature-name '=' expression-text )* ++ +
metadata-feature-name = Identifier ++ +
expression-text = text-block ++ +
metadata-def = ++ ++
metadata-def-name-compartment = + basic-name-prefix + '«' keyword* 'metadata' 'def' '»' + definition-name-with-alias ++
// End of BNF + +
++// action-flow-element = +// action | action-flow-node | action-flow-relationship | action-ref | analysis | analysis-def | calc +// | calc-def | use-case | use-case-def | verification | verification-def + ++
+// annotation-node = +// metadata-feature-annotation-node + ++
+// compartment = +// action-flow-compartment | actions-compartment | actors-compartment | allocations-compartment +// | analyses-compartment | assert-constraints-compartment | assert-constraints-compartment | assume-constraints-compartment +// | attributes-compartment | calcs-compartment | connections-compartment | constraints-compartment +// | constraints-compartment | directed-features-compartment | ends-compartment | enums-compartment +// | exhibit-states-compartment | exposes-compartment | features-compartment | filters-compartment | flows-compartment +// | frames-compartment | general-compartment | include-actions-compartment | includes-compartment +// | individuals-compartment | interconnection-compartment | interfaces-compartment | items-compartment +// | objective-compartment | occurrences-compartment | package-compartment | parameters-compartment | parts-compartment +// | perform-actions-compartment | ports-compartment | rendering-compartment | require-constraints-compartment +// | requirements-compartment | result-compartment | satisfies-compartment | satisfy-requirements-compartment +// | sequence-compartment | snapshots-compartment | stakeholders-compartment | state-transition-compartment +// | states-actions-compartment | states-compartment | subject-compartment | successions-compartment +// | timeslices-compartment | use-cases-compartment | variant-elementusages-compartment | variants-compartment +// | verification-methods-compartment | verifications-compartment | verifies-compartment | viewpoints-compartment +// | views-compartment + ++
+// connection-relationship = +// flow | flow-on-connection | message-connection | succession-flow + ++
+// definition-node = +// action-def | allocation-def | analysis-def | attribute-def | calc-def | concern-def | connection-def +// | constraint-def | enumeration-def | flow-def | interface-def | item-def | occurrence-def | part-def +// | port-def | requirement-def | state-def | use-case-def | verification-def | view-def | viewpoint-def + ++
+// dependencies-and-annotations-element = +// annotation-link | annotation-node | dependencies-element + ++
+// dependencies-element = +// binary-dependency | n-ary-dependency + ++
+// general-node = +// namespace-node | type-node + ++
+// general-relationship = +// allocate-relationship | expose-relationship | frame-relationship | import | include-use-case-relationship +// | owned-membership | portion-relationship | recursive-import | top-level-import | type-relationship +// | unowned-membership | verify-relationship + ++
+// general-view = +// interconnection-view + ++
+// interconnection-element = +// attribute | concern | concern-stakeholder-link | connection | connection-def | connection-relationship +// | constraint | constraint-ref | distinguished-parameter | distinguished-parameter-link | flow | flow-def +// | interface | port | port-def | requirement | requirement-ref | view | view-def | viewpoint +// | viewpoint-def + ++
+// interconnection-view = +// (dependencies-and-annotations-element)* | (ellipsis-at-lower-left-corner)? | (interconnection-element)* + ++
+// namespace-node = +// package-node | type-node + ++
+// subject-actors-stakeholders-node = +// analysis | analysis-def | requirement | use-case | use-case-def | verification | verification-def + ++
+// usage-edge = +// binding-connection | connection-graphical | flow | message | succession-flow + ++
+// usage-node = +// action | allocation | analysis | assert-constraint-usage | assume-constraint-node assert-constraint-node< +// | attribute | calc | concern | connection | constraint | enumeration | exhibit-state-usage +// | flow-node | include-use-case-usage | interface | item | occurrence | occurrence-refxfx | part +// | perform-action-usage | port-usage | requirement | satisfy-requirement-usage | state-node +// | timeslice-or-snapshot-node | use-case | verification + ++ + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf.kgbnf b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf.kgbnf new file mode 100644 index 000000000..507b171a6 --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-graphical-bnf.kgbnf @@ -0,0 +1,2276 @@ +// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html +// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z + + +// Part 2 - Systems Modeling Language (SysML) + +// Clause 8.2.3 Graphical Notation + +// Clause 8.2.3.1 Graphical Notation Overview + +// Clause 8.2.3.2 Elements and Relationships Graphical Notation + +element = + dependencies-and-annotations-element + | general-element + | element-inside-textual-compartment + +compartment =| general-compartment + +general-compartment = +
Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:
+// QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)
+// ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].// Source document: tests/KerML_and_SysML_grammars/SysML-textual-bnf-corrected-marked_up.kebnf
+// Generated by bnf_grammar_processor at: 2025-12-04T19:29:18Z
+
// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html
+// Generated by bnf_grammar_processor at: 2025-11-28T15:06:37Z
+
// Manual corrections by HP de Koning +
+RESERVED_KEYWORD = + 'about' | 'abstract' | 'accept' | 'action' | 'actor' | 'after' | 'alias' | 'all' | 'allocate' | 'allocation' + | 'analysis' | 'and' | 'as' | 'assert' | 'assign' | 'assume' | 'at' | 'attribute' | 'bind' | 'binding' | 'by' | 'calc' + | 'case' | 'comment' | 'concern' | 'connect' | 'connection' | 'constant' | 'constraint' | 'crosses' | 'decide' + | 'def' | 'default' | 'defined' | 'dependency' | 'derived' | 'do' | 'doc' | 'else' | 'end' | 'entry' | 'enum' + | 'event' | 'exhibit' | 'exit' | 'expose' | 'false' | 'filter' | 'first' | 'flow' | 'for' | 'fork' | 'frame' | 'from' + | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'include' | 'individual' | 'inout' | 'interface' | 'istype' + | 'item' | 'join' | 'language' | 'library' | 'locale' | 'loop' | 'merge' | 'message' | 'meta' | 'metadata' + | 'nonunique' | 'not' | 'null' | 'objective' | 'occurrence' | 'of' | 'or' | 'ordered' | 'out' | 'package' | 'parallel' + | 'part' | 'perform' | 'port' | 'private' | 'protected' | 'public' | 'redefines' | 'ref' | 'references' | 'render' + | 'rendering' | 'rep' | 'require' | 'requirement' | 'return' | 'satisfy' | 'send' | 'snapshot' | 'specializes' + | 'stakeholder' | 'standard' | 'state' | 'subject' | 'subsets' | 'succession' | 'terminate' | 'then' | 'timeslice' + | 'to' | 'transition' | 'true' | 'until' | 'use' | 'variant' | 'variation' | 'verification' | 'verify' | 'via' + | 'view' | 'viewpoint' | 'when' | 'while' | 'xor' ++ +
DEFINED_BY = ':' | 'defined' 'by' ++ +
SPECIALIZES = ':>' | 'specializes' ++ +
SUBSETS = ':>' | 'subsets' ++ +
REFERENCES = '::>' | 'references' ++ +
CROSSES = '=>' | 'crosses' ++ +
REDEFINES = ':>>' | 'redefines' ++
Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? ++ +
RelationshipBody : Relationship =
+ ';' | '{' ( ownedRelationship += OwnedAnnotation )* '}'
+
+Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' DependencyDeclaration + RelationshipBody ++ +
DependencyDeclaration = + ( Identification 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* ++
Annotation = + annotatedElement = [QualifiedName] ++ +
OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingMember : OwningMembership = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature ++
Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++ +
Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++
TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE body = REGULAR_COMMENT ++
RootNamespace : Namespace = + PackageBodyElement* ++ +
Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
PackageDeclaration : Package = + 'package' Identification ++ +
PackageBody : Package =
+ ';' | '{' PackageBodyElement* '}'
+
+
+PackageBodyElement : Package = + ownedRelationship += PackageMember + | ownedRelationship += ElementFilterMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? ++ +
PackageMember : OwningMembership = + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) ++ +
ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' ownedRelatedElement += OwnedExpression ';' ++ +
AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody ++ +
Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration + RelationshipBody ++ +
ImportDeclaration : Import = + MembershipImport | NamespaceImport ++ +
MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? ++ +
NamespaceImport =
+ importedNamespace = [QualifiedName] '::' '*'
+ ( '::' isRecursive ?= '**' )?
+ | importedNamespace = FilterPackage
+ { ownedRelatedElement += importedNamespace }
+
+
+FilterPackage : Package = + ownedRelationship += FilterPackageImport + ( ownedRelationship += FilterPackageMember )+ ++ +
FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' ++ +
VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' ++
DefinitionElement : Element = + Package + | LibraryPackage + | AnnotatingElement + | Dependency + | AttributeDefinition + | EnumerationDefinition + | OccurrenceDefinition + | IndividualDefinition + | ItemDefinition + | PartDefinition + | ConnectionDefinition + | FlowDefinition + | InterfaceDefinition + | PortDefinition + | ActionDefinition + | CalculationDefinition + | StateDefinition + | ConstraintDefinition + | RequirementDefinition + | ConcernDefinition + | CaseDefinition + | AnalysisCaseDefinition + | VerificationCaseDefinition + | UseCaseDefinition + | ViewDefinition + | ViewpointDefinition + | RenderingDefinition + | MetadataDefinition + | ExtendedDefinition ++ +
UsageElement : Usage = + NonOccurrenceUsageElement + | OccurrenceUsageElement ++
BasicDefinitionPrefix = + isAbstract ?= 'abstract' | isVariation ?= 'variation' ++ +
DefinitionExtensionKeyword : Definition = + ownedRelationship += PrefixMetadataMember ++ +
DefinitionPrefix : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword* ++ +
Definition = + DefinitionDeclaration DefinitionBody ++ +
DefinitionDeclaration : Definition = + Identification SubclassificationPart? ++ +
DefinitionBody : Type =
+ ';' | '{' DefinitionBodyItem* '}'
+
+
+DefinitionBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += OccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
DefinitionMember : OwningMembership = + MemberPrefix + ownedRelatedElement += DefinitionElement ++ +
VariantUsageMember : VariantMembership = + MemberPrefix 'variant' + ownedVariantUsage = VariantUsageElement ++ +
NonOccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += NonOccurrenceUsageElement ++ +
OccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += OccurrenceUsageElement ++ +
StructureUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += StructureUsageElement ++ +
BehaviorUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += BehaviorUsageElement ++
FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' ++ +
RefPrefix : Usage = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' | isVariation ?= 'variation' )? + ( isConstant ?= 'constant' )? ++ +
BasicUsagePrefix : Usage = + RefPrefix + ( isReference ?= 'ref' )? ++ +
EndUsagePrefix : Usage = + isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? ++
// (See Note 1) +
+ +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature ++ +
OwnedCrossFeature : ReferenceUsage = + BasicUsagePrefix UsageDeclaration ++ +
UsageExtensionKeyword : Usage = + ownedRelationship += PrefixMetadataMember ++ +
UnextendedUsagePrefix : Usage = + EndUsagePrefix | BasicUsagePrefix ++ +
UsagePrefix : Usage = + UnextendedUsagePrefix UsageExtensionKeyword* ++ +
Usage = + UsageDeclaration UsageCompletion ++ +
UsageDeclaration : Usage = + Identification FeatureSpecializationPart? ++ +
UsageCompletion : Usage = + ValuePart? UsageBody ++ +
UsageBody : Usage = + DefinitionBody ++ +
ValuePart : Feature = + ownedRelationship += FeatureValue ++ +
FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression ++
// Notes:
+Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.DefaultReferenceUsage : ReferenceUsage = + RefPrefix Usage ++ +
ReferenceUsage = + ( EndUsagePrefix | RefPrefix ) + 'ref' Usage ++ +
VariantReference : ReferenceUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* UsageBody ++
NonOccurrenceUsageElement : Usage = + DefaultReferenceUsage + | ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | ExtendedUsage ++ +
OccurrenceUsageElement : Usage = + StructureUsageElement | BehaviorUsageElement ++ +
StructureUsageElement : Usage = + OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage ++ +
BehaviorUsageElement : Usage = + ActionUsage + | CalculationUsage + | StateUsage + | ConstraintUsage + | RequirementUsage + | ConcernUsage + | CaseUsage + | AnalysisCaseUsage + | VerificationCaseUsage + | UseCaseUsage + | ViewpointUsage + | PerformActionUsage + | ExhibitStateUsage + | IncludeUseCaseUsage + | AssertConstraintUsage + | SatisfyRequirementUsage ++ +
VariantUsageElement : Usage = + VariantReference + | ReferenceUsage + | AttributeUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + | BehaviorUsageElement ++
SubclassificationPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* ++ +
OwnedSubclassification : Subclassification = + superClassifier = [QualifiedName] ++ +
FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* ++ +
FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions ++ +
Typings : Feature = + TypedBy ( ',' ownedRelationship += FeatureTyping )* ++ +
TypedBy : Feature = + DEFINED_BY ownedRelationship += FeatureTyping ++ +
FeatureTyping = + OwnedFeatureTyping | ConjugatedPortTyping ++ +
OwnedFeatureTyping : FeatureTyping =
+ type = [QualifiedName]
+ | type = OwnedFeatureChain
+ { ownedRelatedElement += type }
+
+
+Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* ++ +
Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting ++ +
OwnedSubsetting : Subsetting =
+ subsettedFeature = [QualifiedName]
+ | subsettedFeature = OwnedFeatureChain
+ { ownedRelatedElement += subsettedFeature }
+
+
+References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedReferenceSubsetting : ReferenceSubsetting =
+ referencedFeature = [QualifiedName]
+ | referencedFeature = OwnedFeatureChain
+ { ownedRelatedElement += referenceFeature }
+
+
+Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting ++ +
OwnedCrossSubsetting : CrossSubsetting =
+ crossedFeature = [QualifiedName]
+ | crossedFeature = OwnedFeatureChain
+ { ownedRelatedElement += crossedFeature }
+
+
+Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* ++ +
Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition ++ +
OwnedRedefinition : Redefinition =
+ redefinedFeature = [QualifiedName]
+ | redefinedFeature = OwnedFeatureChain
+ { ownedRelatedElement += redefinedFeature }
+
+
+OwnedFeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ ++ +
OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] ++
MultiplicityPart : Feature =
+ ownedRelationship += OwnedMultiplicity
+ | ( ownedRelationship += OwnedMultiplicity )?
+ ( isOrdered ?= 'ordered' ( { isUnique = false } 'nonunique' )?
+ | { isUnique = false } 'nonunique' ( isOrdered ?= 'ordered' )? )
+
+
+OwnedMultiplicity : OwningMembership = + ownedRelatedElement += MultiplicityRange ++ +
MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' ++ +
MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) ++
AttributeDefinition : AttributeDefinition = + DefinitionPrefix 'attribute' 'def' Definition ++ +
AttributeUsage : AttributeUsage = + UsagePrefix 'attribute' Usage ++
EnumerationDefinition = + DefinitionExtensionKeyword* + 'enum' 'def' DefinitionDeclaration EnumerationBody ++ +
EnumerationBody : EnumerationDefinition =
+ ';'
+ | '{' ( ownedRelationship += AnnotatingMember
+ | ownedRelationship += EnumerationUsageMember )*
+ '}'
+
+
+EnumerationUsageMember : VariantMembership = + MemberPrefix ownedRelatedElement += EnumeratedValue ++ +
EnumeratedValue : EnumerationUsage = + 'enum'? Usage ++ +
EnumerationUsage : EnumerationUsage = + UsagePrefix 'enum' Usage ++
OccurrenceDefinitionPrefix : OccurrenceDefinition = + BasicDefinitionPrefix? + ( isIndividual ?= 'individual' + ownedRelationship += EmptyMultiplicityMember + )? + DefinitionExtensionKeyword* ++ +
OccurrenceDefinition = + OccurrenceDefinitionPrefix 'occurrence' 'def' Definition ++ +
IndividualDefinition : OccurrenceDefinition = + BasicDefinitionPrefix? isIndividual ?= 'individual' + DefinitionExtensionKeyword* 'def' Definition + ownedRelationship += EmptyMultiplicityMember ++ +
EmptyMultiplicityMember : OwningMembership = + ownedRelatedElement += EmptyMultiplicity ++ +
EmptyMultiplicity : Multiplicity =
+ { }
+
+OccurrenceUsagePrefix : OccurrenceUsage =
+ BasicUsagePrefix
+ ( isIndividual ?= 'individual' )?
+ ( portionKind = PortionKind
+ { isPortion = true }
+ )?
+ UsageExtensionKeyword*
+
+
+OccurrenceUsage = + OccurrenceUsagePrefix 'occurrence' Usage ++ +
IndividualUsage : OccurrenceUsage = + BasicUsagePrefix isIndividual ?= 'individual' + UsageExtensionKeyword* Usage ++ +
PortionUsage : OccurrenceUsage =
+ BasicUsagePrefix ( isIndividual ?= 'individual' )?
+ portionKind = PortionKind
+ UsageExtensionKeyword* Usage
+ { isPortion = true }
+
+
+PortionKind = + 'snapshot' | 'timeslice' ++ +
EventOccurrenceUsage = + OccurrenceUsagePrefix 'event' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'occurrence' UsageDeclaration? ) + UsageCompletion ++
SourceSuccessionMember : FeatureMembership = + 'then' ownedRelatedElement += SourceSuccession ++ +
SourceSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember ++ +
SourceEndMember : EndFeatureMembership = + ownedRelatedElement += SourceEnd ++ +
SourceEnd : ReferenceUsage = + ( ownedRelationship += OwnedMultiplicity )? ++
ItemDefinition = + OccurrenceDefinitionPrefix + 'item' 'def' Definition ++ +
ItemUsage = + OccurrenceUsagePrefix 'item' Usage ++
PartDefinition = + OccurrenceDefinitionPrefix 'part' 'def' Definition ++ +
PartUsage = + OccurrenceUsagePrefix 'part' Usage ++
PortDefinition =
+ DefinitionPrefix 'port' 'def' Definition
+ ownedRelationship += ConjugatedPortDefinitionMember
+ { conjugatedPortDefinition.ownedPortConjugator.
+ originalPortDefinition = this }
+
+// (See Note 1) +
+ +ConjugatedPortDefinitionMember : OwningMembership = + ownedRelatedElement += ConjugatedPortDefinition ++ +
ConjugatedPortDefinition = + ownedRelationship += PortConjugation ++ +
PortConjugation =
+ {}
+
+
+PortUsage = + OccurrenceUsagePrefix 'port' Usage ++ +
ConjugatedPortTyping : ConjugatedPortTyping = + '~' originalPortDefinition = ~[QualifiedName] ++
// (See Note 2) +
+// Notes:
+PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:
+QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].ConnectionDefinition = + OccurrenceDefinitionPrefix 'connection' 'def' Definition ++ +
ConnectionUsage = + OccurrenceUsagePrefix + ( 'connection' UsageDeclaration ValuePart? + ( 'connect' ConnectorPart )? + | 'connect' ConnectorPart ) + UsageBody ++ +
ConnectorPart : ConnectionUsage = + BinaryConnectorPart | NaryConnectorPart ++ +
BinaryConnectorPart : ConnectionUsage = + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember ++ +
NaryConnectorPart : ConnectionUsage =
+ '(' ownedRelationship += ConnectorEndMember ','
+ ownedRelationship += ConnectorEndMember
+ ( ',' ownedRelationship += ConnectorEndMember )* ')'
+
+
+ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd ++ +
ConnectorEnd : ReferenceUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity ++ +
OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity ++
BindingConnectorAsUsage = + UsagePrefix ( 'binding' UsageDeclaration )? + 'bind' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember + UsageBody ++
SuccessionAsUsage = + UsagePrefix ( 'succession' UsageDeclaration )? + 'first' s.ownedRelationship += ConnectorEndMember + 'then' s.ownedRelationship += ConnectorEndMember + UsageBody ++
InterfaceDefinition = + OccurrenceDefinitionPrefix 'interface' 'def' + DefinitionDeclaration InterfaceBody ++ +
InterfaceBody : Type =
+ ';' | '{' InterfaceBodyItem* '}'
+
+
+InterfaceBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += InterfaceNonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += InterfaceOccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
InterfaceNonOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceNonOccurrenceUsageElement ++ +
InterfaceNonOccurrenceUsageElement : Usage = + ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage ++ +
InterfaceOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceOccurrenceUsageElement ++ +
InterfaceOccurrenceUsageElement : Usage = + DefaultInterfaceEnd | StructureUsageElement | BehaviorUsageElement ++ +
DefaultInterfaceEnd : PortUsage = + isEnd ?= 'end' Usage ++
InterfaceUsage = + OccurrenceUsagePrefix 'interface' + InterfaceUsageDeclaration InterfaceBody ++ +
InterfaceUsageDeclaration : InterfaceUsage = + UsageDeclaration ValuePart? + ( 'connect' InterfacePart )? + | InterfacePart ++ +
InterfacePart : InterfaceUsage = + BinaryInterfacePart | NaryInterfacePart ++ +
BinaryInterfacePart : InterfaceUsage = + ownedRelationship += InterfaceEndMember 'to' + ownedRelationship += InterfaceEndMember ++ +
NaryInterfacePart : InterfaceUsage =
+ '(' ownedRelationship += InterfaceEndMember ','
+ ownedRelationship += InterfaceEndMember
+ ( ',' ownedRelationship += InterfaceEndMember )* ')'
+
+
+InterfaceEndMember : EndFeatureMembership = + ownedRelatedElement += InterfaceEnd ++ +
InterfaceEnd : PortUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++
AllocationDefinition = + OccurrenceDefinitionPrefix 'allocation' 'def' Definition ++ +
AllocationUsage = + OccurrenceUsagePrefix + AllocationUsageDeclaration UsageBody ++ +
AllocationUsageDeclaration : AllocationUsage = + 'allocation' UsageDeclaration + ( 'allocate' ConnectorPart )? + | 'allocate' ConnectorPart ++
FlowDefinition = + OccurrenceDefinitionPrefix 'flow' 'def' Definition ++ +
Message : FlowUsage =
+ OccurrenceUsagePrefix 'message'
+ MessageDeclaration DefinitionBody
+ { isAbstract = true }
+
+
+MessageDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += MessageEventMember + 'to' ownedRelationship += MessageEventMember + )? + | ownedRelationship += MessageEventMember 'to' + ownedRelationship += MessageEventMember ++ +
MessageEventMember : ParameterMembership = + ownedRelatedElement += MessageEvent ++ +
MessageEvent : EventOccurrenceUsage = + ownedRelationship += OwnedReferenceSubsetting ++ +
FlowUsage = + OccurrenceUsagePrefix 'flow' + FlowDeclaration DefinitionBody ++ +
SuccessionFlowUsage = + OccurrenceUsagePrefix 'succession' 'flow' + FlowDeclaration DefinitionBody ++ +
FlowDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember ++ +
FlowPayloadFeatureMember : FeatureMembership = + ownedRelatedElement += FlowPayloadFeature ++ +
FlowPayloadFeature : PayloadFeature = + PayloadFeature ++ +
PayloadFeature : Feature = + Identification? PayloadFeatureSpecializationPart + ValuePart? + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ownedRelationship += OwnedFeatureTyping ++ +
PayloadFeatureSpecializationPart : Feature = + ( FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ ++ +
FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd ++ +
FlowEnd = + ( ownedRelationship += FlowEndSubsetting )? + ownedRelationship += FlowFeatureMember ++ +
FlowEndSubsetting : ReferenceSubsetting =
+ referencedFeature = [QualifiedName]
+ | referencedFeature = FeatureChainPrefix
+ { ownedRelatedElement += referencedFeature }
+
+
+FeatureChainPrefix : Feature = + ( ownedRelationship += OwnedFeatureChaining '.' )+ + ownedRelationship += OwnedFeatureChaining '.' ++ +
FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature ++ +
FlowFeature : ReferenceUsage = + ownedRelationship += FlowFeatureRedefinition ++
// (See Note 1) +
+ +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] ++
// Notes:
+FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)ActionDefinition = + OccurrenceDefinitionPrefix 'action' 'def' + DefinitionDeclaration ActionBody ++ +
ActionBody : Type =
+ ';' | '{' ActionBodyItem* '}'
+
+
+ActionBodyItem : Type = + NonBehaviorBodyItem + | ownedRelationship += InitialNodeMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += ActionBehaviorMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ownedRelationship += GuardedSuccessionMember ++ +
NonBehaviorBodyItem = + ownedRelationship += Import + | ownedRelationship += AliasMember + | ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += StructureUsageMember ++ +
ActionBehaviorMember : FeatureMembership = + BehaviorUsageMember | ActionNodeMember ++ +
InitialNodeMember : FeatureMembership = + MemberPrefix 'first' memberFeature = [QualifiedName] + RelationshipBody ++ +
ActionNodeMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionNode ++ +
ActionTargetSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionTargetSuccession ++ +
GuardedSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += GuardedSuccession ++
ActionUsage = + OccurrenceUsagePrefix 'action' + ActionUsageDeclaration ActionBody ++ +
ActionUsageDeclaration : ActionUsage = + UsageDeclaration ValuePart? ++ +
PerformActionUsage = + OccurrenceUsagePrefix 'perform' + PerformActionUsageDeclaration ActionBody ++ +
PerformActionUsageDeclaration : PerformActionUsage = + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'action' UsageDeclaration ) + ValuePart? ++ +
ActionNode : ActionUsage = + ControlNode + | SendNode | AcceptNode + | AssignmentNode + | TerminateNode + | IfNode | WhileLoopNode | ForLoopNode ++ +
ActionNodeUsageDeclaration : ActionUsage = + 'action' UsageDeclaration? ++ +
ActionNodePrefix : ActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? ++
ControlNode = + MergeNode | DecisionNode | JoinNode| ForkNode ++ +
ControlNodePrefix : OccurrenceUsage =
+ RefPrefix
+ ( isIndividual ?= 'individual' )?
+ ( portionKind = PortionKind
+ { isPortion = true }
+ )?
+ UsageExtensionKeyword*
+
+
+MergeNode = + ControlNodePrefix + isComposite ?= 'merge' UsageDeclaration + ActionBody ++ +
DecisionNode = + ControlNodePrefix + isComposite ?= 'decide' UsageDeclaration + ActionBody ++ +
JoinNode = + ControlNodePrefix + isComposite ?= 'join' UsageDeclaration + ActionBody ++ +
ForkNode = + ControlNodePrefix + isComposite ?= 'fork' UsageDeclaration + ActionBody ++
AcceptNode : AcceptActionUsage = + OccurrenceUsagePrefix + AcceptNodeDeclaration ActionBody ++ +
AcceptNodeDeclaration : AcceptActionUsage = + ActionNodeUsageDeclaration? + 'accept' AcceptParameterPart ++ +
AcceptParameterPart : AcceptActionUsage = + ownedRelationship += PayloadParameterMember + ( 'via' ownedRelationship += NodeParameterMember )? ++ +
PayloadParameterMember : ParameterMembership = + ownedRelatedElement += PayloadParameter ++ +
PayloadParameter : ReferenceUsage = + PayloadFeature + | Identification PayloadFeatureSpecializationPart? + TriggerValuePart ++ +
TriggerValuePart : Feature = + ownedRelationship += TriggerFeatureValue ++ +
TriggerFeatureValue : FeatureValue = + ownedRelatedElement += TriggerExpression ++ +
TriggerExpression : TriggerInvocationExpression = + kind = ( 'at' | 'after' ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember ++ +
ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument ++ +
Argument : Feature = + ownedRelationship += ArgumentValue ++ +
ArgumentValue : FeatureValue = + value = OwnedExpression ++ +
ArgumentExpressionMember : ParameterMembership = + ownedRelatedElement += ArgumentExpression ++ +
ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue ++ +
ArgumentExpressionValue : FeatureValue = + ownedRelatedElement += OwnedExpressionReference ++ +
SendNode : SendActionUsage = + OccurrenceUsagePrefix ActionUsageDeclaration? 'send' + ( ownedRelationship += NodeParameterMember SenderReceiverPart? + | ownedRelationship += EmptyParameterMember SenderReceiverPart )? + ActionBody ++ +
SendNodeDeclaration : SendActionUsage = + ActionNodeUsageDeclaration? 'send' + ownedRelationship += NodeParameterMember SenderReceiverPart? ++ +
SenderReceiverPart : SendActionUsage = + 'via' ownedRelationship += NodeParameterMember + ( 'to' ownedRelationship += NodeParameterMember )? + | ownedRelationship += EmptyParameterMember + 'to' ownedRelationship += NodeParameterMember ++ +
NodeParameterMember : ParameterMembership = + ownedRelatedElement += NodeParameter ++ +
NodeParameter : ReferenceUsage = + ownedRelationship += FeatureBinding ++ +
FeatureBinding : FeatureValue = + ownedRelatedElement += OwnedExpression ++ +
EmptyParameterMember : ParameterMembership = + ownedRelatedElement += EmptyUsage ++ +
EmptyUsage : ReferenceUsage =
+ {}
+
+// Notes:
+ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].AssignmentNode : AssignmentActionUsage = + OccurrenceUsagePrefix + AssignmentNodeDeclaration ActionBody ++ +
AssignmentNodeDeclaration: ActionUsage = + ( ActionNodeUsageDeclaration )? 'assign' + ownedRelationship += AssignmentTargetMember + ownedRelationship += FeatureChainMember ':=' + ownedRelationship += NodeParameterMember ++ +
AssignmentTargetMember : ParameterMembership = + ownedRelatedElement += AssignmentTargetParameter ++ +
AssignmentTargetParameter : ReferenceUsage = + ( ownedRelationship += AssignmentTargetBinding '.' )? ++ +
AssignmentTargetBinding : FeatureValue = + ownedRelatedElement += NonFeatureChainPrimaryExpression ++ +
FeatureChainMember : Membership = + memberElement = [QualifiedName] + | OwnedFeatureChainMember ++ +
OwnedFeatureChainMember : OwningMembership = + ownedRelatedElement += OwnedFeatureChain ++
TerminateNode : TerminateActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + 'terminate' ( ownedRelationship += NodeParameterMember )? + ActionBody ++
IfNode : IfActionUsage = + ActionNodePrefix + 'if' ownedRelationship += ExpressionParameterMember + ownedRelationship += ActionBodyParameterMember + ( 'else' ownedRelationship += + ( ActionBodyParameterMember | IfNodeParameterMember ) )? ++ +
ExpressionParameterMember : ParameterMembership = + ownedRelatedElement += OwnedExpression ++ +
ActionBodyParameterMember : ParameterMembership = + ownedRelatedElement += ActionBodyParameter ++ +
ActionBodyParameter : ActionUsage =
+ ( 'action' UsageDeclaration? )?
+ '{' ActionBodyItem* '}'
+
+
+IfNodeParameterMember : ParameterMembership = + ownedRelatedElement += IfNode ++ +
WhileLoopNode : WhileLoopActionUsage = + ActionNodePrefix + ( 'while' ownedRelationship += ExpressionParameterMember + | 'loop' ownedRelationship += EmptyParameterMember + ) + ownedRelationship += ActionBodyParameterMember + ( 'until' ownedRelationship += ExpressionParameterMember ';' )? ++ +
ForLoopNode : ForLoopActionUsage = + ActionNodePrefix + 'for' ownedRelationship += ForVariableDeclarationMember + 'in' ownedRelationship += NodeParameterMember + ownedRelationship += ActionBodyParameterMember ++ +
ForVariableDeclarationMember : FeatureMembership = + ownedRelatedElement += UsageDeclaration ++ +
ForVariableDeclaration : ReferenceUsage = + UsageDeclaration ++
ActionTargetSuccession : Usage = + ( TargetSuccession | GuardedTargetSuccession | DefaultTargetSuccession ) + UsageBody ++ +
TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + 'then' ownedRelationship += ConnectorEndMember ++ +
GuardedTargetSuccession : TransitionUsage = + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember ++ +
DefaultTargetSuccession : TransitionUsage = + 'else' ownedRelationship += TransitionSuccessionMember ++ +
GuardedSuccession : TransitionUsage = + ( 'succession' UsageDeclaration )? + 'first' ownedRelationship += FeatureChainMember + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + UsageBody ++
StateDefinition = + OccurrenceDefinitionPrefix 'state' 'def' + DefinitionDeclaration StateDefBody ++ +
StateDefBody : StateDefinition =
+ ';'
+ | ( isParallel ?= 'parallel' )?
+ '{' StateBodyItem* '}'
+
+
+StateBodyItem : Type = + NonBehaviorBodyItem + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* + | ownedRelationship += TransitionUsageMember + | ownedRelationship += EntryActionMember + ( ownedRelationship += EntryTransitionMember )* + | ownedRelationship += DoActionMember + | ownedRelationship += ExitActionMember ++ +
EntryActionMember : StateSubactionMembership = + MemberPrefix kind = 'entry' + ownedRelatedElement += StateActionUsage ++ +
DoActionMember : StateSubactionMembership = + MemberPrefix kind = 'do' + ownedRelatedElement += StateActionUsage ++ +
ExitActionMember : StateSubactionMembership = + MemberPrefix kind = 'exit' + ownedRelatedElement += StateActionUsage ++ +
EntryTransitionMember : FeatureMembership = + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' ++ +
StateActionUsage : ActionUsage = + EmptyActionUsage ';' + | StatePerformActionUsage + | StateAcceptActionUsage + | StateSendActionUsage + | StateAssignmentActionUsage ++ +
EmptyActionUsage : ActionUsage =
+ {}
+
+
+StatePerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ActionBody ++ +
StateAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ActionBody ++ +
StateSendActionUsage : SendActionUsage = + SendNodeDeclaration ActionBody ++ +
StateAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ActionBody ++ +
TransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TransitionUsage ++ +
TargetTransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TargetTransitionUsage ++
StateUsage = + OccurrenceUsagePrefix 'state' + ActionUsageDeclaration StateUsageBody ++ +
StateUsageBody : StateUsage =
+ ';'
+ | ( isParallel ?= 'parallel' )?
+ '{' StateBodyItem* '}'
+
+
+ExhibitStateUsage = + OccurrenceUsagePrefix 'exhibit' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'state' UsageDeclaration ) + ValuePart? StateUsageBody ++
TransitionUsage = + 'transition' ( UsageDeclaration 'first' )? + ownedRelationship += FeatureChainMember + ownedRelationship += EmptyParameterMember + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody ++ +
TargetTransitionUsage : TransitionUsage = + ownedRelationship += EmptyParameterMember + ( 'transition' + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += GuardExpressionMember + ( ownedRelationship += EffectBehaviorMember )? + )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody ++ +
TriggerActionMember : TransitionFeatureMembership =
+ 'accept' { kind = 'trigger' } ownedRelatedElement += TriggerAction
+
+
+TriggerAction : AcceptActionUsage = + AcceptParameterPart ++ +
GuardExpressionMember : TransitionFeatureMembership =
+ 'if' { kind = 'guard' } ownedRelatedElement += OwnedExpression
+
+
+EffectBehaviorMember : TransitionFeatureMembership =
+ 'do' { kind = 'effect' } ownedRelatedElement += EffectBehaviorUsage
+
+
+EffectBehaviorUsage : ActionUsage = + EmptyActionUsage + | TransitionPerformActionUsage + | TransitionAcceptActionUsage + | TransitionSendActionUsage + | TransitionAssignmentActionUsage ++ +
TransitionPerformActionUsage : PerformActionUsage =
+ PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionAcceptActionUsage : AcceptActionUsage =
+ AcceptNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionSendActionUsage : SendActionUsage =
+ SendNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionAssignmentActionUsage : AssignmentActionUsage =
+ AssignmentNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionSuccessionMember : OwningMembership = + ownedRelatedElement += TransitionSuccession ++ +
TransitionSuccession : Succession = + ownedRelationship += EmptyEndMember + ownedRelationship += ConnectorEndMember ++ +
EmptyEndMember : EndFeatureMembership = + ownedRelatedElement += EmptyFeature ++ +
EmptyFeature : ReferenceUsage =
+ {}
+
+CalculationDefinition = + OccurrenceDefinitionPrefix 'calc' 'def' + DefinitionDeclaration CalculationBody ++ +
CalculationUsage : CalculationUsage = + OccurrenceUsagePrefix 'calc' + ActionUsageDeclaration CalculationBody ++ +
CalculationBody : Type =
+ ';' | '{' CalculationBodyPart '}'
+
+
+CalculationBodyPart : Type = + CalculationBodyItem* + ( ownedRelationship += ResultExpressionMember )? ++ +
CalculationBodyItem : Type = + ActionBodyItem + | ownedRelationship += ReturnParameterMember ++ +
ReturnParameterMember : ReturnParameterMembership = + MemberPrefix? 'return' ownedRelatedElement += UsageElement ++ +
ResultExpressionMember : ResultExpressionMembership = + MemberPrefix? ownedRelatedElement += OwnedExpression ++
ConstraintDefinition = + OccurrenceDefinitionPrefix 'constraint' 'def' + DefinitionDeclaration CalculationBody ++ +
ConstraintUsage = + OccurrenceUsagePrefix 'constraint' + ConstraintUsageDeclaration CalculationBody ++ +
AssertConstraintUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' )? + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'constraint' ConstraintUsageDeclaration ) + CalculationBody ++ +
ConstraintUsageDeclaration : ConstraintUsage = + UsageDeclaration ValuePart? ++
RequirementDefinition = + OccurrenceDefinitionPrefix 'requirement' 'def' + DefinitionDeclaration RequirementBody ++ +
RequirementBody : Type =
+ ';' | '{' RequirementBodyItem* '}'
+
+
+RequirementBodyItem : Type = + DefinitionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += RequirementConstraintMember + | ownedRelationship += FramedConcernMember + | ownedRelationship += RequirementVerificationMember + | ownedRelationship += ActorMember + | ownedRelationship += StakeholderMember ++ +
SubjectMember : SubjectMembership = + MemberPrefix ownedRelatedElement += SubjectUsage ++ +
SubjectUsage : ReferenceUsage = + 'subject' UsageExtensionKeyword* Usage ++ +
RequirementConstraintMember : RequirementConstraintMembership = + MemberPrefix? RequirementKind + ownedRelatedElement += RequirementConstraintUsage ++ +
RequirementKind : RequirementConstraintMembership =
+ 'assume' { kind = 'assumption' }
+ | 'require' { kind = 'requirement' }
+
+
+RequirementConstraintUsage : ConstraintUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? RequirementBody + | ( UsageExtensionKeyword* 'constraint' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration CalculationBody ++ +
FramedConcernMember : FramedConcernMembership = + MemberPrefix? 'frame' + ownedRelatedElement += FramedConcernUsage ++ +
FramedConcernUsage : ConcernUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? CalculationBody + | ( UsageExtensionKeyword* 'concern' + | UsageExtensionKeyword+ ) + CalculationUsageDeclaration CalculationBody ++ +
ActorMember : ActorMembership = + MemberPrefix ownedRelatedElement += ActorUsage ++ +
ActorUsage : PartUsage = + 'actor' UsageExtensionKeyword* Usage ++ +
StakeholderMember : StakeholderMembership = + MemberPrefix ownedRelatedElement += StakeholderUsage ++ +
StakeholderUsage : PartUsage = + 'stakeholder' UsageExtensionKeyword* Usage ++
RequirementUsage = + OccurrenceUsagePrefix 'requirement' + ConstraintUsageDeclaration RequirementBody ++ +
SatisfyRequirementUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' ) 'satisfy' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'requirement' UsageDeclaration ) + ValuePart? + ( 'by' ownedRelationship += SatisfactionSubjectMember )? + RequirementBody ++ +
SatisfactionSubjectMember : SubjectMembership = + ownedRelatedElement += SatisfactionParameter ++ +
SatisfactionParameter : ReferenceUsage = + ownedRelationship += SatisfactionFeatureValue ++ +
SatisfactionFeatureValue : FeatureValue = + ownedRelatedElement += SatisfactionReferenceExpression ++ +
SatisfactionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureChainMember ++
ConcernDefinition = + OccurrenceDefinitionPrefix 'concern' 'def' + DefinitionDeclaration RequirementBody ++ +
ConcernUsage = + OccurrenceUsagePrefix 'concern' + ConstraintUsageDeclaration RequirementBody ++
CaseDefinition = + OccurrenceDefinitionPrefix 'case' 'def' + DefinitionDeclaration CaseBody ++ +
CaseUsage = + OccurrenceUsagePrefix 'case' + ConstraintUsageDeclaration CaseBody ++ +
CaseBody : Type =
+ ';'
+ | '{' CaseBodyItem*
+ ( ownedRelationship += ResultExpressionMember )?
+ '}'
+
+
+CaseBodyItem : Type = + ActionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += ActorMember + | ownedRelationship += ObjectiveMember ++ +
ObjectiveMember : ObjectiveMembership = + MemberPrefix 'objective' + ownedRelatedElement += ObjectiveRequirementUsage ++ +
ObjectiveRequirementUsage : RequirementUsage = + UsageExtensionKeyword* ConstraintUsageDeclaration + RequirementBody ++
AnalysisCaseDefinition = + OccurrenceDefinitionPrefix 'analysis' 'def' + DefinitionDeclaration CaseBody ++ +
AnalysisCaseUsage = + OccurrenceUsagePrefix 'analysis' + ConstraintUsageDeclaration CaseBody ++
VerificationCaseDefinition = + OccurrenceDefinitionPrefix 'verification' 'def' + DefinitionDeclaration CaseBody ++ +
VerificationCaseUsage = + OccurrenceUsagePrefix 'verification' + ConstraintUsageDeclaration CaseBody ++ +
RequirementVerificationMember : RequirementVerificationMembership =
+ MemberPrefix 'verify' { kind = 'requirement' }
+ ownedRelatedElement += RequirementVerificationUsage
+
+
+RequirementVerificationUsage : RequirementUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* RequirementBody + | ( UsageExtensionKeyword* 'requirement' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration RequirementBody ++
UseCaseDefinition = + OccurrenceDefinitionPrefix 'use' 'case' 'def' + DefinitionDeclaration CaseBody ++ +
UseCaseUsage = + OccurrenceUsagePrefix 'use' 'case' + ConstraintUsageDeclaration CaseBody ++ +
IncludeUseCaseUsage = + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody ++
ViewDefinition = + OccurrenceDefinitionPrefix 'view' 'def' + DefinitionDeclaration ViewDefinitionBody ++ +
ViewDefinitionBody : ViewDefinition =
+ ';' | '{' ViewDefinitionBodyItem* '}'
+
+
+ViewDefinitionBodyItem : ViewDefinition = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember ++ +
ViewRenderingMember : ViewRenderingMembership = + MemberPrefix 'render' + ownedRelatedElement += ViewRenderingUsage ++ +
ViewRenderingUsage : RenderingUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + UsageBody + | ( UsageExtensionKeyword* 'rendering' + | UsageExtensionKeyword+ ) + Usage ++
ViewUsage = + OccurrenceUsagePrefix 'view' + UsageDeclaration? ValuePart? + ViewBody ++ +
ViewBody : ViewUsage =
+ ';' | '{' ViewBodyItem* '}'
+
+
+ViewBodyItem : ViewUsage = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + | ownedRelationship += Expose ++ +
Expose = + 'expose' ( MembershipExpose | NamespaceExpose ) + RelationshipBody ++ +
MembershipExpose = + MembershipImport ++ +
NamespaceExpose = + NamespaceImport ++
ViewpointDefinition = + OccurrenceDefinitionPrefix 'viewpoint' 'def' + DefinitionDeclaration RequirementBody ++ +
ViewpointUsage = + OccurrenceUsagePrefix 'viewpoint' + ConstraintUsageDeclaration RequirementBody ++
RenderingDefinition = + OccurrenceDefinitionPrefix 'rendering' 'def' + Definition ++ +
RenderingUsage = + OccurrenceUsagePrefix 'rendering' + Usage ++
MetadataDefinition = + ( isAbstract ?= 'abstract')? DefinitionExtensionKeyword* + 'metadata' 'def' Definition ++ +
PrefixMetadataAnnotation : Annotation =
+ '#' annotatingElement = PrefixMetadataUsage
+ { ownedRelatedElement += annotatingElement }
+
+
+PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement = PrefixMetadataUsage ++ +
PrefixMetadataUsage : MetadataUsage = + ownedRelationship += OwnedFeatureTyping ++ +
MetadataUsage = + UsageExtensionKeyword* ( '@' | 'metadata' ) + MetadataUsageDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody ++ +
MetadataUsageDeclaration : MetadataUsage = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping ++ +
MetadataBody : Type =
+ ';' |
+ '{' ( ownedRelationship += DefinitionMember
+ | ownedRelationship += MetadataBodyUsageMember
+ | ownedRelationship += AliasMember
+ | ownedRelationship += Import
+ )*
+ '}'
+
+
+MetadataBodyUsageMember : FeatureMembership = + ownedMemberFeature = MetadataBodyUsage ++ +
MetadataBodyUsage : ReferenceUsage = + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody ++ +
ExtendedDefinition : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword+ + 'def' Definition ++ +
ExtendedUsage : Usage = + UnextendedUsagePrefix UsageExtensionKeyword+ + Usage ++
// End of BNF
+
+
Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)\nArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:
+// QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)
+// ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html
+// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z
+
RESERVED_KEYWORD = + 'about' | 'abstract' | 'accept' | 'action' | 'actor' | 'after' | 'alias' | 'all' | 'allocate' | 'allocation' + | 'analysis' | 'and' | 'as' | 'assert' | 'assign' | 'assume' | 'at' | 'attribute' | 'bind' | 'binding' | 'by' | 'calc' + | 'case' | 'comment' | 'concern' | 'connect' | 'connection' | 'constant' | 'constraint' | 'crosses' | 'decide' + | 'def' | 'default' | 'defined' | 'dependency' | 'derived' | 'do' | 'doc' | 'else' | 'end' | 'entry' | 'enum' + | 'event' | 'exhibit' | 'exit' | 'expose' | 'false' | 'filter' | 'first' | 'flow' | 'for' | 'fork' | 'frame' | 'from' + | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'include' | 'individual' | 'inout' | 'interface' | 'istype' + | 'item' | 'join' | 'language' | 'library' | 'locale' | 'loop' | 'merge' | 'message' | 'meta' | 'metadata' + | 'nonunique' | 'not' | 'null' | 'objective' | 'occurrence' | 'of' | 'or' | 'ordered' | 'out' | 'package' | 'parallel' + | 'part' | 'perform' | 'port' | 'private' | 'protected' | 'public' | 'redefines' | 'ref' | 'references' | 'render' + | 'rendering' | 'rep' | 'require' | 'requirement' | 'return' | 'satisfy' | 'send' | 'snapshot' | 'specializes' + | 'stakeholder' | 'standard' | 'state' | 'subject' | 'subsets' | 'succession' | 'terminate' | 'then' | 'timeslice' + | 'to' | 'transition' | 'true' | 'until' | 'use' | 'variant' | 'variation' | 'verification' | 'verify' | 'via' + | 'view' | 'viewpoint' | 'when' | 'while' | 'xor' ++ +
DEFINED_BY = ':' | 'defined' 'by' ++ +
SPECIALIZES = ':>' | 'specializes' ++ +
SUBSETS = ':>' | 'subsets' ++ +
REFERENCES = '::>' | 'references' ++ +
CROSSES = '=>' | 'crosses' ++ +
REDEFINES = ':>>' | 'redefines' ++
Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? ++ +
RelationshipBody : Relationship =
+ ';' | '{' ( ownedRelationship += OwnedAnnotation )* '}'
+
+Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' DependencyDeclaration + RelationshipBody ++ +
DependencyDeclaration = + ( Identification 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* ++
Annotation = + annotatedElement = [QualifiedName] ++ +
OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingMember : OwningMembership = + ownedRelatedElement += AnnotatingElement ++ +
AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature ++
Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++ +
Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT ++
TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE body = REGULAR_COMMENT ++
RootNamespace : Namespace = + PackageBodyElement* ++ +
Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody ++ +
PackageDeclaration : Package = + 'package' Identification ++ +
PackageBody : Package =
+ ';' | '{' PackageBodyElement* '}'
+
+
+PackageBodyElement : Package = + ownedRelationship += PackageMember + | ownedRelationship += ElementFilterMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? ++ +
PackageMember : OwningMembership + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) ++ +
ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' ownedRelatedElement += OwnedExpression ';' ++ +
AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody ++ +
Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration + RelationshipBody ++ +
ImportDeclaration : Import = + MembershipImport | NamespaceImport ++ +
MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? ++ +
NamespaceImport =
+ importedNamespace = [QualifiedName] '::' '*'
+ ( '::' isRecursive ?= '**' )?
+ | importedNamspace = FilterPackage
+ { ownedRelatedElement += importedNamespace }
+
+
+FilterPackage : Package = + ownedRelationship += FilterPackageImport + ( ownedRelationship += FilterPackageMember )+ ++ +
FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' ++ +
VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' ++
DefinitionElement : Element = + Package + | LibraryPackage + | AnnotatingElement + | Dependency + | AttributeDefinition + | EnumerationDefinition + | OccurrenceDefinition + | IndividualDefinition + | ItemDefinition + | PartDefinition + | ConnectionDefinition + | FlowDefinition + | InterfaceDefinition + | PortDefinition + | ActionDefinition + | CalculationDefinition + | StateDefinition + | ConstraintDefinition + | RequirementDefinition + | ConcernDefinition + | CaseDefinition + | AnalysisCaseDefinition + | VerificationCaseDefinition + | UseCaseDefinition + | ViewDefinition + | ViewpointDefinition + | RenderingDefinition + | MetadataDefinition + | ExtendedDefinition ++ +
UsageElement : Usage = + NonOccurrenceUsageElement + | OccurrenceUsageElement ++
BasicDefinitionPrefix = + isAbstract ?= 'abstract' | isVariation ?= 'variation' ++ +
DefinitionExtensionKeyword : Definition = + ownedRelationship += PrefixMetadataMember ++ +
DefinitionPrefix : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword* ++ +
Definition = + DefinitionDeclaration DefinitionBody ++ +
DefinitionDeclaration : Definition + Identification SubclassificationPart? ++ +
DefinitionBody : Type =
+ ';' | '{' DefinitionBodyItem* '}'
+
+
+DefinitionBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += OccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
DefinitionMember : OwningMembership = + MemberPrefix + ownedRelatedElement += DefinitionElement ++ +
VariantUsageMember : VariantMembership = + MemberPrefix 'variant' + ownedVariantUsage = VariantUsageElement ++ +
NonOccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += NonOccurrenceUsageElement ++ +
OccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += OccurrenceUsageElement ++ +
StructureUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += StructureUsageElement ++ +
BehaviorUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += BehaviorUsageElement ++
FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' ++ +
RefPrefix : Usage = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' | isVariation ?= 'variation' )? + ( isConstant ?= 'constant' )? ++ +
BasicUsagePrefix : Usage = + RefPrefix + ( isReference ?= 'ref' )? ++ +
EndUsagePrefix : Usage = + isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? ++
// (See Note 1)
+ +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature ++ +
OwnedCrossFeature : ReferenceUsage = + BasicUsagePrefix UsageDeclaration ++ +
UsageExtensionKeyword : Usage = + ownedRelationship += PrefixMetadataMember ++ +
UnextendedUsagePrefix : Usage = + EndUsagePrefix | BasicUsagePrefix ++ +
UsagePrefix : Usage + UnextendedUsagePrefix UsageExtensionKeyword* ++ +
Usage = + UsageDeclaration UsageCompletion ++ +
UsageDeclaration : Usage = + Identification FeatureSpecializationPart? ++ +
UsageCompletion : Usage = + ValuePart? UsageBody ++ +
UsageBody : Usage = + DefinitionBody ++ +
ValuePart : Feature = + ownedRelationship += FeatureValue ++ +
FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression ++
// Notes:
+Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant.DefaultReferenceUsage : ReferenceUsage = + RefPrefix Usage ++ +
ReferenceUsage = + ( EndUsagePrefix | RefPrefix ) + 'ref' Usage ++ +
VariantReference : ReferenceUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* UsageBody ++
NonOccurrenceUsageElement : Usage = + DefaultReferenceUsage + | ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | ExtendedUsage ++ +
OccurrenceUsageElement : Usage = + StructureUsageElement | BehaviorUsageElement ++ +
StructureUsageElement : Usage = + OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage ++ +
BehaviorUsageElement : Usage = + ActionUsage + | CalculationUsage + | StateUsage + | ConstraintUsage + | RequirementUsage + | ConcernUsage + | CaseUsage + | AnalysisCaseUsage + | VerificationCaseUsage + | UseCaseUsage + | ViewpointUsage + | PerformActionUsage + | ExhibitStateUsage + | IncludeUseCaseUsage + | AssertConstraintUsage + | SatisfyRequirementUsage ++ +
VariantUsageElement : Usage = + VariantReference + | ReferenceUsage + | AttributeUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + | BehaviorUsageElement ++
SubclassificationPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* ++ +
OwnedSubclassification : Subclassification = + superClassifier = [QualifiedName] ++ +
FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* ++ +
FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions ++ +
Typings : Feature = + TypedBy ( ',' ownedRelationship += FeatureTyping )* ++ +
TypedBy : Feature = + DEFINED_BY ownedRelationship += FeatureTyping ++ +
FeatureTyping = + OwnedFeatureTyping | ConjugatedPortTyping ++ +
OwnedFeatureTyping : FeatureTyping =
+ type = [QualifiedName]
+ | type = OwnedFeatureChain
+ { ownedRelatedElement += type }
+
+
+Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* ++ +
Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting ++ +
OwnedSubsetting : Subsetting =
+ subsettedFeature = [QualifiedName]
+ | subsettedFeature = OwnedFeatureChain
+ { ownedRelatedElement += subsettedFeature }
+
+
+References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedReferenceSubsetting : ReferenceSubsetting =
+ referencedFeature = [QualifiedName]
+ | referencedFeature = OwnedFeatureChain
+ { ownedRelatedElement += referenceFeature }
+
+
+Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting ++ +
OwnedCrossSubsetting : CrossSubsetting =
+ crossedFeature = [QualifiedName]
+ | crossedFeature = OwnedFeatureChain
+ { ownedRelatedElement += crossedFeature }
+
+
+Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* ++ +
Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition ++ +
OwnedRedefinition : Redefinition =
+ redefinedFeature = [QualifiedName]
+ | redefinedFeature = OwnedFeatureChain
+ { ownedRelatedElement += redefinedFeature }
+
+
+OwnedFeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ ++ +
OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] ++
MultiplicityPart : Feature =
+ ownedRelationship += OwnedMultiplicity
+ | ( ownedRelationship += OwnedMultiplicity )?
+ ( isOrdered ?= 'ordered' ( { isUnique = false } 'nonunique' )?
+ | { isUnique = false } 'nonunique' ( isOrdered ?= 'ordered' )? )
+
+
+OwnedMultiplicity : OwningMembership = + ownedRelatedElement += MultiplicityRange ++ +
MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' ++ +
MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) ++
AttributeDefinition : AttributeDefinition = + DefinitionPrefix 'attribute' 'def' Definition ++ +
AttributeUsage : AttributeUsage = + UsagePrefix 'attribute' Usage ++
EnumerationDefinition = + DefinitionExtensionKeyword* + 'enum' 'def' DefinitionDeclaration EnumerationBody ++ +
EnumerationBody : EnumerationDefinition =
+ ';'
+ | '{' ( ownedRelationship += AnnotatingMember
+ | ownedRelationship += EnumerationUsageMember )*
+ '}'
+
+
+EnumerationUsageMember : VariantMembership = + MemberPrefix ownedRelatedElement += EnumeratedValue ++ +
EnumeratedValue : EnumerationUsage = + 'enum'? Usage ++ +
EnumerationUsage : EnumerationUsage = + UsagePrefix 'enum' Usage ++
OccurrenceDefinitionPrefix : OccurrenceDefinition = + BasicDefinitionPrefix? + ( isIndividual ?= 'individual' + ownedRelationship += EmptyMultiplicityMember + )? + DefinitionExtensionKeyword* ++ +
OccurrenceDefinition = + OccurrenceDefinitionPrefix 'occurrence' 'def' Definition ++ +
IndividualDefinition : OccurrenceDefinition = + BasicDefinitionPrefix? isIndividual ?= 'individual' + DefinitionExtensionKeyword* 'def' Definition + ownedRelationship += EmptyMultiplicityMember ++ +
EmptyMultiplicityMember : OwningMembership = + ownedRelatedElement += EmptyMultiplicity ++ +
EmptyMultiplicity : Multiplicity =
+ { }
+
+OccurrenceUsagePrefix : OccurrenceUsage =
+ BasicUsagePrefix
+ ( isIndividual ?= 'individual' )?
+ ( portionKind = PortionKind
+ { isPortion = true }
+ )?
+ UsageExtensionKeyword*
+
+
+OccurrenceUsage = + OccurrenceUsagePrefix 'occurrence' Usage ++ +
IndividualUsage : OccurrenceUsage = + BasicUsagePrefix isIndividual ?= 'individual' + UsageExtensionKeyword* Usage ++ +
PortionUsage : OccurrenceUsage =
+ BasicUsagePrefix ( isIndividual ?= 'individual' )?
+ portionKind = PortionKind
+ UsageExtensionKeyword* Usage
+ { isPortion = true }
+
+
+PortionKind = + 'snapshot' | 'timeslice' ++ +
EventOccurrenceUsage = + OccurrenceUsagePrefix 'event' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'occurrence' UsageDeclaration? ) + UsageCompletion ++
SourceSuccessionMember : FeatureMembership = + 'then' ownedRelatedElement += SourceSuccession ++ +
SourceSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember ++ +
SourceEndMember : EndFeatureMembership = + ownedRelatedElement += SourceEnd ++ +
SourceEnd : ReferenceUsage = + ( ownedRelationship += OwnedMultiplicity )? ++
ItemDefinition = + OccurrenceDefinitionPrefix + 'item' 'def' Definition ++ +
ItemUsage = + OccurrenceUsagePrefix 'item' Usage ++
PartDefinition = + OccurrenceDefinitionPrefix 'part' 'def' Definition ++ +
PartUsage = + OccurrenceUsagePrefix 'part' Usage ++
PortDefinition =
+ DefinitionPrefix 'port' 'def' Definition
+ ownedRelationship += ConjugatedPortDefinitionMember
+ { conjugatedPortDefinition.ownedPortConjugator.
+ originalPortDefinition = this }
+
+// (See Note 1)
+ +ConjugatedPortDefinitionMember : OwningMembership = + ownedRelatedElement += ConjugatedPortDefinition ++ +
ConjugatedPortDefinition = + ownedRelationship += PortConjugation ++ +
PortConjugation =
+ {}
+
+
+PortUsage = + OccurrenceUsagePrefix 'port' Usage ++ +
ConjugatedPortTyping : ConjugatedPortTyping = + '~' originalPortDefinition = ~[QualifiedName] ++
// (See Note 2)
+// Notes:
+PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.)~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows:
+QualifiedName and prepend the symbol ~ to it.QualifiedName.ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName].ConnectionDefinition = + OccurrenceDefinitionPrefix 'connection' 'def' Definition ++ +
ConnectionUsage = + OccurrenceUsagePrefix + ( 'connection' UsageDeclaration ValuePart? + ( 'connect' ConnectorPart )? + | 'connect' ConnectorPart ) + UsageBody ++ +
ConnectorPart : ConnectionUsage = + BinaryConnectorPart | NaryConnectorPart ++ +
BinaryConnectorPart : ConnectionUsage = + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember ++ +
NaryConnectorPart : ConnectionUsage =
+ '(' ownedRelationship += ConnectorEndMember ','
+ ownedRelationship += ConnectorEndMember
+ ( ',' ownedRelationship += ConnectorEndMember )* ')'
+
+
+ConnectorEndMember : EndFeatureMembership : + ownedRelatedElement += ConnectorEnd ++ +
ConnectorEnd : ReferenceUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++ +
OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity ++ +
OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity ++
BindingConnectorAsUsage = + UsagePrefix ( 'binding' UsageDeclaration )? + 'bind' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember + UsageBody ++
SuccessionAsUsage = + UsagePrefix ( 'succession' UsageDeclaration )? + 'first' s.ownedRelationship += ConnectorEndMember + 'then' s.ownedRelationship += ConnectorEndMember + UsageBody ++
InterfaceDefinition = + OccurrenceDefinitionPrefix 'interface' 'def' + DefinitionDeclaration InterfaceBody ++ +
InterfaceBody : Type =
+ ';' | '{' InterfaceBodyItem* '}'
+
+
+InterfaceBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += InterfaceNonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += InterfaceOccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import ++ +
InterfaceNonOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceNonOccurrenceUsageElement ++ +
InterfaceNonOccurrenceUsageElement : Usage = + ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage ++ +
InterfaceOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceOccurrenceUsageElement ++ +
InterfaceOccurrenceUsageElement : Usage = + DefaultInterfaceEnd | StructureUsageElement | BehaviorUsageElement ++ +
DefaultInterfaceEnd : PortUsage = + isEnd ?= 'end' Usage ++
InterfaceUsage = + OccurrenceUsagePrefix 'interface' + InterfaceUsageDeclaration InterfaceBody ++ +
InterfaceUsageDeclaration : InterfaceUsage = + UsageDeclaration ValuePart? + ( 'connect' InterfacePart )? + | InterfacePart ++ +
InterfacePart : InterfaceUsage = + BinaryInterfacePart | NaryInterfacePart ++ +
BinaryInterfacePart : InterfaceUsage = + ownedRelationship += InterfaceEndMember 'to' + ownedRelationship += InterfaceEndMember ++ +
NaryInterfacePart : InterfaceUsage =
+ '(' ownedRelationship += InterfaceEndMember ','
+ ownedRelationship += InterfaceEndMember
+ ( ',' ownedRelationship += InterfaceEndMember )* ')'
+
+
+InterfaceEndMember : EndFeatureMembership = + ownedRelatedElement += InterfaceEnd ++ +
InterfaceEnd : PortUsage : + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting ++
AllocationDefinition = + OccurrenceDefinitionPrefix 'allocation' 'def' Definition ++ +
AllocationUsage = + OccurrenceUsagePrefix + AllocationUsageDeclaration UsageBody ++ +
AllocationUsageDeclaration : AllocationUsage = + 'allocation' UsageDeclaration + ( 'allocate' ConnectorPart )? + | 'allocate' ConnectorPart ++
FlowDefinition : + OccurrenceDefinitionPrefix 'flow' 'def' Definition ++ +
Message : FlowUsage =
+ OccurrenceUsagePrefix 'message'
+ MessageDeclaration DefinitionBody
+ { isAbstract = true }
+
+
+MessageDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += MessageEventMember + 'to' ownedRelationship += MessageEventMember + )? + | ownedRelationship += MessageEventMember 'to' + ownedRelationship += MessageEventMember ++ +
MessageEventMember : ParameterMembership = + ownedRelatedElement += MessageEvent ++ +
MessageEvent : EventOccurrenceUsage = + ownedRelationship += OwnedReferenceSubsetting ++ +
FlowUsage = + OccurrenceUsagePrefix 'flow' + FlowDeclaration DefinitionBody ++ +
SuccessionFlowUsage = + OccurrenceUsagePrefix 'succession' 'flow' + FlowDeclaration DefinitionBody ++ +
FlowDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember ++ +
FlowPayloadFeatureMember : FeatureMembership = + ownedRelatedElement += FlowPayloadFeature ++ +
FlowPayloadFeature : PayloadFeature = + PayloadFeature ++ +
PayloadFeature : Feature = + Identification? PayloadFeatureSpecializationPart + ValuePart? + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ownedRelationship += OwnedFeatureTyping ++ +
PayloadFeatureSpecializationPart : Feature = + ( > FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ ++ +
FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd ++ +
FlowEnd = + ( ownedRelationship += FlowEndSubsetting )? + ownedRelationship += FlowFeatureMember ++ +
FlowEndSubsetting : ReferenceSubsetting =
+ referencedFeature = [QualifiedName]
+ | referencedFeature = FeatureChainPrefix
+ { ownedRelatedElement += referencedFeature }
+
+
+FeatureChainPrefix : Feature = + ( ownedRelationship += OwnedFeatureChaining '.' )+ + ownedRelationship += OwnedFeatureChaining '.' ++ +
FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature ++ +
FlowFeature : ReferenceUsage = + ownedRelationship += FlowFeatureRedefinition ++
// (See Note 1)
+ +FlowFeatureRefefinition : Redefinition = + redefinedFeature = [QualifiedName] ++
// Notes:
+FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature)
+ActionDefinition = + OccurrenceDefinitionPrefix 'action' 'def' + DefinitionDeclaration ActionBody ++ +
ActionBody : Type =
+ ';' | '{' ActionBodyItem* '}'
+
+
+ActionBodyItem : Type = + NonBehaviorBodyItem + | ownedRelationship += InitialNodeMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationsuip += ActionBehaviorMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ownedRelationship += GuardedSuccessionMember ++ +
NonBehaviorBodyItem = + ownedRelationship += Import + | ownedRelationship += AliasMember + | ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += StructureUsageMember ++ +
ActionBehaviorMember : FeatureMembership = + BehaviorUsageMember | ActionNodeMember ++ +
InitialNodeMember : FeatureMembership = + MemberPrefix 'first' memberFeature = [QualifiedName] + RelationshipBody ++ +
ActionNodeMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionNode ++ +
ActionTargetSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionTargetSuccession ++ +
GuardedSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += GuardedSuccession ++
ActionUsage = + OccurrenceUsagePrefix 'action' + ActionUsageDeclaration ActionBody ++ +
ActionUsageDeclaration : ActionUsage = + UsageDeclaration ValuePart? ++ +
PerformActionUsage = + OccurrenceUsagePrefix 'perform' + PerformActionUsageDeclaration ActionBody ++ +
PerformActionUsageDeclaration : PerformActionUsage = + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'action' UsageDeclaration ) + ValuePart? ++ +
ActionNode : ActionUsage = + ControlNode + | SendNode | AcceptNode + | AssignmentNode + | TerminateNode + | IfNode | WhileLoopNode | ForLoopNode ++ +
ActionNodeUsageDeclaration : ActionUsage = + 'action' UsageDeclaration? ++ +
ActionNodePrefix : ActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? ++
ControlNode = + MergeNode | DecisionNode | JoinNode| ForkNode ++ +
ControlNodePrefix : OccurrenceUsage =
+ RefPrefix
+ ( isIndividual ?= 'individual )?
+ ( portionKind = PortionKind
+ { isPortion = true }
+ )?
+ UsageExtensionKeyword*
+
+
+MergeNode = + ControlNodePrefix + isComposite ?= 'merge' UsageDeclaration + ActionBody ++ +
DecisionNode = + ControlNodePrefix + isComposite ?= 'decide' UsageDeclaration + ActionBody ++ +
JoinNode = + ControlNodePrefix + isComposite ?= 'join' UsageDeclaration + ActionBody ++ +
ForkNode = + ControlNodePrefix + isComposite ?= 'fork' UsageDeclaration + ActionBody ++
AcceptNode : AcceptActionUsage = + OccurrenceUsagePrefix + AcceptNodeDeclaration ActionBody ++ +
AcceptNodeDeclaration : AcceptActionUsage = + ActionNodeUsageDeclaration? + 'accept' AcceptParameterPart ++ +
AcceptParameterPart : AcceptActionUsage = + ownedRelationship += PayloadParameterMember + ( 'via' ownedRelationship += NodeParameterMember )? ++ +
PayloadParameterMember : ParameterMembership = + ownedRelatedElement += PayloadParameter ++ +
PayloadParameter : ReferenceUsage = + PayloadFeature + | Identification PayloadFeatureSpecializationPart? + TriggerValuePart ++ +
TriggerValuePart : Feature = + ownedRelationship += TriggerFeatureValue ++ +
TriggerFeatureValue : FeatureValue = + ownedRelatedElement += TriggerExpression ++ +
TriggerExpression : TriggerInvocationExpression = + kind = ( 'at | 'after ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember ++ +
ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument ++ +
Argument : Feature = + ownedRelationship += ArgumentValue ++ +
ArgumentValue : FeatureValue = + value = OwnedExpression ++ +
ArgumentExpressionMember : ParameterMembership = + ownedRelatedElement += ArgumentExpression ++ +
ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue ++ +
ArgumentExpressionValue : FeatureValue = + ownedRelatedElement += OwnedExpressionReference ++ +
SendNode : SendActionUsage = + OccurrenceUsagePrefix ActionUsageDeclaration? 'send' + ( ownedRelationship += NodeParameterMember SenderReceiverPart? + | ownedRelationship += EmptyParameterMember SendReceiverPart )? + ActionBody ++ +
SendNodeDeclaration : SendActionUsage = + ActionNodeUsageDeclaration? 'send' + ownedRelationship += NodeParameterMember SenderReceiverPart? ++ +
SenderReceiverPart : SendActionUsage = + 'via' ownedRelationship += NodeParameterMember + ( 'to' ownedRelationship += NodeParameterMember )? + | ownedRelationship += EmptyParameterMember + 'to' ownedRelationship += NodeParameterMember ++ +
NodeParameterMember : ParameterMembership = + ownedRelatedElement += NodeParameter ++ +
NodeParameter : ReferenceUsage = + ownedRelationship += FeatureBinding ++ +
FeatureBinding : FeatureValue = + ownedRelatedElement += OwnedExpression ++ +
EmptyParameterMember : ParameterMembership = + ownedRelatedElement += EmptyUsage ++ +
EmptyUsage : ReferenceUsage =
+ {}
+
+// Notes:
+ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1].AssignmentNode : AssignmentActionUsage = + OccurrenceUsagePrefix + AssignmentNodeDeclaration ActionBody ++ +
AssignmentNodeDeclaration: ActionUsage = + ( ActionNodeUsageDeclaration )? 'assign' + ownedRelationship += AssignmentTargetMember + ownedRelationship += FeatureChainMember ':=' + ownedRelationship += NodeParameterMember ++ +
AssignmentTargetMember : ParameterMembership = + ownedRelatedElement += AssignmentTargetParameter ++ +
AssignmentTargetParameter : ReferenceUsage = + ( ownedRelationship += AssignmentTargetBinding '.' )? ++ +
AssignmentTargetBinding : FeatureValue = + ownedRelatedElement += NonFeatureChainPrimaryExpression ++ +
FeatureChainMember : Membership = + memberElement = [QualifiedName] + | OwnedFeatureChainMember ++ +
OwnedFeatureChainMember : OwningMembership = + ownedRelatedElement += OwnedFeatureChain ++
TerminateNode : TerminateActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + 'terminate' ( ownedRelationship += NodeParameterMember )? + ActionBody ++
IfNode : IfActionUsage = + ActionNodePrefix + 'if' ownedRelationship += ExpressionParameterMember + ownedRelationship += ActionBodyParameterMember + ( 'else' ownedRelationship += + ( ActionBodyParameterMember | IfNodeParameterMember ) )? ++ +
ExpressionParameterMember : ParameterMembership = + ownedRelatedElement += OwnedExpression ++ +
ActionBodyParameterMember : ParameterMembership = + ownedRelatedElement += ActionBodyParameter ++ +
ActionBodyParameter : ActionUsage =
+ ( 'action' UsageDeclaration? )?
+ '{' ActionBodyItem* '}'
+
+
+IfNodeParameterMember : ParameterMembership = + ownedRelatedElement += IfNode ++ +
WhileLoopNode : WhileLoopActionUsage = + ActionNodePrefix + ( 'while' ownedRelationship += ExpressionParameterMember + | 'loop' ownedRelationship += EmptyParameterMember + ) + ownedRelationship += ActionBodyParameterMember + ( 'until' ownedRelationship += ExpressionParameterMember ';' )? ++ +
ForLoopNode : ForLoopActionUsage = + ActionNodePrefix + 'for' ownedRelationship += ForVariableDeclarationMember + 'in' ownedRelationship += NodeParameterMember + ownedRelationship += ActionBodyParameterMember ++ +
ForVariableDeclarationMember : FeatureMembership = + ownedRelatedElement += UsageDeclaration ++ +
ForVariableDeclaration : ReferenceUsage = + UsageDeclaration ++
ActionTargetSuccession : Usage = + ( TargetSuccession | GuardedTargetSuccession | DefaultTargetSuccession ) + UsageBody ++ +
TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + 'then' ownedRelationship += ConnectorEndMember ++ +
GuardedTargetSuccession : TransitionUsage = + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember ++ +
DefaultTargetSuccession : TransitionUsage = + 'else' ownedRelationship += TransitionSuccessionMember ++ +
GuardedSuccession : TransitionUsage = + ( 'succession' UsageDeclaration )? + 'first' ownedRelationship += FeatureChainMember + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + UsageBody ++
StateDefinition = + OccurrenceDefinitionPrefix 'state' 'def' + DefinitionDeclaration StateDefBody ++ +
StateDefBody : StateDefinition =
+ ';'
+ | ( isParallel ?= 'parallel' )?
+ '{' StateBodyItem* '}'
+
+
+StateBodyItem : Type = + NonBehaviorBodyItem + | ( ownedRelationsup += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* + | ownedRelationship += TransitionUsageMember + | ownedRelationship += EntryActionMember + ( ownedRelationship += EntryTransitionMember )* + | ownedRelationship += DoActionMember + | ownedRelationship += ExitActionMember ++ +
EntryActionMember : StateSubactionMembership = + MemberPrefix kind = 'entry' + ownedRelatedElement += StateActionUsage ++ +
DoActionMember : StateSubactionMembership = + MemberPrefix kind = 'do' + ownedRelatedElement += StateActionUsage ++ +
ExitActionMember : StateSubactionMembership = + MemberPrefix kind = 'exit' + ownedRelatedElement += StateActionUsage ++ +
EntryTransitionMember : FeatureMembership : + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' ++ +
StateActionUsage : ActionUsage = + EmptyActionUsage ';' + | StatePerformActionUsage + | StateAcceptActionUsage + | StateSendActionUsage + | StateAssignmentActionUsage ++ +
EmptyActionUsage : ActionUsage =
+ {}
+
+
+StatePerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ActionBody ++ +
StateAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ActionBody ++ +
StateSendActionUsage : SendActionUsage + SendNodeDeclaration ActionBody ++ +
StateAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ActionBody ++ +
TransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TransitionUsage ++ +
TargetTransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TargetTransitionUsage ++
StateUsage = + OccurrenceUsagePrefix 'state' + ActionUsageDeclaration StateUsageBody ++ +
StateUsageBody : StateUsage =
+ ';'
+ | ( isParallel ?= 'parallel' )?
+ '{' StateBodyItem* '}'
+
+
+ExhibitStateUsage = + OccurrenceUsagePrefix 'exhibit' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'state' UsageDeclaration ) + ValuePart? StateUsageBody ++
TransitionUsage = + 'transition' ( UsageDeclaration 'first' )? + ownedRelationship += FeatureChainMember + ownedRelationship += EmptyParameterMember + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody ++ +
TargetTransitionUsage : TransitionUsage = + ownedRelationship += EmptyParameterMember + ( 'transition' + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += GuardExpressionMember + ( ownedRelationship += EffectBehaviorMember )? + )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody ++ +
TriggerActionMember : TransitionFeatureMembership =
+ 'accept' { kind = 'trigger' } ownedRelatedElement += TriggerAction
+
+
+TriggerAction : AcceptActionUsage = + AcceptParameterPart ++ +
GuardExpressionMember : TransitionFeatureMembership =
+ 'if' { kind = 'guard' } ownedRelatedElement += OwnedExpression
+
+
+EffectBehaviorMember : TransitionFeatureMembership =
+ 'do' { kind = 'effect' } ownedRelatedElement += EffectBehaviorUsage
+
+
+EffectBehaviorUsage : ActionUsage = + EmptyActionUsage + | TransitionPerformActionUsage + | TransitionAcceptActionUsage + | TransitionSendActionUsage + | TransitionAssignmentActionUsage ++ +
TransitionPerformActionUsage : PerformActionUsage =
+ PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionAcceptActionUsage : AcceptActionUsage =
+ AcceptNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionSendActionUsage : SendActionUsage =
+ SendNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionAssignmentActionUsage : AssignmentActionUsage =
+ AssignmentNodeDeclaration ( '{' ActionBodyItem* '}' )?
+
+
+TransitionSuccessionMember : OwningMembership = + ownedRelatedElement += TransitionSuccession ++ +
TransitionSuccession : Succession = + ownedRelationship += EmptyEndMember + ownedRelationship += ConnectorEndMember ++ +
EmptyEndMember : EndFeatureMembership = + ownedRelatedElement += EmptyFeature ++ +
EmptyFeature : ReferenceUsage =
+ {}
+
+CalculationDefinition = + OccurrenceDefinitionPrefix 'calc' 'def' + DefinitionDeclaration CalculationBody ++ +
CalculationUsage : CalculationUsage = + OccurrenceUsagePrefix 'calc' + ActionUsageDeclaration CalculationBody ++ +
CalculationBody : Type =
+ ';' | '{' CalculationBodyPart '}'
+
+
+CalculationBodyPart : Type = + CalculationBodyItem* + ( ownedRelationship += ResultExpressionMember )? ++ +
CalculationBodyItem : Type = + ActionBodyItem + | ownedRelationship += ReturnParameterMember ++ +
ReturnParameterMember : ReturnParameterMembership = + MemberPrefix? 'return' ownedRelatedElement += UsageElement ++ +
ResultExpressionMember : ResultExpressionMembership = + MemberPrefix? ownedRelatedElement += OwnedExpression ++
ConstraintDefinition = + OccurrenceDefinitionPrefix 'constraint' 'def' + DefinitionDeclaration CalculationBody ++ +
ConstraintUsage = + OccurrenceUsagePrefix 'constraint' + ConstraintUsageDeclaration CalculationBody ++ +
AssertConstraintUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' )? + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'constraint' ConstraintUsageDeclaration ) + CalculationBody ++ +
ConstraintUsageDeclaration : ConstraintUsage = + UsageDeclaration ValuePart? ++
RequirementDefinition = + OccurrenceDefinitionPrefix 'requirement' 'def' + DefinitionDeclaration RequirementBody ++ +
RequirementBody : Type =
+ ';' | '{' RequirementBodyItem* '}'
+
+
+RequirementBodyItem : Type = + DefinitionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += RequirementConstraintMember + | ownedRelationship += FramedConcernMember + | ownedRelationship += RequirementVerificationMember + | ownedRelationship += ActorMember + | ownedRelationship += StakeholderMember ++ +
SubjectMember : SubjectMembership = + MemberPrefix ownedRelatedElement += SubjectUsage ++ +
SubjectUsage : ReferenceUsage = + 'subject' UsageExtensionKeyword* Usage ++ +
RequirementConstraintMember : RequirementConstraintMembership = + MemberPrefix? RequirementKind + ownedRelatedElement += RequirementConstraintUsage ++ +
RequirementKind : RequirementConstraintMembership =
+ 'assume' { kind = 'assumption' }
+ | 'require' { kind = 'requirement' }
+
+
+RequirementConstraintUsage : ConstraintUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? RequirementBody + | ( UsageExtensionKeyword* 'constraint' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration CalculationBody ++ +
FramedConcernMember : FramedConcernMembership = + MemberPrefix? 'frame' + ownedRelatedElement += FramedConcernUsage ++ +
FramedConcernUsage : ConcernUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? CalculationBody + | ( UsageExtensionKeyword* 'concern' + | UsageExtensionKeyword+ ) + CalculationUsageDeclaration CalculationBody ++ +
ActorMember : ActorMembership = + MemberPrefix ownedRelatedElement += ActorUsage ++ +
ActorUsage : PartUsage = + 'actor' UsageExtensionKeyword* Usage ++ +
StakeholderMember : StakeholderMembership = + MemberPrefix ownedRelatedElement += StakeholderUsage ++ +
StakeholderUsage : PartUsage = + 'stakeholder' UsageExtensionKeyword* Usage ++
RequirementUsage = + OccurrenceUsagePrefix 'requirement' + ConstraintUsageDeclaration RequirementBody ++ +
SatisfyRequirementUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' ) 'satisfy' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'requirement' UsageDeclaration ) + ValuePart? + ( 'by' ownedRelationship += SatisfactionSubjectMember )? + RequirementBody ++ +
SatisfactionSubjectMember : SubjectMembership = + ownedRelatedElement += SatisfactionParameter ++ +
SatisfactionParameter : ReferenceUsage = + ownedRelationship += SatisfactionFeatureValue ++ +
SatisfactionFeatureValue : FeatureValue = + ownedRelatedElement += SatisfactionReferenceExpression ++ +
SatisfactionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureChainMember ++
ConcernDefinition = + OccurrenceDefinitionPrefix 'concern' 'def' + DefinitionDeclaration RequirementBody ++ +
ConcernUsage = + OccurrenceUsagePrefix 'concern' + ConstraintUsageDeclaration RequirementBody ++
CaseDefinition = + OccurrenceDefinitionPrefix 'case' 'def' + DefinitionDeclaration CaseBody ++ +
CaseUsage = + OccurrenceUsagePrefix 'case' + ConstraintUsageDeclaration CaseBody ++ +
CaseBody : Type =
+ ';'
+ | '{' CaseBodyItem*
+ ( ownedRelationship += ResultExpressionMember )?
+ '}'
+
+
+CaseBodyItem : Type = + ActionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += ActorMember + | ownedRelationship += ObjectiveMember ++ +
ObjectiveMember : ObjectiveMembership = + MemberPrefix 'objective' + ownedRelatedElement += ObjectiveRequirementUsage ++ +
ObjectiveRequirementUsage : RequirementUsage = + UsageExtensionKeyword* ConstraintUsageDeclaration + RequirementBody ++
AnalysisCaseDefinition = + OccurrenceDefinitionPrefix 'analysis' 'def' + DefinitionDeclaration CaseBody ++ +
AnalysisCaseUsage = + OccurrenceUsagePrefix 'analysis' + ConstraintUsageDeclaration CaseBody ++
VerificationCaseDefinition = + OccurrenceDefinitionPrefix 'verification' 'def' + DefinitionDeclaration CaseBody ++ +
VerificationCaseUsage = + OccurrenceUsagePrefix 'verification' + ConstraintUsageDeclaration CaseBody ++ +
RequirementVerificationMember : RequirementVerificationMembership =
+ MemberPrefix 'verify' { kind = 'requirement' }
+ ownedRelatedElement += RequirementVerificationUsage
+
+
+RequirementVerificationUsage : RequirementUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* RequirementBody + | ( UsageExtensionKeyword* 'requirement' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration RequirementBody ++
UseCaseDefinition = + OccurrenceDefinitionPrefix 'use' 'case' 'def' + DefinitionDeclaration CaseBody ++ +
UseCaseUsage = + OccurrenceUsagePrefix 'use' 'case' + ConstraintUsageDeclaration CaseBody ++ +
IncludeUseCaseUsage : + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody ++
ViewDefinition = + OccurrenceDefinitionPrefix 'view' 'def' + DefinitionDeclaration ViewDefinitionBody ++ +
ViewDefinitionBody : ViewDefinition =
+ ';' | '{' ViewDefinitionBodyItem* '}'
+
+
+ViewDefinitionBodyItem : ViewDefinition = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember ++ +
ViewRenderingMember : ViewRenderingMembership = + MemberPrefix 'render' + ownedRelatedElement += ViewRenderingUsage ++ +
ViewRenderingUsage : RenderingUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + UsageBody + | ( UsageExtensionKeyword* 'rendering' + | UsageExtensionKeyword+ ) + Usage ++
ViewUsage = + OccurrenceUsagePrefix 'view' + UsageDeclaration? ValuePart? + ViewBody ++ +
ViewBody : ViewUsage =
+ ';' | '{' ViewBodyItem* '}'
+
+
+ViewBodyItem : ViewUsage = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + | ownedRelationship += Expose ++ +
Expose = + 'expose' ( MembershipExpose | NamespaceExpose ) + RelationshipBody ++ +
MembershipExpose = + MembershipImport ++ +
NamespaceExpose = + NamespaceImport ++
ViewpointDefinition = + OccurrenceDefinitionPrefix 'viewpoint' 'def' + DefinitionDeclaration RequirementBody ++ +
ViewpointUsage = + OccurrenceUsagePrefix 'viewpoint' + ConstraintUsageDeclaration RequirementBody ++
RenderingDefinition = + OccurrenceDefinitionPrefix 'rendering' 'def' + Definition ++ +
RenderingUsage = + OccurrenceUsagePrefix 'rendering' + Usage ++
MetadataDefinition = + ( isAbstract ?= 'abstract')? DefinitionExtensionKeyWord* + 'metadata' 'def' Definition ++ +
PrefixMetadataAnnotation : Annotation =
+ '#' annotatingElement = PrefixMetadataUsage
+ { ownedRelatedElement += annotatingElement }
+
+
+PrefixMetadataMember : OwningMembership = + '#' ownedRelatedEleemnt = PrefixMetadataUsage ++ +
PrefixMetadataUsage : MetadataUsage = + ownedRelationship += OwnedFeatureTyping ++ +
MetadataUsage = + UsageExtensionKeyword* ( '@' | 'metadata' ) + MetadataUsageDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody ++ +
MetadataUsageDeclaration : MetadataUsage = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping ++ +
MetadataBody : Type =
+ ';' |
+ '{' ( ownedRelationship += DefinitionMember
+ | ownedRelationship += MetadataBodyUsageMember
+ | ownedRelationship += AliasMember
+ | ownedRelationship += Import
+ )*
+ '}'
+
+
+MetadataBodyUsageMember : FeatureMembership = + ownedMemberFeature = MetadataBodyUsage ++ +
MetadataBodyUsage : ReferenceUsage : + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody ++ +
ExtendedDefinition : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword+ + 'def' Definition ++ +
ExtendedUsage : Usage = + UnextendedUsagePrefix UsageExtensionKeyword+ + Usage ++
// End of BNF + +
+ + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-textual-bnf.kebnf b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-textual-bnf.kebnf new file mode 100644 index 000000000..67bdd947b --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/SysML-textual-bnf.kebnf @@ -0,0 +1,1708 @@ +// Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html +// Generated by bnf_grammar_processor at: 2025-12-04T19:31:35Z + + +// Part 2 - Systems Modeling Language (SysML) + +// Clause 8.2.2 Textual Notation + +// Clause 8.2.2.1 Textual Notation Overview + +// Clause 8.2.2.1.1 EBNF Conventions + +// Clause 8.2.2.1.2 Lexical Structure + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'accept' | 'action' | 'actor' | 'after' | 'alias' | 'all' | 'allocate' | 'allocation' + | 'analysis' | 'and' | 'as' | 'assert' | 'assign' | 'assume' | 'at' | 'attribute' | 'bind' | 'binding' | 'by' | 'calc' + | 'case' | 'comment' | 'concern' | 'connect' | 'connection' | 'constant' | 'constraint' | 'crosses' | 'decide' + | 'def' | 'default' | 'defined' | 'dependency' | 'derived' | 'do' | 'doc' | 'else' | 'end' | 'entry' | 'enum' + | 'event' | 'exhibit' | 'exit' | 'expose' | 'false' | 'filter' | 'first' | 'flow' | 'for' | 'fork' | 'frame' | 'from' + | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'include' | 'individual' | 'inout' | 'interface' | 'istype' + | 'item' | 'join' | 'language' | 'library' | 'locale' | 'loop' | 'merge' | 'message' | 'meta' | 'metadata' + | 'nonunique' | 'not' | 'null' | 'objective' | 'occurrence' | 'of' | 'or' | 'ordered' | 'out' | 'package' | 'parallel' + | 'part' | 'perform' | 'port' | 'private' | 'protected' | 'public' | 'redefines' | 'ref' | 'references' | 'render' + | 'rendering' | 'rep' | 'require' | 'requirement' | 'return' | 'satisfy' | 'send' | 'snapshot' | 'specializes' + | 'stakeholder' | 'standard' | 'state' | 'subject' | 'subsets' | 'succession' | 'terminate' | 'then' | 'timeslice' + | 'to' | 'transition' | 'true' | 'until' | 'use' | 'variant' | 'variation' | 'verification' | 'verify' | 'via' + | 'view' | 'viewpoint' | 'when' | 'while' | 'xor' + +DEFINED_BY = ':' | 'defined' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +// Clause 8.2.2.2 Elements and Relationships Textual Notation + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' ( ownedRelationship += OwnedAnnotation )* '}' + +// Clause 8.2.2.3 Dependencies Textual Notation + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' DependencyDeclaration + RelationshipBody + +DependencyDeclaration = + ( Identification 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + +// Clause 8.2.2.4 Annotations Textual Notation + +// Clause 8.2.2.4.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingMember : OwningMembership = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Clause 8.2.2.4.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Clause 8.2.2.4.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE body = REGULAR_COMMENT + +// Clause 8.2.2.5 Namespaces and Packages Textual Notation + +// Clause 8.2.2.5.1 Packages + +RootNamespace : Namespace = + PackageBodyElement* + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' | '{' PackageBodyElement* '}' + +PackageBodyElement : Package = + ownedRelationship += PackageMember + | ownedRelationship += ElementFilterMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +PackageMember : OwningMembership + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' ownedRelatedElement += OwnedExpression ';' + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration + RelationshipBody + +ImportDeclaration : Import = + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamspace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += FilterPackageImport + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +// Clause 8.2.2.5.2 Package Elements + +DefinitionElement : Element = + Package + | LibraryPackage + | AnnotatingElement + | Dependency + | AttributeDefinition + | EnumerationDefinition + | OccurrenceDefinition + | IndividualDefinition + | ItemDefinition + | PartDefinition + | ConnectionDefinition + | FlowDefinition + | InterfaceDefinition + | PortDefinition + | ActionDefinition + | CalculationDefinition + | StateDefinition + | ConstraintDefinition + | RequirementDefinition + | ConcernDefinition + | CaseDefinition + | AnalysisCaseDefinition + | VerificationCaseDefinition + | UseCaseDefinition + | ViewDefinition + | ViewpointDefinition + | RenderingDefinition + | MetadataDefinition + | ExtendedDefinition + +UsageElement : Usage = + NonOccurrenceUsageElement + | OccurrenceUsageElement + +// Clause 8.2.2.6 Definition and Usage Textual Notation + +// Clause 8.2.2.6.1 Definitions + +BasicDefinitionPrefix = + isAbstract ?= 'abstract' | isVariation ?= 'variation' + +DefinitionExtensionKeyword : Definition = + ownedRelationship += PrefixMetadataMember + +DefinitionPrefix : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword* + +Definition = + DefinitionDeclaration DefinitionBody + +DefinitionDeclaration : Definition + Identification SubclassificationPart? + +DefinitionBody : Type = + ';' | '{' DefinitionBodyItem* '}' + +DefinitionBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += OccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +DefinitionMember : OwningMembership = + MemberPrefix + ownedRelatedElement += DefinitionElement + +VariantUsageMember : VariantMembership = + MemberPrefix 'variant' + ownedVariantUsage = VariantUsageElement + +NonOccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += NonOccurrenceUsageElement + +OccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += OccurrenceUsageElement + +StructureUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += StructureUsageElement + +BehaviorUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += BehaviorUsageElement + +// Clause 8.2.2.6.2 Usages + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +RefPrefix : Usage = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' | isVariation ?= 'variation' )? + ( isConstant ?= 'constant' )? + +BasicUsagePrefix : Usage = + RefPrefix + ( isReference ?= 'ref' )? + +EndUsagePrefix : Usage = + isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : ReferenceUsage = + BasicUsagePrefix UsageDeclaration + +UsageExtensionKeyword : Usage = + ownedRelationship += PrefixMetadataMember + +UnextendedUsagePrefix : Usage = + EndUsagePrefix | BasicUsagePrefix + +UsagePrefix : Usage + UnextendedUsagePrefix UsageExtensionKeyword* + +Usage = + UsageDeclaration UsageCompletion + +UsageDeclaration : Usage = + Identification FeatureSpecializationPart? + +UsageCompletion : Usage = + ValuePart? UsageBody + +UsageBody : Usage = + DefinitionBody + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Notes: +// 1. A Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant. + +// Clause 8.2.2.6.3 Reference Usages + +DefaultReferenceUsage : ReferenceUsage = + RefPrefix Usage + +ReferenceUsage = + ( EndUsagePrefix | RefPrefix ) + 'ref' Usage + +VariantReference : ReferenceUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* UsageBody + +// Clause 8.2.2.6.4 Body Elements + +NonOccurrenceUsageElement : Usage = + DefaultReferenceUsage + | ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | ExtendedUsage + +OccurrenceUsageElement : Usage = + StructureUsageElement | BehaviorUsageElement + +StructureUsageElement : Usage = + OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + +BehaviorUsageElement : Usage = + ActionUsage + | CalculationUsage + | StateUsage + | ConstraintUsage + | RequirementUsage + | ConcernUsage + | CaseUsage + | AnalysisCaseUsage + | VerificationCaseUsage + | UseCaseUsage + | ViewpointUsage + | PerformActionUsage + | ExhibitStateUsage + | IncludeUseCaseUsage + | AssertConstraintUsage + | SatisfyRequirementUsage + +VariantUsageElement : Usage = + VariantReference + | ReferenceUsage + | AttributeUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + | BehaviorUsageElement + +// Clause 8.2.2.6.5 Specialization + +SubclassificationPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +OwnedSubclassification : Subclassification = + superClassifier = [QualifiedName] + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += FeatureTyping )* + +TypedBy : Feature = + DEFINED_BY ownedRelationship += FeatureTyping + +FeatureTyping = + OwnedFeatureTyping | ConjugatedPortTyping + +OwnedFeatureTyping : FeatureTyping = + type = [QualifiedName] + | type = OwnedFeatureChain + { ownedRelatedElement += type } + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +OwnedSubsetting : Subsetting = + subsettedFeature = [QualifiedName] + | subsettedFeature = OwnedFeatureChain + { ownedRelatedElement += subsettedFeature } + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +OwnedReferenceSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = OwnedFeatureChain + { ownedRelatedElement += referenceFeature } + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +OwnedCrossSubsetting : CrossSubsetting = + crossedFeature = [QualifiedName] + | crossedFeature = OwnedFeatureChain + { ownedRelatedElement += crossedFeature } + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +OwnedRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + | redefinedFeature = OwnedFeatureChain + { ownedRelatedElement += redefinedFeature } + +OwnedFeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.2.6.6 Multiplicity + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( { isUnique = false } 'nonunique' )? + | { isUnique = false } 'nonunique' ( isOrdered ?= 'ordered' )? ) + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += MultiplicityRange + +MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.2.7 Attributes Textual Notation + +AttributeDefinition : AttributeDefinition = + DefinitionPrefix 'attribute' 'def' Definition + +AttributeUsage : AttributeUsage = + UsagePrefix 'attribute' Usage + +// Clause 8.2.2.8 Enumerations Textual Notation + +EnumerationDefinition = + DefinitionExtensionKeyword* + 'enum' 'def' DefinitionDeclaration EnumerationBody + +EnumerationBody : EnumerationDefinition = + ';' + | '{' ( ownedRelationship += AnnotatingMember + | ownedRelationship += EnumerationUsageMember )* + '}' + +EnumerationUsageMember : VariantMembership = + MemberPrefix ownedRelatedElement += EnumeratedValue + +EnumeratedValue : EnumerationUsage = + 'enum'? Usage + +EnumerationUsage : EnumerationUsage = + UsagePrefix 'enum' Usage + +// Clause 8.2.2.9 Occurrences Textual Notation + +// Clause 8.2.2.9.1 Occurrence Definitions + +OccurrenceDefinitionPrefix : OccurrenceDefinition = + BasicDefinitionPrefix? + ( isIndividual ?= 'individual' + ownedRelationship += EmptyMultiplicityMember + )? + DefinitionExtensionKeyword* + +OccurrenceDefinition = + OccurrenceDefinitionPrefix 'occurrence' 'def' Definition + +IndividualDefinition : OccurrenceDefinition = + BasicDefinitionPrefix? isIndividual ?= 'individual' + DefinitionExtensionKeyword* 'def' Definition + ownedRelationship += EmptyMultiplicityMember + +EmptyMultiplicityMember : OwningMembership = + ownedRelatedElement += EmptyMultiplicity + +EmptyMultiplicity : Multiplicity = + { } + +// Clause 8.2.2.9.2 Occurrence Usages + +OccurrenceUsagePrefix : OccurrenceUsage = + BasicUsagePrefix + ( isIndividual ?= 'individual' )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +OccurrenceUsage = + OccurrenceUsagePrefix 'occurrence' Usage + +IndividualUsage : OccurrenceUsage = + BasicUsagePrefix isIndividual ?= 'individual' + UsageExtensionKeyword* Usage + +PortionUsage : OccurrenceUsage = + BasicUsagePrefix ( isIndividual ?= 'individual' )? + portionKind = PortionKind + UsageExtensionKeyword* Usage + { isPortion = true } + +PortionKind = + 'snapshot' | 'timeslice' + +EventOccurrenceUsage = + OccurrenceUsagePrefix 'event' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'occurrence' UsageDeclaration? ) + UsageCompletion + +// Clause 8.2.2.9.3 Occurrence Successions + +SourceSuccessionMember : FeatureMembership = + 'then' ownedRelatedElement += SourceSuccession + +SourceSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + +SourceEndMember : EndFeatureMembership = + ownedRelatedElement += SourceEnd + +SourceEnd : ReferenceUsage = + ( ownedRelationship += OwnedMultiplicity )? + +// Clause 8.2.2.10 Items Textual Notation + +ItemDefinition = + OccurrenceDefinitionPrefix + 'item' 'def' Definition + +ItemUsage = + OccurrenceUsagePrefix 'item' Usage + +// Clause 8.2.2.11 Parts Textual Notation + +PartDefinition = + OccurrenceDefinitionPrefix 'part' 'def' Definition + +PartUsage = + OccurrenceUsagePrefix 'part' Usage + +// Clause 8.2.2.12 Ports Textual Notation + +PortDefinition = + DefinitionPrefix 'port' 'def' Definition + ownedRelationship += ConjugatedPortDefinitionMember + { conjugatedPortDefinition.ownedPortConjugator. + originalPortDefinition = this } + +// (See Note 1) + +ConjugatedPortDefinitionMember : OwningMembership = + ownedRelatedElement += ConjugatedPortDefinition + +ConjugatedPortDefinition = + ownedRelationship += PortConjugation + +PortConjugation = + {} + +PortUsage = + OccurrenceUsagePrefix 'port' Usage + +ConjugatedPortTyping : ConjugatedPortTyping = + '~' originalPortDefinition = ~[QualifiedName] + +// (See Note 2) + +// Notes: +// 1. Even though it is not explicitly represented in the text, a PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.) +// 2. The notation ~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows: +// • Extract the last segment name of the given QualifiedName and prepend the symbol ~ to it. +// • Append the name so constructed to the end of the entire original QualifiedName. +// For example, if the ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName]. + +// Clause 8.2.2.13 Connections Textual Notation + +// Clause 8.2.2.13.1 Connection Definition and Usage + +ConnectionDefinition = + OccurrenceDefinitionPrefix 'connection' 'def' Definition + +ConnectionUsage = + OccurrenceUsagePrefix + ( 'connection' UsageDeclaration ValuePart? + ( 'connect' ConnectorPart )? + | 'connect' ConnectorPart ) + UsageBody + +ConnectorPart : ConnectionUsage = + BinaryConnectorPart | NaryConnectorPart + +BinaryConnectorPart : ConnectionUsage = + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorPart : ConnectionUsage = + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* ')' + +ConnectorEndMember : EndFeatureMembership : + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : ReferenceUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.2.13.2 Binding Connectors + +BindingConnectorAsUsage = + UsagePrefix ( 'binding' UsageDeclaration )? + 'bind' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.13.3 Successions + +SuccessionAsUsage = + UsagePrefix ( 'succession' UsageDeclaration )? + 'first' s.ownedRelationship += ConnectorEndMember + 'then' s.ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.14 Interfaces Textual Notation + +// Clause 8.2.2.14.1 Interface Definitions + +InterfaceDefinition = + OccurrenceDefinitionPrefix 'interface' 'def' + DefinitionDeclaration InterfaceBody + +InterfaceBody : Type = + ';' | '{' InterfaceBodyItem* '}' + +InterfaceBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += InterfaceNonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += InterfaceOccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +InterfaceNonOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceNonOccurrenceUsageElement + +InterfaceNonOccurrenceUsageElement : Usage = + ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + +InterfaceOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceOccurrenceUsageElement + +InterfaceOccurrenceUsageElement : Usage = + DefaultInterfaceEnd | StructureUsageElement | BehaviorUsageElement + +DefaultInterfaceEnd : PortUsage = + isEnd ?= 'end' Usage + +// Clause 8.2.2.14.2 Interface Usages + +InterfaceUsage = + OccurrenceUsagePrefix 'interface' + InterfaceUsageDeclaration InterfaceBody + +InterfaceUsageDeclaration : InterfaceUsage = + UsageDeclaration ValuePart? + ( 'connect' InterfacePart )? + | InterfacePart + +InterfacePart : InterfaceUsage = + BinaryInterfacePart | NaryInterfacePart + +BinaryInterfacePart : InterfaceUsage = + ownedRelationship += InterfaceEndMember 'to' + ownedRelationship += InterfaceEndMember + +NaryInterfacePart : InterfaceUsage = + '(' ownedRelationship += InterfaceEndMember ',' + ownedRelationship += InterfaceEndMember + ( ',' ownedRelationship += InterfaceEndMember )* ')' + +InterfaceEndMember : EndFeatureMembership = + ownedRelatedElement += InterfaceEnd + +InterfaceEnd : PortUsage : + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +// Clause 8.2.2.15 Allocations Textual Notation + +AllocationDefinition = + OccurrenceDefinitionPrefix 'allocation' 'def' Definition + +AllocationUsage = + OccurrenceUsagePrefix + AllocationUsageDeclaration UsageBody + +AllocationUsageDeclaration : AllocationUsage = + 'allocation' UsageDeclaration + ( 'allocate' ConnectorPart )? + | 'allocate' ConnectorPart + +// Clause 8.2.2.16 Flows Textual Notation + +FlowDefinition : + OccurrenceDefinitionPrefix 'flow' 'def' Definition + +Message : FlowUsage = + OccurrenceUsagePrefix 'message' + MessageDeclaration DefinitionBody + { isAbstract = true } + +MessageDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += MessageEventMember + 'to' ownedRelationship += MessageEventMember + )? + | ownedRelationship += MessageEventMember 'to' + ownedRelationship += MessageEventMember + +MessageEventMember : ParameterMembership = + ownedRelatedElement += MessageEvent + +MessageEvent : EventOccurrenceUsage = + ownedRelationship += OwnedReferenceSubsetting + +FlowUsage = + OccurrenceUsagePrefix 'flow' + FlowDeclaration DefinitionBody + +SuccessionFlowUsage = + OccurrenceUsagePrefix 'succession' 'flow' + FlowDeclaration DefinitionBody + +FlowDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +FlowPayloadFeatureMember : FeatureMembership = + ownedRelatedElement += FlowPayloadFeature + +FlowPayloadFeature : PayloadFeature = + PayloadFeature + +PayloadFeature : Feature = + Identification? PayloadFeatureSpecializationPart + ValuePart? + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ownedRelationship += OwnedFeatureTyping + +PayloadFeatureSpecializationPart : Feature = + ( -> FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += FlowEndSubsetting )? + ownedRelationship += FlowFeatureMember + +FlowEndSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = FeatureChainPrefix + { ownedRelatedElement += referencedFeature } + +FeatureChainPrefix : Feature = + ( ownedRelationship += OwnedFeatureChaining '.' )+ + ownedRelationship += OwnedFeatureChaining '.' + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : ReferenceUsage = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRefefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that a FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) +// + +// Clause 8.2.2.17 Actions Textual Notation + +// Clause 8.2.2.17.1 Action Definitions + +ActionDefinition = + OccurrenceDefinitionPrefix 'action' 'def' + DefinitionDeclaration ActionBody + +ActionBody : Type = + ';' | '{' ActionBodyItem* '}' + +ActionBodyItem : Type = + NonBehaviorBodyItem + | ownedRelationship += InitialNodeMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationsuip += ActionBehaviorMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ownedRelationship += GuardedSuccessionMember + +NonBehaviorBodyItem = + ownedRelationship += Import + | ownedRelationship += AliasMember + | ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += StructureUsageMember + +ActionBehaviorMember : FeatureMembership = + BehaviorUsageMember | ActionNodeMember + +InitialNodeMember : FeatureMembership = + MemberPrefix 'first' memberFeature = [QualifiedName] + RelationshipBody + +ActionNodeMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionNode + +ActionTargetSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionTargetSuccession + +GuardedSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += GuardedSuccession + +// Clause 8.2.2.17.2 Action Usages + +ActionUsage = + OccurrenceUsagePrefix 'action' + ActionUsageDeclaration ActionBody + +ActionUsageDeclaration : ActionUsage = + UsageDeclaration ValuePart? + +PerformActionUsage = + OccurrenceUsagePrefix 'perform' + PerformActionUsageDeclaration ActionBody + +PerformActionUsageDeclaration : PerformActionUsage = + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'action' UsageDeclaration ) + ValuePart? + +ActionNode : ActionUsage = + ControlNode + | SendNode | AcceptNode + | AssignmentNode + | TerminateNode + | IfNode | WhileLoopNode | ForLoopNode + +ActionNodeUsageDeclaration : ActionUsage = + 'action' UsageDeclaration? + +ActionNodePrefix : ActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + +// Clause 8.2.2.17.3 Control Nodes + +ControlNode = + MergeNode | DecisionNode | JoinNode| ForkNode + +ControlNodePrefix : OccurrenceUsage = + RefPrefix + ( isIndividual ?= 'individual )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +MergeNode = + ControlNodePrefix + isComposite ?= 'merge' UsageDeclaration + ActionBody + +DecisionNode = + ControlNodePrefix + isComposite ?= 'decide' UsageDeclaration + ActionBody + +JoinNode = + ControlNodePrefix + isComposite ?= 'join' UsageDeclaration + ActionBody + +ForkNode = + ControlNodePrefix + isComposite ?= 'fork' UsageDeclaration + ActionBody + +// Clause 8.2.2.17.4 Send and Accept Action Usages + +AcceptNode : AcceptActionUsage = + OccurrenceUsagePrefix + AcceptNodeDeclaration ActionBody + +AcceptNodeDeclaration : AcceptActionUsage = + ActionNodeUsageDeclaration? + 'accept' AcceptParameterPart + +AcceptParameterPart : AcceptActionUsage = + ownedRelationship += PayloadParameterMember + ( 'via' ownedRelationship += NodeParameterMember )? + +PayloadParameterMember : ParameterMembership = + ownedRelatedElement += PayloadParameter + +PayloadParameter : ReferenceUsage = + PayloadFeature + | Identification PayloadFeatureSpecializationPart? + TriggerValuePart + +TriggerValuePart : Feature = + ownedRelationship += TriggerFeatureValue + +TriggerFeatureValue : FeatureValue = + ownedRelatedElement += TriggerExpression + +TriggerExpression : TriggerInvocationExpression = + kind = ( 'at | 'after' ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : ParameterMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + ownedRelatedElement += OwnedExpressionReference + +SendNode : SendActionUsage = + OccurrenceUsagePrefix ActionUsageDeclaration? 'send' + ( ownedRelationship += NodeParameterMember SenderReceiverPart? + | ownedRelationship += EmptyParameterMember SendReceiverPart )? + ActionBody + +SendNodeDeclaration : SendActionUsage = + ActionNodeUsageDeclaration? 'send' + ownedRelationship += NodeParameterMember SenderReceiverPart? + +SenderReceiverPart : SendActionUsage = + 'via' ownedRelationship += NodeParameterMember + ( 'to' ownedRelationship += NodeParameterMember )? + | ownedRelationship += EmptyParameterMember + 'to' ownedRelationship += NodeParameterMember + +NodeParameterMember : ParameterMembership = + ownedRelatedElement += NodeParameter + +NodeParameter : ReferenceUsage = + ownedRelationship += FeatureBinding + +FeatureBinding : FeatureValue = + ownedRelatedElement += OwnedExpression + +EmptyParameterMember : ParameterMembership = + ownedRelatedElement += EmptyUsage + +EmptyUsage : ReferenceUsage = + {} + +// Notes: +// 1. The productions for ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1]. + +// Clause 8.2.2.17.5 Assignment Action Usages + +AssignmentNode : AssignmentActionUsage = + OccurrenceUsagePrefix + AssignmentNodeDeclaration ActionBody + +AssignmentNodeDeclaration: ActionUsage = + ( ActionNodeUsageDeclaration )? 'assign' + ownedRelationship += AssignmentTargetMember + ownedRelationship += FeatureChainMember ':=' + ownedRelationship += NodeParameterMember + +AssignmentTargetMember : ParameterMembership = + ownedRelatedElement += AssignmentTargetParameter + +AssignmentTargetParameter : ReferenceUsage = + ( ownedRelationship += AssignmentTargetBinding '.' )? + +AssignmentTargetBinding : FeatureValue = + ownedRelatedElement += NonFeatureChainPrimaryExpression + +FeatureChainMember : Membership = + memberElement = [QualifiedName] + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.2.17.6 Terminate Action Usages + +TerminateNode : TerminateActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + 'terminate' ( ownedRelationship += NodeParameterMember )? + ActionBody + +// Clause 8.2.2.17.7 Structured Control Action Usages + +IfNode : IfActionUsage = + ActionNodePrefix + 'if' ownedRelationship += ExpressionParameterMember + ownedRelationship += ActionBodyParameterMember + ( 'else' ownedRelationship += + ( ActionBodyParameterMember | IfNodeParameterMember ) )? + +ExpressionParameterMember : ParameterMembership = + ownedRelatedElement += OwnedExpression + +ActionBodyParameterMember : ParameterMembership = + ownedRelatedElement += ActionBodyParameter + +ActionBodyParameter : ActionUsage = + ( 'action' UsageDeclaration? )? + '{' ActionBodyItem* '}' + +IfNodeParameterMember : ParameterMembership = + ownedRelatedElement += IfNode + +WhileLoopNode : WhileLoopActionUsage = + ActionNodePrefix + ( 'while' ownedRelationship += ExpressionParameterMember + | 'loop' ownedRelationship += EmptyParameterMember + ) + ownedRelationship += ActionBodyParameterMember + ( 'until' ownedRelationship += ExpressionParameterMember ';' )? + +ForLoopNode : ForLoopActionUsage = + ActionNodePrefix + 'for' ownedRelationship += ForVariableDeclarationMember + 'in' ownedRelationship += NodeParameterMember + ownedRelationship += ActionBodyParameterMember + +ForVariableDeclarationMember : FeatureMembership = + ownedRelatedElement += UsageDeclaration + +ForVariableDeclaration : ReferenceUsage = + UsageDeclaration + +// Clause 8.2.2.17.8 Action Successions + +ActionTargetSuccession : Usage = + ( TargetSuccession | GuardedTargetSuccession | DefaultTargetSuccession ) + UsageBody + +TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + 'then' ownedRelationship += ConnectorEndMember + +GuardedTargetSuccession : TransitionUsage = + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + +DefaultTargetSuccession : TransitionUsage = + 'else' ownedRelationship += TransitionSuccessionMember + +GuardedSuccession : TransitionUsage = + ( 'succession' UsageDeclaration )? + 'first' ownedRelationship += FeatureChainMember + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + UsageBody + +// Clause 8.2.2.18 States Textual Notation + +// Clause 8.2.2.18.1 State Definitions + +StateDefinition = + OccurrenceDefinitionPrefix 'state' 'def' + DefinitionDeclaration StateDefBody + +StateDefBody : StateDefinition = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +StateBodyItem : Type = + NonBehaviorBodyItem + | ( ownedRelationsup += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* + | ownedRelationship += TransitionUsageMember + | ownedRelationship += EntryActionMember + ( ownedRelationship += EntryTransitionMember )* + | ownedRelationship += DoActionMember + | ownedRelationship += ExitActionMember + +EntryActionMember : StateSubactionMembership = + MemberPrefix kind = 'entry' + ownedRelatedElement += StateActionUsage + +DoActionMember : StateSubactionMembership = + MemberPrefix kind = 'do' + ownedRelatedElement += StateActionUsage + +ExitActionMember : StateSubactionMembership = + MemberPrefix kind = 'exit' + ownedRelatedElement += StateActionUsage + +EntryTransitionMember : FeatureMembership : + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' + +StateActionUsage : ActionUsage = + EmptyActionUsage ';' + | StatePerformActionUsage + | StateAcceptActionUsage + | StateSendActionUsage + | StateAssignmentActionUsage + +EmptyActionUsage : ActionUsage = + {} + +StatePerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ActionBody + +StateAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ActionBody + +StateSendActionUsage : SendActionUsage + SendNodeDeclaration ActionBody + +StateAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ActionBody + +TransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TransitionUsage + +TargetTransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TargetTransitionUsage + +// Clause 8.2.2.18.2 State Usages + +StateUsage = + OccurrenceUsagePrefix 'state' + ActionUsageDeclaration StateUsageBody + +StateUsageBody : StateUsage = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +ExhibitStateUsage = + OccurrenceUsagePrefix 'exhibit' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'state' UsageDeclaration ) + ValuePart? StateUsageBody + +// Clause 8.2.2.18.3 Transition Usages + +TransitionUsage = + 'transition' ( UsageDeclaration 'first' )? + ownedRelationship += FeatureChainMember + ownedRelationship += EmptyParameterMember + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TargetTransitionUsage : TransitionUsage = + ownedRelationship += EmptyParameterMember + ( 'transition' + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += GuardExpressionMember + ( ownedRelationship += EffectBehaviorMember )? + )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TriggerActionMember : TransitionFeatureMembership = + 'accept' { kind = 'trigger' } ownedRelatedElement += TriggerAction + +TriggerAction : AcceptActionUsage = + AcceptParameterPart + +GuardExpressionMember : TransitionFeatureMembership = + 'if' { kind = 'guard' } ownedRelatedElement += OwnedExpression + +EffectBehaviorMember : TransitionFeatureMembership = + 'do' { kind = 'effect' } ownedRelatedElement += EffectBehaviorUsage + +EffectBehaviorUsage : ActionUsage = + EmptyActionUsage + | TransitionPerformActionUsage + | TransitionAcceptActionUsage + | TransitionSendActionUsage + | TransitionAssignmentActionUsage + +TransitionPerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSendActionUsage : SendActionUsage = + SendNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSuccessionMember : OwningMembership = + ownedRelatedElement += TransitionSuccession + +TransitionSuccession : Succession = + ownedRelationship += EmptyEndMember + ownedRelationship += ConnectorEndMember + +EmptyEndMember : EndFeatureMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : ReferenceUsage = + {} + +// Clause 8.2.2.19 Calculations Textual Notation + +CalculationDefinition = + OccurrenceDefinitionPrefix 'calc' 'def' + DefinitionDeclaration CalculationBody + +CalculationUsage : CalculationUsage = + OccurrenceUsagePrefix 'calc' + ActionUsageDeclaration CalculationBody + +CalculationBody : Type = + ';' | '{' CalculationBodyPart '}' + +CalculationBodyPart : Type = + CalculationBodyItem* + ( ownedRelationship += ResultExpressionMember )? + +CalculationBodyItem : Type = + ActionBodyItem + | ownedRelationship += ReturnParameterMember + +ReturnParameterMember : ReturnParameterMembership = + MemberPrefix? 'return' ownedRelatedElement += UsageElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix? ownedRelatedElement += OwnedExpression + +// Clause 8.2.2.20 Constraints Textual Notation + +ConstraintDefinition = + OccurrenceDefinitionPrefix 'constraint' 'def' + DefinitionDeclaration CalculationBody + +ConstraintUsage = + OccurrenceUsagePrefix 'constraint' + ConstraintUsageDeclaration CalculationBody + +AssertConstraintUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' )? + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'constraint' ConstraintUsageDeclaration ) + CalculationBody + +ConstraintUsageDeclaration : ConstraintUsage = + UsageDeclaration ValuePart? + +// Clause 8.2.2.21 Requirements Textual Notation + +// Clause 8.2.2.21.1 Requirement Definitions + +RequirementDefinition = + OccurrenceDefinitionPrefix 'requirement' 'def' + DefinitionDeclaration RequirementBody + +RequirementBody : Type = + ';' | '{' RequirementBodyItem* '}' + +RequirementBodyItem : Type = + DefinitionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += RequirementConstraintMember + | ownedRelationship += FramedConcernMember + | ownedRelationship += RequirementVerificationMember + | ownedRelationship += ActorMember + | ownedRelationship += StakeholderMember + +SubjectMember : SubjectMembership = + MemberPrefix ownedRelatedElement += SubjectUsage + +SubjectUsage : ReferenceUsage = + 'subject' UsageExtensionKeyword* Usage + +RequirementConstraintMember : RequirementConstraintMembership = + MemberPrefix? RequirementKind + ownedRelatedElement += RequirementConstraintUsage + +RequirementKind : RequirementConstraintMembership = + 'assume' { kind = 'assumption' } + | 'require' { kind = 'requirement' } + +RequirementConstraintUsage : ConstraintUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? RequirementBody + | ( UsageExtensionKeyword* 'constraint' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration CalculationBody + +FramedConcernMember : FramedConcernMembership = + MemberPrefix? 'frame' + ownedRelatedElement += FramedConcernUsage + +FramedConcernUsage : ConcernUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? CalculationBody + | ( UsageExtensionKeyword* 'concern' + | UsageExtensionKeyword+ ) + CalculationUsageDeclaration CalculationBody + +ActorMember : ActorMembership = + MemberPrefix ownedRelatedElement += ActorUsage + +ActorUsage : PartUsage = + 'actor' UsageExtensionKeyword* Usage + +StakeholderMember : StakeholderMembership = + MemberPrefix ownedRelatedElement += StakeholderUsage + +StakeholderUsage : PartUsage = + 'stakeholder' UsageExtensionKeyword* Usage + +// Clause 8.2.2.21.2 Requirement Usages + +RequirementUsage = + OccurrenceUsagePrefix 'requirement' + ConstraintUsageDeclaration RequirementBody + +SatisfyRequirementUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' ) 'satisfy' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'requirement' UsageDeclaration ) + ValuePart? + ( 'by' ownedRelationship += SatisfactionSubjectMember )? + RequirementBody + +SatisfactionSubjectMember : SubjectMembership = + ownedRelatedElement += SatisfactionParameter + +SatisfactionParameter : ReferenceUsage = + ownedRelationship += SatisfactionFeatureValue + +SatisfactionFeatureValue : FeatureValue = + ownedRelatedElement += SatisfactionReferenceExpression + +SatisfactionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureChainMember + +// Clause 8.2.2.21.3 Concerns + +ConcernDefinition = + OccurrenceDefinitionPrefix 'concern' 'def' + DefinitionDeclaration RequirementBody + +ConcernUsage = + OccurrenceUsagePrefix 'concern' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.22 Cases Textual Notation + +CaseDefinition = + OccurrenceDefinitionPrefix 'case' 'def' + DefinitionDeclaration CaseBody + +CaseUsage = + OccurrenceUsagePrefix 'case' + ConstraintUsageDeclaration CaseBody + +CaseBody : Type = + ';' + | '{' CaseBodyItem* + ( ownedRelationship += ResultExpressionMember )? + '}' + +CaseBodyItem : Type = + ActionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += ActorMember + | ownedRelationship += ObjectiveMember + +ObjectiveMember : ObjectiveMembership = + MemberPrefix 'objective' + ownedRelatedElement += ObjectiveRequirementUsage + +ObjectiveRequirementUsage : RequirementUsage = + UsageExtensionKeyword* ConstraintUsageDeclaration + RequirementBody + +// Clause 8.2.2.23 Analysis Cases Textual Notation + +AnalysisCaseDefinition = + OccurrenceDefinitionPrefix 'analysis' 'def' + DefinitionDeclaration CaseBody + +AnalysisCaseUsage = + OccurrenceUsagePrefix 'analysis' + ConstraintUsageDeclaration CaseBody + +// Clause 8.2.2.24 Verification Cases Textual Notation + +VerificationCaseDefinition = + OccurrenceDefinitionPrefix 'verification' 'def' + DefinitionDeclaration CaseBody + +VerificationCaseUsage = + OccurrenceUsagePrefix 'verification' + ConstraintUsageDeclaration CaseBody + +RequirementVerificationMember : RequirementVerificationMembership = + MemberPrefix 'verify' { kind = 'requirement' } + ownedRelatedElement += RequirementVerificationUsage + +RequirementVerificationUsage : RequirementUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* RequirementBody + | ( UsageExtensionKeyword* 'requirement' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.25 Use Cases Textual Notation + +UseCaseDefinition = + OccurrenceDefinitionPrefix 'use' 'case' 'def' + DefinitionDeclaration CaseBody + +UseCaseUsage = + OccurrenceUsagePrefix 'use' 'case' + ConstraintUsageDeclaration CaseBody + +IncludeUseCaseUsage : + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody + +// Clause 8.2.2.26 Views and Viewpoints Textual Notation + +// Clause 8.2.2.26.1 View Definitions + +ViewDefinition = + OccurrenceDefinitionPrefix 'view' 'def' + DefinitionDeclaration ViewDefinitionBody + +ViewDefinitionBody : ViewDefinition = + ';' | '{' ViewDefinitionBodyItem* '}' + +ViewDefinitionBodyItem : ViewDefinition = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + +ViewRenderingMember : ViewRenderingMembership = + MemberPrefix 'render' + ownedRelatedElement += ViewRenderingUsage + +ViewRenderingUsage : RenderingUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + UsageBody + | ( UsageExtensionKeyword* 'rendering' + | UsageExtensionKeyword+ ) + Usage + +// Clause 8.2.2.26.2 View Usages + +ViewUsage = + OccurrenceUsagePrefix 'view' + UsageDeclaration? ValuePart? + ViewBody + +ViewBody : ViewUsage = + ';' | '{' ViewBodyItem* '}' + +ViewBodyItem : ViewUsage = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + | ownedRelationship += Expose + +Expose = + 'expose' ( MembershipExpose | NamespaceExpose ) + RelationshipBody + +MembershipExpose = + MembershipImport + +NamespaceExpose = + NamespaceImport + +// Clause 8.2.2.26.3 Viewpoints + +ViewpointDefinition = + OccurrenceDefinitionPrefix 'viewpoint' 'def' + DefinitionDeclaration RequirementBody + +ViewpointUsage = + OccurrenceUsagePrefix 'viewpoint' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.26.4 Renderings + +RenderingDefinition = + OccurrenceDefinitionPrefix 'rendering' 'def' + Definition + +RenderingUsage = + OccurrenceUsagePrefix 'rendering' + Usage + +// Clause 8.2.2.27 Metadata Textual Notation + +MetadataDefinition = + ( isAbstract ?= 'abstract')? DefinitionExtensionKeyWord* + 'metadata' 'def' Definition + +PrefixMetadataAnnotation : Annotation = + '#' annotatingElement = PrefixMetadataUsage + { ownedRelatedElement += annotatingElement } + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedEleemnt = PrefixMetadataUsage + +PrefixMetadataUsage : MetadataUsage = + ownedRelationship += OwnedFeatureTyping + +MetadataUsage = + UsageExtensionKeyword* ( '@' | 'metadata' ) + MetadataUsageDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataUsageDeclaration : MetadataUsage = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Type = + ';' | + '{' ( ownedRelationship += DefinitionMember + | ownedRelationship += MetadataBodyUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + )* + '}' + +MetadataBodyUsageMember : FeatureMembership = + ownedMemberFeature = MetadataBodyUsage + +MetadataBodyUsage : ReferenceUsage : + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +ExtendedDefinition : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword+ + 'def' Definition + +ExtendedUsage : Usage = + UnextendedUsagePrefix UsageExtensionKeyword+ + Usage + +// End of BNF + + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--KerML-textual-corrected.log b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--KerML-textual-corrected.log new file mode 100644 index 000000000..62b50ba01 --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--KerML-textual-corrected.log @@ -0,0 +1,3366 @@ +INFO : Started parsing .\tests\KerML_and_SysML_grammars\KerML-textual-bnf-corrected.kebnf at 2025-12-04T17:03:12Z +INFO : Parse completed successfully +INFO : The resulting (AST) parse tree is: + +start + line_comment // Source document: tests/KerML_and_SysML_grammars/KerML-textual-bnf-corrected-marked_up.kebnf + line_comment // Generated by bnf_grammar_processor at: 2025-12-03T23:14:32Z + line_comment // Source document: tests\KerML_and_SysML_spec_sources\KerML-spec.html + line_comment // Generated by bnf_grammar_processor at: 2025-11-14T23:08:48Z + line_comment // Manual corrections by HP de Koning + line_comment // Part 1 - Kernel Modeling Language (KerML) + line_comment // Clause 8.2 Concrete Syntax + line_comment // Clause 8.2.1 Concrete Syntax Overview + line_comment // Clause 8.2.2 Lexical Structure + line_comment // Clause 8.2.2.1 Line Terminators and White Space + lexical_rule + LINE_TERMINATOR + alternation + terminal '\n' + terminal '\r' + terminal '\r\n' + line_comment // implementation defined character sequence + lexical_rule + LINE_TEXT + terminal '[^\r\n]*' + line_comment // character sequence excluding LINE_TERMINATORs + lexical_rule + WHITE_SPACE + alternation + terminal ' ' + terminal '\t' + terminal '\f' + name LINE_TERMINATOR + line_comment // space | tab | form_feed | LINE_TERMINATOR + line_comment // Notes: + line_comment // 1. Notation text is divided up into lines separated by line terminators. A line terminator may be a single character (such as a line feed) or a sequence of characters (such as a carriage return/line feed combination). This specification does not require any specific encoding for a line terminator, but any encoding used must be consistent throughout any specific input text. + line_comment // 2. Any characters in text line that are not a part of the line terminator are referred to as line text. + line_comment // 3. A white space character is a space, tab, form feed or line terminator. Any contiguous sequence of white space characters can be used to separate tokens that would otherwise be considered to be part of a single token. It is otherwise ignored, with the single exception that a line terminator is used to mark the end of a single-line note (see 8.2.2.2). + line_comment // Clause 8.2.2.2 Notes and Comments + lexical_rule + SINGLE_LINE_NOTE + sequence + terminal '//' + name LINE_TEXT + lexical_rule + MULTILINE_NOTE + sequence + terminal '//*' + name COMMENT_TEXT + terminal '*/' + lexical_rule + REGULAR_COMMENT + sequence + terminal '/*' + name COMMENT_TEXT + terminal '*/' + lexical_rule + COMMENT_TEXT + expression + alternation + name COMMENT_LINE_TEXT + name LINE_TERMINATOR + repetition * + lexical_rule + COMMENT_LINE_TEXT + terminal '.*(?=(\r|\n|\*/))' + line_comment // LINE_TEXT excluding the sequence '*/' + line_comment // Clause 8.2.2.3 Names + lexical_rule + NAME + alternation + name BASIC_NAME + name UNRESTRICTED_NAME + lexical_rule + BASIC_NAME + sequence + name BASIC_INITIAL_CHARACTER + expression + name BASIC_NAME_CHARACTER + repetition * + lexical_rule + SINGLE_QUOTE + terminal '#x27' + lexical_rule + UNRESTRICTED_NAME + sequence + name SINGLE_QUOTE + expression + alternation + name NAME_CHARACTER + name ESCAPE_SEQUENCE + repetition * + name SINGLE_QUOTE + line_comment // (See Note 1) + lexical_rule + BASIC_INITIAL_CHARACTER + alternation + name ALPHABETIC_CHARACTER + terminal '_' + lexical_rule + BASIC_NAME_CHARACTER + alternation + name BASIC_INITIAL_CHARACTER + name DECIMAL_DIGIT + lexical_rule + ALPHABETIC_CHARACTER + alternation + terminal 'A' + terminal 'B' + terminal 'C' + terminal 'D' + terminal 'E' + terminal 'F' + terminal 'G' + terminal 'H' + terminal 'I' + terminal 'J' + terminal 'K' + terminal 'L' + terminal 'M' + terminal 'N' + terminal 'O' + terminal 'P' + terminal 'Q' + terminal 'R' + terminal 'S' + terminal 'T' + terminal 'U' + terminal 'V' + terminal 'W' + terminal 'X' + terminal 'Y' + terminal 'Z' + terminal 'a' + terminal 'b' + terminal 'c' + terminal 'd' + terminal 'e' + terminal 'f' + terminal 'g' + terminal 'h' + terminal 'i' + terminal 'j' + terminal 'k' + terminal 'l' + terminal 'm' + terminal 'n' + terminal 'o' + terminal 'p' + terminal 'q' + terminal 'r' + terminal 's' + terminal 't' + terminal 'u' + terminal 'v' + terminal 'w' + terminal 'x' + terminal 'y' + terminal 'z' + line_comment // any character 'a' through 'z' or 'A' through 'Z' + lexical_rule + DECIMAL_DIGIT + alternation + terminal '0' + terminal '1' + terminal '2' + terminal '3' + terminal '4' + terminal '5' + terminal '6' + terminal '7' + terminal '8' + terminal '9' + lexical_rule + NAME_CHARACTER + terminal 'any printable character other than backslash or single_quote' + lexical_rule + ESCAPE_SEQUENCE + alternation + terminal '\f' + terminal '\n' + terminal '\t' + terminal '\r' + terminal '\v' + line_comment // (See Note 2) + line_comment // Notes: + line_comment // 1. The single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name. + line_comment // 2. An ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name. + line_comment // Clause 8.2.2.4 Numeric Values + lexical_rule + DECIMAL_VALUE + expression + name DECIMAL_DIGIT + repetition + + lexical_rule + EXPONENTIAL_VALUE + sequence + name DECIMAL_VALUE + alternation + terminal 'e' + terminal 'E' + expression + alternation + terminal '+' + terminal '-' + repetition ? + name DECIMAL_VALUE + line_comment // Notes: + line_comment // 1. A DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax. + line_comment // 2. An EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals. + line_comment // Clause 8.2.2.5 String Value + lexical_rule + STRING_VALUE + sequence + terminal '"' + expression + alternation + name STRING_CHARACTER + name ESCAPE_SEQUENCE + repetition * + terminal '"' + lexical_rule + STRING_CHARACTER + terminal 'any printable character other than backslash or "' + line_comment // Notes: + line_comment // 1. ESCAPE_SEQUENCE is specified in 8.2.2.3. + line_comment // Clause 8.2.2.6 Reserved Words + lexical_rule + RESERVED_KEYWORD + alternation + terminal 'about' + terminal 'abstract' + terminal 'alias' + terminal 'all' + terminal 'and' + terminal 'as' + terminal 'assoc' + terminal 'behavior' + terminal 'binding' + terminal 'bool' + terminal 'by' + terminal 'chains' + terminal 'class' + terminal 'classifier' + terminal 'comment' + terminal 'composite' + terminal 'conjugate' + terminal 'conjugates' + terminal 'conjugation' + terminal 'connector' + terminal 'const' + terminal 'crosses' + terminal 'datatype' + terminal 'default' + terminal 'dependency' + terminal 'derived' + terminal 'differences' + terminal 'disjoining' + terminal 'disjoint' + terminal 'doc' + terminal 'else' + terminal 'end' + terminal 'expr' + terminal 'false' + terminal 'feature' + terminal 'featured' + terminal 'featuring' + terminal 'filter' + terminal 'first' + terminal 'flow' + terminal 'for' + terminal 'from' + terminal 'function' + terminal 'hastype' + terminal 'if' + terminal 'implies' + terminal 'import' + terminal 'in' + terminal 'inout' + terminal 'interaction' + terminal 'intersects' + terminal 'inv' + terminal 'inverse' + terminal 'inverting' + terminal 'istype' + terminal 'language' + terminal 'library' + terminal 'locale' + terminal 'member' + terminal 'meta' + terminal 'metaclass' + terminal 'metadata' + terminal 'multiplicity' + terminal 'namespace' + terminal 'nonunique' + terminal 'not' + terminal 'null' + terminal 'of' + terminal 'or' + terminal 'ordered' + terminal 'out' + terminal 'package' + terminal 'portion' + terminal 'predicate' + terminal 'private' + terminal 'protected' + terminal 'public' + terminal 'redefines' + terminal 'redefinition' + terminal 'references' + terminal 'rep' + terminal 'return' + terminal 'specialization' + terminal 'specializes' + terminal 'standard' + terminal 'step' + terminal 'struct' + terminal 'subclassifier' + terminal 'subset' + terminal 'subsets' + terminal 'subtype' + terminal 'succession' + terminal 'then' + terminal 'to' + terminal 'true' + terminal 'type' + terminal 'typed' + terminal 'typing' + terminal 'unions' + terminal 'var' + terminal 'xor' + line_comment // Clause 8.2.2.7 Symbols + lexical_rule + RESERVED_SYMBOL + alternation + terminal '~' + terminal '}' + terminal '|' + terminal '{' + terminal '^' + terminal ']' + terminal '[' + terminal '@' + terminal '??' + terminal '?' + terminal '>=' + terminal '>' + terminal '=>' + terminal '===' + terminal '==' + terminal '=' + terminal '<=' + terminal '<' + terminal ';' + terminal ':>>' + terminal ':>' + terminal ':=' + terminal '::>' + terminal '::' + terminal ':' + terminal '/' + terminal '.?' + terminal '..' + terminal '.' + terminal '->' + terminal '-' + terminal ',' + terminal '+' + terminal '**' + terminal '*' + terminal ')' + terminal '(' + terminal '&' + terminal '%' + terminal '$' + terminal '#' + terminal '!==' + terminal '!=' + lexical_rule + TYPED_BY + alternation + terminal ':' + sequence + terminal 'typed' + terminal 'by' + lexical_rule + SPECIALIZES + alternation + terminal ':>' + terminal 'specializes' + lexical_rule + SUBSETS + alternation + terminal ':>' + terminal 'subsets' + lexical_rule + REFERENCES + alternation + terminal '::>' + terminal 'references' + lexical_rule + CROSSES + alternation + terminal '=>' + terminal 'crosses' + lexical_rule + REDEFINES + alternation + terminal ':>>' + terminal 'redefines' + lexical_rule + CONJUGATES + alternation + terminal '~' + terminal 'conjugates' + line_comment // Clause 8.2.3 Root Concrete Syntax + line_comment // Clause 8.2.3.1 Elements and Relationships Concrete Syntax + nonterminal_rule + Identification + abstract_element Element + sequence + expression + sequence + terminal '<' + prop_assign + prop_name declaredShortName + name NAME + terminal '>' + repetition ? + expression + prop_assign + prop_name declaredName + name NAME + repetition ? + nonterminal_rule + RelationshipBody + abstract_element Relationship + alternation + terminal ';' + sequence + terminal '{' + expression + name RelationshipOwnedElement + repetition * + terminal '}' + nonterminal_rule + RelationshipOwnedElement + abstract_element Relationship + alternation + prop_list_append + prop_name ownedRelatedElement + name OwnedRelatedElement + prop_list_append + prop_name ownedRelationship + name OwnedAnnotation + nonterminal_rule + OwnedRelatedElement + abstract_element Element + alternation + name NonFeatureElement + name FeatureElement + line_comment // Clause 8.2.3.2 Dependencies Concrete Syntax + nonterminal_rule + Dependency + sequence + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataAnnotation + repetition * + terminal 'dependency' + expression + sequence + expression + name Identification + repetition ? + terminal 'from' + repetition ? + prop_list_append + prop_name client + qualified_name [QualifiedName] + expression + sequence + terminal ',' + prop_list_append + prop_name client + qualified_name [QualifiedName] + repetition * + terminal 'to' + prop_list_append + prop_name supplier + qualified_name [QualifiedName] + expression + sequence + terminal ',' + prop_list_append + prop_name supplier + qualified_name [QualifiedName] + repetition * + name RelationshipBody + line_comment // Notes: + line_comment // 1. PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12). + line_comment // Clause 8.2.3.3 Annotations Concrete Syntax + line_comment // Clause 8.2.3.3.1 Annotations + nonterminal_rule + Annotation + prop_assign + prop_name annotatedElement + qualified_name [QualifiedName] + nonterminal_rule + OwnedAnnotation + abstract_element Annotation + prop_list_append + prop_name ownedRelatedElement + name AnnotatingElement + nonterminal_rule + AnnotatingElement + alternation + name Comment + name Documentation + name TextualRepresentation + name MetadataFeature + line_comment // Notes: + line_comment // 1. MetadataFeature is defined in the Kernel layer (see 8.2.5.12). + line_comment // Clause 8.2.3.3.2 Comments and Documentation + nonterminal_rule + Comment + sequence + expression + sequence + terminal 'comment' + name Identification + expression + sequence + terminal 'about' + prop_list_append + prop_name ownedRelationship + name Annotation + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name Annotation + repetition * + repetition ? + repetition ? + expression + sequence + terminal 'locale' + prop_assign + prop_name locale + name STRING_VALUE + repetition ? + prop_assign + prop_name body + name REGULAR_COMMENT + nonterminal_rule + Documentation + sequence + terminal 'doc' + name Identification + expression + sequence + terminal 'locale' + prop_assign + prop_name locale + name STRING_VALUE + repetition ? + prop_assign + prop_name body + name REGULAR_COMMENT + line_comment // Notes: + line_comment // 1. The text of a lexical REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation: + line_comment // • Remove the initial /* and final */ characters. + line_comment // • Remove any white space immediately after the initial /*, up to and including the first line terminator (if any). + line_comment // • On each subsequent line of the text: + line_comment // • Strip initial white space other than line terminators. + line_comment // • Then, if the first remaining character is "*", remove it. + line_comment // • Then, if the first remaining character is now a space, remove it. + line_comment // 2. The body text of a Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above. + line_comment // Clause 8.2.3.3.3 Textual Representation + nonterminal_rule + TextualRepresentation + sequence + expression + sequence + terminal 'rep' + name Identification + repetition ? + terminal 'language' + prop_assign + prop_name language + name STRING_VALUE + prop_assign + prop_name body + name REGULAR_COMMENT + line_comment // Notes: + line_comment // 1. The lexical text of a REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation. + line_comment // 2. See also 8.3.2.3.6 on the standard language names recognized for a TextualRepresentation. + line_comment // Clause 8.2.3.4 Namespaces Concrete Syntax + line_comment // Clause 8.2.3.4.1 Namespaces + nonterminal_rule + RootNamespace + abstract_element Namespace + expression + name NamespaceBodyElement + repetition * + line_comment // (See Note 1) + nonterminal_rule + Namespace + sequence + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + name NamespaceDeclaration + name NamespaceBody + line_comment // (See Note 2) + nonterminal_rule + NamespaceDeclaration + abstract_element Namespace + sequence + terminal 'namespace' + name Identification + nonterminal_rule + NamespaceBody + abstract_element Namespace + alternation + terminal ';' + sequence + terminal '{' + expression + name NamespaceBodyElement + repetition * + terminal '}' + nonterminal_rule + NamespaceBodyElement + abstract_element Namespace + alternation + prop_list_append + prop_name ownedRelationship + name NamespaceMember + prop_list_append + prop_name ownedRelationship + name AliasMember + prop_list_append + prop_name ownedRelationship + name Import + nonterminal_rule + MemberPrefix + abstract_element Membership + expression + prop_assign + prop_name visibility + name VisibilityIndicator + repetition ? + nonterminal_rule + VisibilityIndicator + abstract_element VisibilityKind + alternation + terminal 'public' + terminal 'private' + terminal 'protected' + nonterminal_rule + NamespaceMember + abstract_element OwningMembership + alternation + name NonFeatureMember + name NamespaceFeatureMember + nonterminal_rule + NonFeatureMember + abstract_element OwningMembership + sequence + name MemberPrefix + prop_list_append + prop_name ownedRelatedElement + name MemberElement + nonterminal_rule + NamespaceFeatureMember + abstract_element OwningMembership + sequence + name MemberPrefix + prop_list_append + prop_name ownedRelatedElement + name FeatureElement + nonterminal_rule + AliasMember + abstract_element Membership + sequence + name MemberPrefix + terminal 'alias' + expression + sequence + terminal '<' + prop_assign + prop_name memberShortName + name NAME + terminal '>' + repetition ? + expression + prop_assign + prop_name memberName + name NAME + repetition ? + terminal 'for' + prop_assign + prop_name memberElement + qualified_name [QualifiedName] + name RelationshipBody + nonterminal_rule + QualifiedName + sequence + expression + sequence + terminal '$' + terminal '::' + repetition ? + expression + sequence + name NAME + terminal '::' + repetition * + name NAME + line_comment // (See Note 3) + line_comment // Notes: + line_comment // 1. A root Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production. + line_comment // 2. PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12). + line_comment // 3. A qualified name is notated as a sequence of segment names separated by "::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1). + line_comment // Clause 8.2.3.4.2 Imports + nonterminal_rule + Import + sequence + prop_assign + prop_name visibility + name VisibilityIndicator + terminal 'import' + expression + boolean_prop_assign + prop_name isImportAll + terminal 'all' + repetition ? + name ImportDeclaration + name RelationshipBody + nonterminal_rule + ImportDeclaration + abstract_element Import + alternation + name MembershipImport + name NamespaceImport + nonterminal_rule + MembershipImport + sequence + prop_assign + prop_name importedMembership + qualified_name [QualifiedName] + expression + sequence + terminal '::' + boolean_prop_assign + prop_name isRecursive + terminal '**' + repetition ? + line_comment // (See Note 1) + nonterminal_rule + NamespaceImport + alternation + sequence + prop_assign + prop_name importedNamespace + qualified_name [QualifiedName] + terminal '::' + terminal '*' + expression + sequence + terminal '::' + boolean_prop_assign + prop_name isRecursive + terminal '**' + repetition ? + sequence + prop_assign + prop_name importedNamespace + name FilterPackage + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name importedNamespace + nonterminal_rule + FilterPackage + abstract_element Package + sequence + prop_list_append + prop_name ownedRelationship + name ImportDeclaration + expression + prop_list_append + prop_name ownedRelationship + name FilterPackageMember + repetition + + nonterminal_rule + FilterPackageMember + abstract_element ElementFilterMembership + sequence + terminal '[' + prop_list_append + prop_name ownedRelatedElement + name OwnedExpression + terminal ']' + line_comment // Notes: + line_comment // 1. The importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5). + line_comment // Clause 8.2.3.4.3 Namespace Elements + nonterminal_rule + MemberElement + abstract_element Element + alternation + name AnnotatingElement + name NonFeatureElement + nonterminal_rule + NonFeatureElement + abstract_element Element + alternation + name Dependency + name Namespace + name Type + name Classifier + name DataType + name Class + name Structure + name Metaclass + name Association + name AssociationStructure + name Interaction + name Behavior + name Function + name Predicate + name Multiplicity + name Package + name LibraryPackage + name Specialization + name Conjugation + name Subclassification + name Disjoining + name FeatureInverting + name FeatureTyping + name Subsetting + name Redefinition + name TypeFeaturing + nonterminal_rule + FeatureElement + abstract_element Feature + alternation + name Feature + name Step + name Expression + name BooleanExpression + name Invariant + name Connector + name BindingConnector + name Succession + name Flow + name SuccessionFlow + line_comment // Clause 8.2.3.5 Name Resolution + line_comment // Clause 8.2.3.5.1 Name Resolution Overview + line_comment // Clause 8.2.3.5.2 Local and Global Namespaces + line_comment // Clause 8.2.3.5.3 Local and Visible Resolution + line_comment // Clause 8.2.3.5.4 Full Resolution + line_comment // Clause 8.2.4 Core Concrete Syntax + line_comment // Clause 8.2.4.1 Types Concrete Syntax + line_comment // Clause 8.2.4.1.1 Types + nonterminal_rule + Type + sequence + name TypePrefix + terminal 'type' + name TypeDeclaration + name TypeBody + nonterminal_rule + TypePrefix + abstract_element Type + sequence + expression + boolean_prop_assign + prop_name isAbstract + terminal 'abstract' + repetition ? + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + nonterminal_rule + TypeDeclaration + abstract_element Type + sequence + expression + boolean_prop_assign + prop_name isSufficient + terminal 'all' + repetition ? + name Identification + expression + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + repetition ? + expression + alternation + name SpecializationPart + name ConjugationPart + repetition + + expression + name TypeRelationshipPart + repetition * + nonterminal_rule + SpecializationPart + abstract_element Type + sequence + name SPECIALIZES + prop_list_append + prop_name ownedRelationship + name OwnedSpecialization + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedSpecialization + repetition * + nonterminal_rule + ConjugationPart + abstract_element Type + sequence + name CONJUGATES + prop_list_append + prop_name ownedRelationship + name OwnedConjugation + nonterminal_rule + TypeRelationshipPart + abstract_element Type + alternation + name DisjoiningPart + name UnioningPart + name IntersectingPart + name DifferencingPart + nonterminal_rule + DisjoiningPart + abstract_element Type + sequence + terminal 'disjoint' + terminal 'from' + prop_list_append + prop_name ownedRelationship + name OwnedDisjoining + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedDisjoining + repetition * + nonterminal_rule + UnioningPart + abstract_element Type + sequence + terminal 'unions' + prop_list_append + prop_name ownedRelationship + name Unioning + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name Unioning + repetition * + nonterminal_rule + IntersectingPart + abstract_element Type + sequence + terminal 'intersects' + prop_list_append + prop_name ownedRelationship + name Intersecting + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name Intersecting + repetition * + nonterminal_rule + DifferencingPart + abstract_element Type + sequence + terminal 'differences' + prop_list_append + prop_name ownedRelationship + name Differencing + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name Differencing + repetition * + nonterminal_rule + TypeBody + abstract_element Type + alternation + terminal ';' + sequence + terminal '{' + expression + name TypeBodyElement + repetition * + terminal '}' + nonterminal_rule + TypeBodyElement + abstract_element Type + alternation + prop_list_append + prop_name ownedRelationship + name NonFeatureMember + prop_list_append + prop_name ownedRelationship + name FeatureMember + prop_list_append + prop_name ownedRelationship + name AliasMember + prop_list_append + prop_name ownedRelationship + name Import + line_comment // Clause 8.2.4.1.2 Specialization + nonterminal_rule + Specialization + sequence + expression + sequence + terminal 'specialization' + name Identification + repetition ? + terminal 'subtype' + name SpecificType + name SPECIALIZES + name GeneralType + name RelationshipBody + nonterminal_rule + OwnedSpecialization + abstract_element Specialization + name GeneralType + nonterminal_rule + SpecificType + abstract_element Specialization + alternation + prop_assign + prop_name specific + qualified_name [QualifiedName] + sequence + prop_list_append + prop_name specific + name OwnedFeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name specific + nonterminal_rule + GeneralType + abstract_element Specialization + alternation + prop_assign + prop_name general + qualified_name [QualifiedName] + sequence + prop_list_append + prop_name general + name OwnedFeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name general + line_comment // Clause 8.2.4.1.3 Conjugation + nonterminal_rule + Conjugation + sequence + expression + sequence + terminal 'conjugation' + name Identification + repetition ? + terminal 'conjugate' + alternation + prop_assign + prop_name conjugatedType + qualified_name [QualifiedName] + sequence + prop_assign + prop_name conjugatedType + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name conjugatedType + name CONJUGATES + alternation + prop_assign + prop_name originalType + qualified_name [QualifiedName] + sequence + prop_assign + prop_name originalType + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name originalType + name RelationshipBody + nonterminal_rule + OwnedConjugation + abstract_element Conjugation + alternation + prop_assign + prop_name originalType + qualified_name [QualifiedName] + sequence + prop_assign + prop_name originalType + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name originalType + line_comment // Clause 8.2.4.1.4 Disjoining + nonterminal_rule + Disjoining + sequence + expression + sequence + terminal 'disjoining' + name Identification + repetition ? + terminal 'disjoint' + alternation + prop_assign + prop_name typeDisjoined + qualified_name [QualifiedName] + sequence + prop_assign + prop_name typeDisjoined + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name typeDisjoined + terminal 'from' + alternation + prop_assign + prop_name disjoiningType + qualified_name [QualifiedName] + sequence + prop_assign + prop_name disjoiningType + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name disjoiningType + name RelationshipBody + nonterminal_rule + OwnedDisjoining + abstract_element Disjoining + alternation + prop_assign + prop_name disjoiningType + qualified_name [QualifiedName] + sequence + prop_assign + prop_name disjoiningType + name FeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name disjoiningType + line_comment // Clause 8.2.4.1.5 Unioning, Intersecting and Differencing + nonterminal_rule + Unioning + alternation + prop_assign + prop_name unioningType + qualified_name [QualifiedName] + prop_list_append + prop_name ownedRelatedElement + name OwnedFeatureChain + nonterminal_rule + Intersecting + alternation + prop_assign + prop_name intersectingType + qualified_name [QualifiedName] + prop_list_append + prop_name ownedRelatedElement + name OwnedFeatureChain + nonterminal_rule + Differencing + alternation + prop_assign + prop_name differencingType + qualified_name [QualifiedName] + prop_list_append + prop_name ownedRelatedElement + name OwnedFeatureChain + line_comment // Clause 8.2.4.1.6 Feature Membership + nonterminal_rule + FeatureMember + abstract_element OwningMembership + alternation + name TypeFeatureMember + name OwnedFeatureMember + nonterminal_rule + TypeFeatureMember + abstract_element OwningMembership + sequence + name MemberPrefix + terminal 'member' + prop_list_append + prop_name ownedRelatedElement + name FeatureElement + nonterminal_rule + OwnedFeatureMember + abstract_element FeatureMembership + sequence + name MemberPrefix + prop_list_append + prop_name ownedRelatedElement + name FeatureElement + line_comment // Clause 8.2.4.2 Classifiers Concrete Syntax + line_comment // Clause 8.2.4.2.1 Classifiers + nonterminal_rule + Classifier + sequence + name TypePrefix + terminal 'classifier' + name ClassifierDeclaration + name TypeBody + nonterminal_rule + ClassifierDeclaration + abstract_element Classifier + sequence + expression + boolean_prop_assign + prop_name isSufficient + terminal 'all' + repetition ? + name Identification + expression + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + repetition ? + expression + alternation + name SuperclassingPart + name ConjugationPart + repetition ? + expression + name TypeRelationshipPart + repetition * + nonterminal_rule + SuperclassingPart + abstract_element Classifier + sequence + name SPECIALIZES + prop_list_append + prop_name ownedRelationship + name OwnedSubclassification + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedSubclassification + repetition * + line_comment // Clause 8.2.4.2.2 Subclassification + nonterminal_rule + Subclassification + sequence + expression + sequence + terminal 'specialization' + name Identification + repetition ? + terminal 'subclassifier' + prop_assign + prop_name subclassifier + qualified_name [QualifiedName] + name SPECIALIZES + prop_assign + prop_name superclassifier + qualified_name [QualifiedName] + name RelationshipBody + nonterminal_rule + OwnedSubclassification + abstract_element Subclassification + prop_assign + prop_name superclassifier + qualified_name [QualifiedName] + line_comment // Clause 8.2.4.3 Features Concrete Syntax + line_comment // Clause 8.2.4.3.1 Features + nonterminal_rule + Feature + sequence + alternation + sequence + name FeaturePrefix + alternation + terminal 'feature' + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + expression + name FeatureDeclaration + repetition ? + sequence + alternation + name EndFeaturePrefix + name BasicFeaturePrefix + name FeatureDeclaration + expression + name ValuePart + repetition ? + name TypeBody + line_comment // (See Note 1) + nonterminal_rule + EndFeaturePrefix + abstract_element Feature + sequence + expression + sequence + boolean_prop_assign + prop_name isConstant + terminal 'const' + nonparsing_prop_assign + prop_name isVariable + prop_name true + repetition ? + boolean_prop_assign + prop_name isEnd + terminal 'end' + nonterminal_rule + BasicFeaturePrefix + abstract_element Feature + sequence + expression + prop_assign + prop_name direction + name FeatureDirection + repetition ? + expression + boolean_prop_assign + prop_name isDerived + terminal 'derived' + repetition ? + expression + boolean_prop_assign + prop_name isAbstract + terminal 'abstract' + repetition ? + expression + alternation + boolean_prop_assign + prop_name isComposite + terminal 'composite' + boolean_prop_assign + prop_name isPortion + terminal 'portion' + repetition ? + expression + alternation + boolean_prop_assign + prop_name isVariable + terminal 'var' + sequence + boolean_prop_assign + prop_name isConstant + terminal 'const' + nonparsing_prop_assign + prop_name isVariable + prop_name true + repetition ? + nonterminal_rule + FeaturePrefix + sequence + alternation + sequence + name EndFeaturePrefix + expression + prop_list_append + prop_name ownedRelationship + name OwnedCrossFeatureMember + repetition ? + name BasicFeaturePrefix + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + line_comment // (See Note 1) + nonterminal_rule + OwnedCrossFeatureMember + abstract_element OwningMembership + prop_list_append + prop_name ownedRelatedElement + name OwnedCrossFeature + nonterminal_rule + OwnedCrossFeature + abstract_element Feature + sequence + name BasicFeaturePrefix + name FeatureDeclaration + nonterminal_rule + FeatureDirection + abstract_element FeatureDirectionKind + alternation + terminal 'in' + terminal 'out' + terminal 'inout' + nonterminal_rule + FeatureDeclaration + abstract_element Feature + sequence + expression + boolean_prop_assign + prop_name isSufficient + terminal 'all' + repetition ? + alternation + sequence + name FeatureIdentification + expression + alternation + name FeatureSpecializationPart + name ConjugationPart + repetition ? + name FeatureSpecializationPart + name ConjugationPart + expression + name FeatureRelationshipPart + repetition * + nonterminal_rule + FeatureIdentification + abstract_element Feature + alternation + sequence + terminal '<' + prop_assign + prop_name declaredShortName + name NAME + terminal '>' + expression + prop_assign + prop_name declaredName + name NAME + repetition ? + prop_assign + prop_name declaredName + name NAME + nonterminal_rule + FeatureRelationshipPart + abstract_element Feature + alternation + name TypeRelationshipPart + name ChainingPart + name InvertingPart + name TypeFeaturingPart + nonterminal_rule + ChainingPart + abstract_element Feature + sequence + terminal 'chains' + alternation + prop_list_append + prop_name ownedRelationship + name OwnedFeatureChaining + name FeatureChain + nonterminal_rule + InvertingPart + abstract_element Feature + sequence + terminal 'inverse' + terminal 'of' + prop_list_append + prop_name ownedRelationship + name OwnedFeatureInverting + nonterminal_rule + TypeFeaturingPart + abstract_element Feature + sequence + terminal 'featured' + terminal 'by' + prop_list_append + prop_name ownedRelationship + name OwnedTypeFeaturing + expression + sequence + terminal ',' + prop_list_append + prop_name ownedTypeFeaturing + name OwnedTypeFeaturing + repetition * + nonterminal_rule + FeatureSpecializationPart + abstract_element Feature + alternation + sequence + expression + name FeatureSpecialization + repetition + + expression + name MultiplicityPart + repetition ? + expression + name FeatureSpecialization + repetition * + sequence + name MultiplicityPart + expression + name FeatureSpecialization + repetition * + nonterminal_rule + MultiplicityPart + abstract_element Feature + alternation + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + sequence + expression + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + repetition ? + alternation + sequence + boolean_prop_assign + prop_name isOrdered + terminal 'ordered' + expression + sequence + nonparsing_prop_assign + prop_name isUnique + prop_name false + terminal 'nonunique' + repetition ? + sequence + nonparsing_prop_assign + prop_name isUnique + prop_name false + terminal 'nonunique' + expression + boolean_prop_assign + prop_name isOrdered + terminal 'ordered' + repetition ? + nonterminal_rule + FeatureSpecialization + abstract_element Feature + alternation + name Typings + name Subsettings + name References + name Crosses + name Redefinitions + nonterminal_rule + Typings + abstract_element Feature + sequence + name TypedBy + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + repetition * + nonterminal_rule + TypedBy + abstract_element Feature + sequence + name TYPED_BY + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + nonterminal_rule + Subsettings + abstract_element Feature + sequence + name Subsets + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedSubsetting + repetition * + nonterminal_rule + Subsets + abstract_element Feature + sequence + name SUBSETS + prop_list_append + prop_name ownedRelationship + name OwnedSubsetting + nonterminal_rule + References + abstract_element Feature + sequence + name REFERENCES + prop_list_append + prop_name ownedRelationship + name OwnedReferenceSubsetting + nonterminal_rule + Crosses + abstract_element Feature + sequence + name CROSSES + prop_list_append + prop_name ownedRelationship + name OwnedCrossSubsetting + nonterminal_rule + Redefinitions + abstract_element Feature + sequence + name Redefines + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name OwnedRedefinition + repetition * + nonterminal_rule + Redefines + abstract_element Feature + sequence + name REDEFINES + prop_list_append + prop_name ownedRelationship + name OwnedRedefinition + line_comment // Notes: + line_comment // 1. PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12). + line_comment // Clause 8.2.4.3.2 Feature Typing + nonterminal_rule + FeatureTyping + sequence + expression + sequence + terminal 'specialization' + name Identification + repetition ? + terminal 'typing' + prop_assign + prop_name typedFeature + qualified_name [QualifiedName] + name TYPED_BY + name GeneralType + name RelationshipBody + nonterminal_rule + OwnedFeatureTyping + abstract_element FeatureTyping + name GeneralType + line_comment // Clause 8.2.4.3.3 Subsetting + nonterminal_rule + Subsetting + sequence + expression + sequence + terminal 'specialization' + name Identification + repetition ? + terminal 'subset' + name SpecificType + name SUBSETS + name GeneralType + name RelationshipBody + nonterminal_rule + OwnedSubsetting + abstract_element Subsetting + name GeneralType + nonterminal_rule + OwnedReferenceSubsetting + abstract_element ReferenceSubsetting + name GeneralType + nonterminal_rule + OwnedCrossSubsetting + abstract_element CrossSubsetting + name GeneralType + line_comment // Clause 8.2.4.3.4 Redefinition + nonterminal_rule + Redefinition + sequence + expression + sequence + terminal 'specialization' + name Identification + repetition ? + terminal 'redefinition' + name SpecificType + name REDEFINES + name GeneralType + name RelationshipBody + nonterminal_rule + OwnedRedefinition + abstract_element Redefinition + name GeneralType + line_comment // Clause 8.2.4.3.5 Feature Chaining + nonterminal_rule + OwnedFeatureChain + abstract_element Feature + name FeatureChain + nonterminal_rule + FeatureChain + abstract_element Feature + sequence + prop_list_append + prop_name ownedRelationship + name OwnedFeatureChaining + expression + sequence + terminal '.' + prop_list_append + prop_name ownedRelationship + name OwnedFeatureChaining + repetition + + nonterminal_rule + OwnedFeatureChaining + abstract_element FeatureChaining + prop_assign + prop_name chainingFeature + qualified_name [QualifiedName] + line_comment // Clause 8.2.4.3.6 Feature Inverting + nonterminal_rule + FeatureInverting + sequence + expression + sequence + terminal 'inverting' + expression + name Identification + repetition ? + repetition ? + terminal 'inverse' + alternation + prop_assign + prop_name featureInverted + qualified_name [QualifiedName] + sequence + prop_assign + prop_name featureInverted + name OwnedFeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name featureInverted + terminal 'of' + alternation + prop_assign + prop_name invertingFeature + qualified_name [QualifiedName] + sequence + prop_list_append + prop_name ownedRelatedElement + name OwnedFeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name invertingFeature + name RelationshipBody + nonterminal_rule + OwnedFeatureInverting + abstract_element FeatureInverting + alternation + prop_assign + prop_name invertingFeature + qualified_name [QualifiedName] + sequence + prop_assign + prop_name invertingFeature + name OwnedFeatureChain + nonparsing_prop_list_append + prop_name ownedRelatedElement + prop_name invertingFeature + line_comment // Clause 8.2.4.3.7 Type Featuring + nonterminal_rule + TypeFeaturing + sequence + terminal 'featuring' + expression + sequence + name Identification + terminal 'of' + repetition ? + prop_assign + prop_name featureOfType + qualified_name [QualifiedName] + terminal 'by' + prop_assign + prop_name featuringType + qualified_name [QualifiedName] + name RelationshipBody + nonterminal_rule + OwnedTypeFeaturing + abstract_element TypeFeaturing + prop_assign + prop_name featuringType + qualified_name [QualifiedName] + line_comment // Clause 8.2.5 Kernel Concrete Syntax + line_comment // Clause 8.2.5.1 Data Types Concrete Syntax + nonterminal_rule + DataType + sequence + name TypePrefix + terminal 'datatype' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.2 Classes Concrete Syntax + nonterminal_rule + Class + sequence + name TypePrefix + terminal 'class' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.3 Structures Concrete Syntax + nonterminal_rule + Structure + sequence + name TypePrefix + terminal 'struct' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.4 Associations Concrete Syntax + nonterminal_rule + Association + sequence + name TypePrefix + terminal 'assoc' + name ClassifierDeclaration + name TypeBody + nonterminal_rule + AssociationStructure + sequence + name TypePrefix + terminal 'assoc' + terminal 'struct' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.5 Connectors Concrete Syntax + line_comment // Clause 8.2.5.5.1 Connectors + nonterminal_rule + Connector + sequence + name FeaturePrefix + terminal 'connector' + alternation + sequence + expression + name FeatureDeclaration + repetition ? + expression + name ValuePart + repetition ? + name ConnectorDeclaration + name TypeBody + nonterminal_rule + ConnectorDeclaration + abstract_element Connector + alternation + name BinaryConnectorDeclaration + name NaryConnectorDeclaration + nonterminal_rule + BinaryConnectorDeclaration + abstract_element Connector + sequence + expression + alternation + sequence + expression + name FeatureDeclaration + repetition ? + terminal 'from' + sequence + boolean_prop_assign + prop_name isSufficient + terminal 'all' + expression + terminal 'from' + repetition ? + repetition ? + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal 'to' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + nonterminal_rule + NaryConnectorDeclaration + abstract_element Connector + sequence + expression + name FeatureDeclaration + repetition ? + terminal '(' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal ',' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + repetition * + terminal ')' + nonterminal_rule + ConnectorEndMember + abstract_element EndFeatureMembership + prop_list_append + prop_name ownedRelatedElement + name ConnectorEnd + nonterminal_rule + ConnectorEnd + abstract_element Feature + sequence + expression + prop_list_append + prop_name ownedRelationship + name OwnedCrossMultiplicityMember + repetition ? + expression + sequence + prop_assign + prop_name declaredName + name NAME + name REFERENCES + repetition ? + prop_list_append + prop_name ownedRelationship + name OwnedReferenceSubsetting + nonterminal_rule + OwnedCrossMultiplicityMember + abstract_element OwningMembership + prop_list_append + prop_name ownedRelatedElement + name OwnedCrossMultiplicity + nonterminal_rule + OwnedCrossMultiplicity + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + line_comment // Clause 8.2.5.5.2 Binding Connectors + nonterminal_rule + BindingConnector + sequence + name FeaturePrefix + terminal 'binding' + name BindingConnectorDeclaration + name TypeBody + nonterminal_rule + BindingConnectorDeclaration + abstract_element BindingConnector + alternation + sequence + name FeatureDeclaration + expression + sequence + terminal 'of' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal '=' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + repetition ? + sequence + expression + boolean_prop_assign + prop_name isSufficient + terminal 'all' + repetition ? + expression + sequence + expression + terminal 'of' + repetition ? + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal '=' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + repetition ? + line_comment // Clause 8.2.5.5.3 Successions + nonterminal_rule + Succession + sequence + name FeaturePrefix + terminal 'succession' + name SuccessionDeclaration + name TypeBody + nonterminal_rule + SuccessionDeclaration + abstract_element Succession + alternation + sequence + name FeatureDeclaration + expression + sequence + terminal 'first' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal 'then' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + repetition ? + sequence + expression + boolean_prop_assign + prop_name + s + isSufficient + terminal 'all' + repetition ? + expression + sequence + expression + terminal 'first' + repetition ? + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + terminal 'then' + prop_list_append + prop_name ownedRelationship + name ConnectorEndMember + repetition ? + line_comment // Clause 8.2.5.6 Behaviors Concrete Syntax + line_comment // Clause 8.2.5.6.1 Behaviors + nonterminal_rule + Behavior + sequence + name TypePrefix + terminal 'behavior' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.6.2 Steps + nonterminal_rule + Step + sequence + name FeaturePrefix + terminal 'step' + name FeatureDeclaration + expression + name ValuePart + repetition ? + name TypeBody + line_comment // Clause 8.2.5.7 Functions Concrete Syntax + line_comment // Clause 8.2.5.7.1 Functions + nonterminal_rule + Function + sequence + name TypePrefix + terminal 'function' + name ClassifierDeclaration + name FunctionBody + nonterminal_rule + FunctionBody + abstract_element Type + alternation + terminal ';' + sequence + terminal '{' + name FunctionBodyPart + terminal '}' + nonterminal_rule + FunctionBodyPart + abstract_element Type + sequence + expression + alternation + name TypeBodyElement + prop_list_append + prop_name ownedRelationship + name ReturnFeatureMember + repetition * + expression + prop_list_append + prop_name ownedRelationship + name ResultExpressionMember + repetition ? + nonterminal_rule + ReturnFeatureMember + abstract_element ReturnParameterMembership + sequence + name MemberPrefix + terminal 'return' + prop_list_append + prop_name ownedRelatedElement + name FeatureElement + nonterminal_rule + ResultExpressionMember + abstract_element ResultExpressionMembership + sequence + name MemberPrefix + prop_list_append + prop_name ownedRelatedElement + name OwnedExpression + line_comment // Clause 8.2.5.7.2 Expressions + nonterminal_rule + Expression + sequence + name FeaturePrefix + terminal 'expr' + name FeatureDeclaration + expression + name ValuePart + repetition ? + name FunctionBody + line_comment // Clause 8.2.5.7.3 Predicates + nonterminal_rule + Predicate + sequence + name TypePrefix + terminal 'predicate' + name ClassifierDeclaration + name FunctionBody + line_comment // Clause 8.2.5.7.4 Boolean Expressions and Invariants + nonterminal_rule + BooleanExpression + sequence + name FeaturePrefix + terminal 'bool' + name FeatureDeclaration + expression + name ValuePart + repetition ? + name FunctionBody + nonterminal_rule + Invariant + sequence + name FeaturePrefix + terminal 'inv' + expression + alternation + terminal 'true' + boolean_prop_assign + prop_name isNegated + terminal 'false' + repetition ? + name FeatureDeclaration + expression + name ValuePart + repetition ? + name FunctionBody + line_comment // Clause 8.2.5.8 Expressions Concrete Syntax + line_comment // Clause 8.2.5.8.1 Operator Expressions + nonterminal_rule + OwnedExpressionReferenceMember + abstract_element FeatureMembership + prop_list_append + prop_name ownedRelationship + name OwnedExpressionReference + nonterminal_rule + OwnedExpressionReference + abstract_element FeatureReferenceExpression + prop_list_append + prop_name ownedRelationship + name OwnedExpressionMember + nonterminal_rule + OwnedExpressionMember + abstract_element FeatureMembership + prop_assign + prop_name ownedFeatureMember + name OwnedExpression + nonterminal_rule + OwnedExpression + abstract_element Expression + alternation + name ConditionalExpression + name ConditionalBinaryOperatorExpression + name BinaryOperatorExpression + name UnaryOperatorExpression + name ClassificationExpression + name MetaclassificationExpression + name ExtentExpression + name PrimaryExpression + nonterminal_rule + ConditionalExpression + abstract_element OperatorExpression + sequence + prop_assign + prop_name operator + terminal 'if' + prop_list_append + prop_name ownedRelationship + name ArgumentMember + terminal '?' + prop_list_append + prop_name ownedRelationship + name ArgumentExpressionMember + terminal 'else' + prop_list_append + prop_name ownedRelationship + name ArgumentExpressionMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + ConditionalBinaryOperatorExpression + abstract_element OperatorExpression + sequence + prop_list_append + prop_name ownedRelationship + name ArgumentMember + prop_assign + prop_name operator + name ConditionalBinaryOperator + prop_list_append + prop_name ownedRelationship + name ArgumentExpressionMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + ConditionalBinaryOperator + alternation + terminal '??' + terminal 'or' + terminal 'and' + terminal 'implies' + nonterminal_rule + BinaryOperatorExpression + abstract_element OperatorExpression + sequence + prop_list_append + prop_name ownedRelationship + name ArgumentMember + prop_assign + prop_name operator + name BinaryOperator + prop_list_append + prop_name ownedRelationship + name ArgumentMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + BinaryOperator + alternation + terminal '|' + terminal '&' + terminal 'xor' + terminal '..' + terminal '==' + terminal '!=' + terminal '===' + terminal '!==' + terminal '<' + terminal '>' + terminal '<=' + terminal '>=' + terminal '+' + terminal '-' + terminal '*' + terminal '/' + terminal '%' + terminal '^' + terminal '**' + nonterminal_rule + UnaryOperatorExpression + abstract_element OperatorExpression + sequence + prop_assign + prop_name operator + name UnaryOperator + prop_list_append + prop_name ownedRelationship + name ArgumentMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + UnaryOperator + alternation + terminal '+' + terminal '-' + terminal '~' + terminal 'not' + nonterminal_rule + ClassificationExpression + abstract_element OperatorExpression + sequence + expression + prop_list_append + prop_name ownedRelationship + name ArgumentMember + repetition ? + alternation + sequence + prop_assign + prop_name operator + name ClassificationTestOperator + prop_list_append + prop_name ownedRelationship + name TypeReferenceMember + sequence + prop_assign + prop_name operator + name CastOperator + prop_list_append + prop_name ownedRelationship + name TypeResultMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + ClassificationTestOperator + alternation + terminal 'istype' + terminal 'hastype' + terminal '@' + nonterminal_rule + CastOperator + terminal 'as' + nonterminal_rule + MetaclassificationExpression + abstract_element OperatorExpression + sequence + prop_list_append + prop_name ownedRelationship + name MetadataArgumentMember + alternation + sequence + prop_assign + prop_name operator + name ClassificationTestOperator + prop_list_append + prop_name ownedRelationship + name TypeReferenceMember + sequence + prop_assign + prop_name operator + name MetaCastOperator + prop_list_append + prop_name ownedRelationship + name TypeResultMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + ArgumentMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberParameter + name Argument + nonterminal_rule + Argument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name ArgumentValue + nonterminal_rule + ArgumentValue + abstract_element FeatureValue + prop_assign + prop_name value + name OwnedExpression + nonterminal_rule + ArgumentExpressionMember + abstract_element FeatureMembership + prop_list_append + prop_name ownedRelatedElement + name ArgumentExpression + nonterminal_rule + ArgumentExpression + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name ArgumentExpressionValue + nonterminal_rule + ArgumentExpressionValue + abstract_element FeatureValue + prop_assign + prop_name value + name OwnedExpressionReference + nonterminal_rule + MetadataArgumentMember + abstract_element ParameterMembership + prop_list_append + prop_name ownedRelatedElement + name MetadataArgument + nonterminal_rule + MetadataArgument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name MetadataValue + nonterminal_rule + MetadataValue + abstract_element FeatureValue + prop_assign + prop_name value + name MetadataReference + nonterminal_rule + MetadataReference + abstract_element MetadataAccessExpression + prop_list_append + prop_name ownedRelationship + name ElementReferenceMember + nonterminal_rule + MetaclassificationTestOperator + terminal '@@' + nonterminal_rule + MetaCastOperator + terminal 'meta' + nonterminal_rule + ExtentExpression + abstract_element OperatorExpression + sequence + prop_assign + prop_name operator + terminal 'all' + prop_list_append + prop_name ownedRelationship + name TypeReferenceMember + nonterminal_rule + TypeReferenceMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberFeature + name TypeReference + nonterminal_rule + TypeResultMember + abstract_element ResultParameterMembership + prop_assign + prop_name ownedMemberFeature + name TypeReference + nonterminal_rule + TypeReference + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name ReferenceTyping + nonterminal_rule + ReferenceTyping + abstract_element FeatureTyping + prop_assign + prop_name type + qualified_name [QualifiedName] + nonterminal_rule + EmptyResultMember + abstract_element ReturnParameterMembership + prop_list_append + prop_name ownedRelatedElement + name EmptyFeature + nonterminal_rule + EmptyFeature + abstract_element Feature + nonparsing_empty_value + line_comment // Notes: + line_comment // 1. OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details). + line_comment // 2. Though not directly expressed in the syntactic productions given above, in any OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right). + line_comment // 3. The unary operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + line_comment // Clause 8.2.5.8.2 Primary Expressions + nonterminal_rule + PrimaryExpression + abstract_element Expression + alternation + name FeatureChainExpression + name NonFeatureChainPrimaryExpression + nonterminal_rule + PrimaryArgumentValue + abstract_element FeatureValue + prop_assign + prop_name value + name PrimaryExpression + nonterminal_rule + PrimaryArgument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentValue + nonterminal_rule + PrimaryArgumentMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberParameter + name PrimaryArgument + nonterminal_rule + NonFeatureChainPrimaryExpression + abstract_element Expression + alternation + name BracketExpression + name IndexExpression + name SequenceExpression + name SelectExpression + name CollectExpression + name FunctionOperationExpression + name BaseExpression + nonterminal_rule + NonFeatureChainPrimaryArgumentValue + abstract_element FeatureValue + prop_assign + prop_name value + name NonFeatureChainPrimaryExpression + nonterminal_rule + NonFeatureChainPrimaryArgument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name NonFeatureChainPrimaryArgumentValue + nonterminal_rule + NonFeatureChainPrimaryArgumentMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberParameter + name PrimaryArgument + nonterminal_rule + BracketExpression + abstract_element OperatorExpression + sequence + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentMember + prop_assign + prop_name operator + terminal '[' + prop_list_append + prop_name ownedRelationship + name SequenceExpressionListMember + terminal ']' + nonterminal_rule + IndexExpression + sequence + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentMember + terminal '#' + terminal '(' + prop_list_append + prop_name ownedRelationship + name SequenceExpressionListMember + terminal ')' + nonterminal_rule + SequenceExpression + abstract_element Expression + sequence + terminal '(' + name SequenceExpressionList + terminal ')' + nonterminal_rule + SequenceExpressionList + abstract_element Expression + alternation + sequence + name OwnedExpression + expression + terminal ',' + repetition ? + name SequenceOperatorExpression + nonterminal_rule + SequenceOperatorExpression + abstract_element OperatorExpression + sequence + prop_list_append + prop_name ownedRelationship + name OwnedExpressionMember + prop_assign + prop_name operator + terminal ',' + prop_list_append + prop_name ownedRelationship + name SequenceExpressionListMember + nonterminal_rule + SequenceExpressionListMember + abstract_element FeatureMembership + prop_assign + prop_name ownedMemberFeature + name SequenceExpressionList + nonterminal_rule + FeatureChainExpression + sequence + prop_list_append + prop_name ownedRelationship + name NonFeatureChainPrimaryArgumentMember + terminal '.' + prop_list_append + prop_name ownedRelationship + name FeatureChainMember + nonterminal_rule + CollectExpression + sequence + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentMember + terminal '.' + prop_list_append + prop_name ownedRelationship + name BodyArgumentMember + nonterminal_rule + SelectExpression + sequence + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentMember + terminal '.?' + prop_list_append + prop_name ownedRelationship + name BodyArgumentMember + nonterminal_rule + FunctionOperationExpression + abstract_element InvocationExpression + sequence + prop_list_append + prop_name ownedRelationship + name PrimaryArgumentMember + terminal '->' + prop_list_append + prop_name ownedRelationship + name InvocationTypeMember + alternation + prop_list_append + prop_name ownedRelationship + name BodyArgumentMember + prop_list_append + prop_name ownedRelationship + name FunctionReferenceArgumentMember + name ArgumentList + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + BodyArgumentMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberParameter + name BodyArgument + nonterminal_rule + BodyArgument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name BodyArgumentValue + nonterminal_rule + BodyArgumentValue + abstract_element FeatureValue + prop_assign + prop_name value + name BodyExpression + nonterminal_rule + FunctionReferenceArgumentMember + abstract_element ParameterMembership + prop_assign + prop_name ownedMemberParameter + name FunctionReferenceArgument + nonterminal_rule + FunctionReferenceArgument + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name FunctionReferenceArgumentValue + nonterminal_rule + FunctionReferenceArgumentValue + abstract_element FeatureValue + prop_assign + prop_name value + name FunctionReferenceExpression + nonterminal_rule + FunctionReferenceExpression + abstract_element FeatureReferenceExpression + prop_list_append + prop_name ownedRelationship + name FunctionReferenceMember + nonterminal_rule + FunctionReferenceMember + abstract_element FeatureMembership + prop_assign + prop_name ownedMemberFeature + name FunctionReference + nonterminal_rule + FunctionReference + abstract_element Expression + prop_list_append + prop_name ownedRelationship + name ReferenceTyping + nonterminal_rule + FeatureChainMember + abstract_element Membership + alternation + name FeatureReferenceMember + name OwnedFeatureChainMember + nonterminal_rule + OwnedFeatureChainMember + abstract_element OwningMembership + prop_assign + prop_name ownedMemberElement + name FeatureChain + line_comment // Notes: + line_comment // 1. Primary expressions provide additional shorthand notations for certain kinds of InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18). + line_comment // 2. The grammar allows a bracket syntax [...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + line_comment // Clause 8.2.5.8.3 Base Expressions + nonterminal_rule + BaseExpression + abstract_element Expression + alternation + name NullExpression + name LiteralExpression + name FeatureReferenceExpression + name MetadataAccessExpression + name InvocationExpression + name ConstructorExpression + name BodyExpression + nonterminal_rule + NullExpression + abstract_element NullExpression + alternation + terminal 'null' + sequence + terminal '(' + terminal ')' + nonterminal_rule + FeatureReferenceExpression + abstract_element FeatureReferenceExpression + sequence + prop_list_append + prop_name ownedRelationship + name FeatureReferenceMember + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + FeatureReferenceMember + abstract_element Membership + prop_assign + prop_name memberElement + name FeatureReference + nonterminal_rule + FeatureReference + abstract_element Feature + qualified_name [QualifiedName] + nonterminal_rule + MetadataAccessExpression + sequence + prop_list_append + prop_name ownedRelationship + name ElementReferenceMember + terminal '.' + terminal 'metadata' + nonterminal_rule + ElementReferenceMember + abstract_element Membership + prop_assign + prop_name memberElement + qualified_name [QualifiedName] + nonterminal_rule + InvocationExpression + abstract_element InvocationExpression + sequence + prop_list_append + prop_name ownedRelationship + name InstantiatedTypeMember + name ArgumentList + prop_list_append + prop_name ownedRelationship + name EmptyResultMember + nonterminal_rule + ConstructorExpression + sequence + terminal 'new' + prop_list_append + prop_name ownedRelationship + name InstantiatedTypeMember + prop_list_append + prop_name ownedRelationship + name ConstructorResultMember + nonterminal_rule + ConstructorResultMember + abstract_element ReturnParameterMembership + prop_list_append + prop_name ownedRelatedElement + name ConstructorResult + nonterminal_rule + ConstructorResult + abstract_element Feature + name ArgumentList + nonterminal_rule + InstantiatedTypeMember + abstract_element Membership + alternation + prop_assign + prop_name memberElement + name InstantiatedTypeReference + name OwnedFeatureChainMember + nonterminal_rule + InstantiatedTypeReference + abstract_element Type + qualified_name [QualifiedName] + nonterminal_rule + ArgumentList + abstract_element Feature + sequence + terminal '(' + expression + alternation + name PositionalArgumentList + name NamedArgumentList + repetition ? + terminal ')' + nonterminal_rule + PositionalArgumentList + abstract_element Feature + sequence + prop_list_append + prop_name + e + ownedRelationship + name ArgumentMember + expression + sequence + terminal ',' + prop_list_append + prop_name + e + ownedRelationship + name ArgumentMember + repetition * + nonterminal_rule + NamedArgumentList + abstract_element Feature + sequence + prop_list_append + prop_name ownedRelationship + name NamedArgumentMember + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name NamedArgumentMember + repetition * + nonterminal_rule + NamedArgumentMember + abstract_element FeatureMembership + prop_assign + prop_name ownedMemberFeature + name NamedArgument + nonterminal_rule + NamedArgument + abstract_element Feature + sequence + prop_list_append + prop_name ownedRelationship + name ParameterRedefinition + terminal '=' + prop_list_append + prop_name ownedRelationship + name ArgumentValue + nonterminal_rule + ParameterRedefinition + abstract_element Redefinition + prop_assign + prop_name redefinedFeature + qualified_name [QualifiedName] + nonterminal_rule + BodyExpression + abstract_element FeatureReferenceExpression + prop_list_append + prop_name ownedRelationship + name ExpressionBodyMember + nonterminal_rule + ExpressionBodyMember + abstract_element FeatureMembership + prop_assign + prop_name ownedMemberFeature + name ExpressionBody + nonterminal_rule + ExpressionBody + abstract_element Expression + sequence + terminal '{' + name FunctionBodyPart + terminal '}' + line_comment // Clause 8.2.5.8.4 Literal Expressions + nonterminal_rule + LiteralExpression + alternation + name LiteralBoolean + name LiteralString + name LiteralInteger + name LiteralReal + name LiteralInfinity + nonterminal_rule + LiteralBoolean + prop_assign + prop_name value + name BooleanValue + nonterminal_rule + BooleanValue + abstract_element Boolean + alternation + terminal 'true' + terminal 'false' + nonterminal_rule + LiteralString + prop_assign + prop_name value + name STRING_VALUE + nonterminal_rule + LiteralInteger + prop_assign + prop_name value + name DECIMAL_VALUE + nonterminal_rule + LiteralReal + prop_assign + prop_name value + name RealValue + nonterminal_rule + RealValue + abstract_element Real + alternation + sequence + expression + name DECIMAL_VALUE + repetition ? + terminal '.' + alternation + name DECIMAL_VALUE + name EXPONENTIAL_VALUE + name EXPONENTIAL_VALUE + nonterminal_rule + LiteralInfinity + terminal '*' + line_comment // Clause 8.2.5.9 Interactions Concrete Syntax + line_comment // Clause 8.2.5.9.1 Interactions + nonterminal_rule + Interaction + sequence + name TypePrefix + terminal 'interaction' + name ClassifierDeclaration + name TypeBody + line_comment // Clause 8.2.5.9.2 Flows + nonterminal_rule + Flow + sequence + name FeaturePrefix + terminal 'flow' + name FlowDeclaration + name TypeBody + nonterminal_rule + SuccessionFlow + sequence + name FeaturePrefix + terminal 'succession' + terminal 'flow' + name FlowDeclaration + name TypeBody + nonterminal_rule + FlowDeclaration + abstract_element Flow + alternation + sequence + name FeatureDeclaration + expression + name ValuePart + repetition ? + expression + sequence + terminal 'of' + prop_list_append + prop_name ownedRelationship + name PayloadFeatureMember + repetition ? + expression + sequence + terminal 'from' + prop_list_append + prop_name ownedRelationship + name FlowEndMember + terminal 'to' + prop_list_append + prop_name ownedRelationship + name FlowEndMember + repetition ? + sequence + expression + boolean_prop_assign + prop_name isSufficient + terminal 'all' + repetition ? + prop_list_append + prop_name ownedRelationship + name FlowEndMember + terminal 'to' + prop_list_append + prop_name ownedRelationship + name FlowEndMember + nonterminal_rule + PayloadFeatureMember + abstract_element FeatureMembership + prop_assign + prop_name ownedRelatedElement + name PayloadFeature + nonterminal_rule + PayloadFeature + alternation + sequence + name Identification + name PayloadFeatureSpecializationPart + expression + name ValuePart + repetition ? + sequence + name Identification + name ValuePart + sequence + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + expression + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + repetition ? + sequence + prop_list_append + prop_name ownedRelationship + name OwnedMultiplicity + expression + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + repetition ? + nonterminal_rule + PayloadFeatureSpecializationPart + abstract_element Feature + alternation + sequence + expression + name FeatureSpecialization + repetition + + expression + name MultiplicityPart + repetition ? + expression + name FeatureSpecialization + repetition * + sequence + name MultiplicityPart + expression + name FeatureSpecialization + repetition + + nonterminal_rule + FlowEndMember + abstract_element EndFeatureMembership + prop_list_append + prop_name ownedRelatedElement + name FlowEnd + nonterminal_rule + FlowEnd + sequence + expression + sequence + prop_list_append + prop_name ownedRelationship + name OwnedReferenceSubsetting + terminal '.' + repetition ? + prop_list_append + prop_name ownedRelationship + name FlowFeatureMember + nonterminal_rule + FlowFeatureMember + abstract_element FeatureMembership + prop_list_append + prop_name ownedRelatedElement + name FlowFeature + nonterminal_rule + FlowFeature + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name FlowFeatureRedefinition + line_comment // (See Note 1) + nonterminal_rule + FlowFeatureRedefinition + abstract_element Redefinition + prop_assign + prop_name redefinedFeature + qualified_name [QualifiedName] + line_comment // Notes: + line_comment // 1. To ensure that an FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + line_comment // Clause 8.2.5.10 Feature Values Concrete Syntax + nonterminal_rule + ValuePart + abstract_element Feature + prop_list_append + prop_name ownedRelationship + name FeatureValue + nonterminal_rule + FeatureValue + sequence + alternation + terminal '=' + boolean_prop_assign + prop_name isInitial + terminal ':=' + sequence + boolean_prop_assign + prop_name isDefault + terminal 'default' + expression + alternation + terminal '=' + boolean_prop_assign + prop_name isInitial + terminal ':=' + repetition ? + prop_list_append + prop_name ownedRelatedElement + name OwnedExpression + line_comment // Clause 8.2.5.11 Multiplicities Concrete Syntax + nonterminal_rule + Multiplicity + alternation + name MultiplicitySubset + name MultiplicityRange + nonterminal_rule + MultiplicitySubset + abstract_element Multiplicity + sequence + terminal 'multiplicity' + name Identification + name Subsets + name TypeBody + nonterminal_rule + MultiplicityRange + sequence + terminal 'multiplicity' + name Identification + name MultiplicityBounds + name TypeBody + nonterminal_rule + OwnedMultiplicity + abstract_element OwningMembership + prop_list_append + prop_name ownedRelatedElement + name OwnedMultiplicityRange + nonterminal_rule + OwnedMultiplicityRange + abstract_element MultiplicityRange + name MultiplicityBounds + nonterminal_rule + MultiplicityBounds + abstract_element MultiplicityRange + sequence + terminal '[' + expression + sequence + prop_list_append + prop_name ownedRelationship + name MultiplicityExpressionMember + terminal '..' + repetition ? + prop_list_append + prop_name ownedRelationship + name MultiplicityExpressionMember + terminal ']' + nonterminal_rule + MultiplicityExpressionMember + abstract_element OwningMembership + prop_list_append + prop_name ownedRelatedElement + prop_value + name LiteralExpression + name FeatureReferenceExpression + line_comment // Clause 8.2.5.12 Metadata Concrete Syntax + nonterminal_rule + Metaclass + sequence + name TypePrefix + terminal 'metaclass' + name ClassifierDeclaration + name TypeBody + nonterminal_rule + PrefixMetadataAnnotation + abstract_element Annotation + sequence + terminal '#' + prop_list_append + prop_name ownedRelatedElement + name PrefixMetadataFeature + nonterminal_rule + PrefixMetadataMember + abstract_element OwningMembership + sequence + terminal '#' + prop_list_append + prop_name ownedRelatedElement + name PrefixMetadataFeature + nonterminal_rule + PrefixMetadataFeature + abstract_element MetadataFeature + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + nonterminal_rule + MetadataFeature + sequence + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + alternation + terminal '@' + terminal 'metadata' + name MetadataFeatureDeclaration + expression + sequence + terminal 'about' + prop_list_append + prop_name ownedRelationship + name Annotation + expression + sequence + terminal ',' + prop_list_append + prop_name ownedRelationship + name Annotation + repetition * + repetition ? + name MetadataBody + nonterminal_rule + MetadataFeatureDeclaration + abstract_element MetadataFeature + sequence + expression + sequence + name Identification + alternation + terminal ':' + sequence + terminal 'typed' + terminal 'by' + repetition ? + prop_list_append + prop_name ownedRelationship + name OwnedFeatureTyping + nonterminal_rule + MetadataBody + abstract_element Feature + alternation + terminal ';' + sequence + terminal '{' + expression + prop_list_append + prop_name ownedRelationship + name MetadataBodyElement + repetition * + terminal '}' + nonterminal_rule + MetadataBodyElement + abstract_element Membership + alternation + name NonFeatureMember + name MetadataBodyFeatureMember + name AliasMember + name Import + nonterminal_rule + MetadataBodyFeatureMember + abstract_element FeatureMembership + prop_assign + prop_name ownedMemberFeature + name MetadataBodyFeature + nonterminal_rule + MetadataBodyFeature + abstract_element Feature + sequence + expression + terminal 'feature' + repetition ? + expression + alternation + terminal ':>>' + terminal 'redefines' + repetition ? + prop_list_append + prop_name ownedRelationship + name OwnedRedefinition + expression + name FeatureSpecializationPart + repetition ? + expression + name ValuePart + repetition ? + name MetadataBody + line_comment // Clause 8.2.5.13 Packages Concrete Syntax + nonterminal_rule + Package + sequence + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + name PackageDeclaration + name PackageBody + nonterminal_rule + LibraryPackage + sequence + boolean_prop_assign + prop_name isStandard + terminal 'standard' + terminal 'library' + expression + prop_list_append + prop_name ownedRelationship + name PrefixMetadataMember + repetition * + name PackageDeclaration + name PackageBody + nonterminal_rule + PackageDeclaration + abstract_element Package + sequence + terminal 'package' + name Identification + nonterminal_rule + PackageBody + abstract_element Package + alternation + terminal ';' + sequence + terminal '{' + expression + alternation + name NamespaceBodyElement + prop_list_append + prop_name ownedRelationship + name ElementFilterMember + repetition * + terminal '}' + nonterminal_rule + ElementFilterMember + abstract_element ElementFilterMembership + sequence + name MemberPrefix + terminal 'filter' + prop_assign + prop_name condition + name OwnedExpression + terminal ';' + line_comment // End of BNF + diff --git a/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--SysML-graphical-corrected.log b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--SysML-graphical-corrected.log new file mode 100644 index 000000000..1076a6924 --- /dev/null +++ b/tool-support/bnf_grammar_tools/tests/KerML_and_SysML_grammars/bnf_file_parser--SysML-graphical-corrected.log @@ -0,0 +1,3721 @@ +INFO : Started parsing .\tests\KerML_and_SysML_grammars\SysML-graphical-bnf-corrected.kgbnf at 2025-12-04T19:39:11Z +INFO : Parse completed successfully +INFO : The resulting (AST) parse tree is: + +start + line_comment // Source document: tests/KerML_and_SysML_grammars/SysML-graphical-bnf-corrected-marked_up.kgbnf + line_comment // Generated by bnf_grammar_processor at: 2025-12-04T19:29:18Z + line_comment // Source document: tests/KerML_and_SysML_spec_sources/SysML-spec.html + line_comment // Generated by bnf_grammar_processor at: 2025-11-28T15:06:37Z + line_comment // Corrected manually by HP de Koning + line_comment // Part 2 - Systems Modeling Language (SysML) + line_comment // Clause 8.2.3 Graphical Notation + line_comment // Clause 8.2.3.1 Graphical Notation Overview + line_comment // Clause 8.2.3.2 Elements and Relationships Graphical Notation + nonterminal_rule + element + alternation + name dependencies-and-annotations-element + name general-element + name element-inside-textual-compartment + nonterminal_rule + compartment + name general-compartment + nonterminal_rule + general-compartment + sequence + image element: tag=implementation defined character sequence
+ERROR : Unexpected tag inside element: tag=character sequence excluding
+INFO : PROCESSING Clause 8.2.2.2 Notes and Comments
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.2 in production:
+COMMENT_LINE_TEXT =
+ LINE_TEXT excluding the sequence '*/'
+
+Unexpected token Token('PROPERTY_NAME', 'the') at line 2, column 25.
+Expected one of:
+ * DOT
+ * EQUAL
+ * "+="
+ * "?="
+Previous tokens: [Token('PROPERTY_NAME', 'excluding')]
+
+ERROR : Unexpected tag inside element: tag=excluding the sequence
+INFO : PROCESSING Clause 8.2.2.3 Names
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.3 in production:
+UNRESTRICTED_NAME =
+ single_quote ( NAME_CHARACTER | ESCAPE_SEQUENCE )* single_quote
+
+No terminal matches '_' in the current parser context, at line 2 col 11
+
+ single_quote ( NAME_CHARACTER | ESCAPE_SEQUENC
+ ^
+Expected one of:
+ * "+="
+ * DOT
+ * "?="
+ * EQUAL
+ * RBRACE
+
+Previous tokens: Token('PROPERTY_NAME', 'single')
+
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.3 in production:
+ALPHABETIC_CHARACTER =
+ any character 'a' through 'z' or 'A' through 'Z'
+
+Unexpected token Token('PROPERTY_NAME', 'character') at line 2, column 9.
+Expected one of:
+ * DOT
+ * EQUAL
+ * "+="
+ * "?="
+Previous tokens: [Token('PROPERTY_NAME', 'any')]
+
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.3 in production:
+DECIMAL_DIGIT =
+ any character '0' through '9'
+
+Unexpected token Token('PROPERTY_NAME', 'character') at line 2, column 9.
+Expected one of:
+ * DOT
+ * EQUAL
+ * "+="
+ * "?="
+Previous tokens: [Token('PROPERTY_NAME', 'any')]
+
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.3 in production:
+NAME_CHARACTER =
+ any printable character other than backslash or single_quote
+
+Unexpected token Token('PROPERTY_NAME', 'printable') at line 2, column 9.
+Expected one of:
+ * DOT
+ * EQUAL
+ * "+="
+ * "?="
+Previous tokens: [Token('PROPERTY_NAME', 'any')]
+
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.3 in production:
+ESCAPE_SEQUENCE =
+
+Unexpected token Token('_NON_CONTINUATION_LINE', '\n') at line 1, column 18.
+Expected one of:
+ * PROPERTY_NAME
+ * NONTERMINAL_NAME
+ * LBRACE
+ * QUALIFIED_NAME
+ * LPAR
+ * TERMINAL
+ * LEXICAL_NAME
+ * TILDE
+Previous tokens: [Token('EQUAL', '=')]
+
+ERROR : Unexpected tag inside element: tag=(see Note 1
+ERROR : Unexpected tag inside element: tag=any character
+ERROR : Unexpected tag inside element: tag=through
+ERROR : Unexpected tag inside element: tag=or
+ERROR : Unexpected tag inside element: tag=through
+ERROR : Unexpected tag inside element: tag=any character
+ERROR : Unexpected tag inside element: tag=through
+ERROR : Unexpected tag inside element: tag=any printable character other than backslash or single_quote
+ERROR : Unexpected tag inside element: tag=see Note 2
+INFO : PROCESSING Clause 8.2.2.4 Numeric Values
+INFO : PROCESSING Clause 8.2.2.5 String Value
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.2.5 in production:
+STRING_CHARACTER =
+ any printable character other than backslash or '"'
+
+Unexpected token Token('PROPERTY_NAME', 'printable') at line 2, column 9.
+Expected one of:
+ * DOT
+ * EQUAL
+ * "+="
+ * "?="
+Previous tokens: [Token('PROPERTY_NAME', 'any')]
+
+INFO : PROCESSING Clause 8.2.2.6 Reserved Words
+ERROR : Unexpected tag inside element: tag=about abstract alias all and as assoc behavior binding bool by chains class
+classifier comment composite conjugate conjugates conjugation connector const
+crosses datatype default dependency derived differences disjoining disjoint doc
+else end expr false feature featured featuring filter first flow for from
+function hastype if implies import in inout interaction intersects inv inverse
+inverting istype language library locale member meta metaclass metadata
+multiplicity namespace nonunique not null of or ordered out package portion
+predicate private protected public redefines redefinition references rep return
+specialization specializes standard step struct subclassifier subset subsets
+subtype succession then to true type typed typing unions var xor
+INFO : PROCESSING Clause 8.2.2.7 Symbols
+INFO : PROCESSING Clause 8.2.3 Root Concrete Syntax
+INFO : PROCESSING Clause 8.2.3.1 Elements and Relationships Concrete Syntax
+INFO : PROCESSING Clause 8.2.3.2 Dependencies Concrete Syntax
+INFO : PROCESSING Clause 8.2.3.3 Annotations Concrete Syntax
+INFO : PROCESSING Clause 8.2.3.3.1 Annotations
+INFO : PROCESSING Clause 8.2.3.3.2 Comments and Documentation
+INFO : PROCESSING Clause 8.2.3.3.3 Textual Representation
+INFO : PROCESSING Clause 8.2.3.4 Namespaces Concrete Syntax
+INFO : PROCESSING Clause 8.2.3.4.1 Namespaces
+ERROR : Unexpected tag inside element: tag=(See Note 1)
+ERROR : Unexpected tag inside element: tag=(See Note 2)
+ERROR : Unexpected tag inside element: tag=(See Note 3)
+INFO : PROCESSING Clause 8.2.3.4.2 Imports
+WARNING : Production start line does not contain exactly one '=': ImportDeclaration : Import
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.3.4.2 in production:
+ImportDeclaration : Import
+ MembershipImport | NamespaceImport
+
+Unexpected token Token('NONTERMINAL_NAME', 'MembershipImport') at line 2, column 5.
+Expected one of:
+ * EQUAL
+Previous tokens: [Token('NONTERMINAL_NAME', 'Import')]
+
+ERROR : Unexpected tag inside element: tag=(see Note 1)
+INFO : PROCESSING Clause 8.2.3.4.3 Namespace Elements
+INFO : PROCESSING Clause 8.2.3.5 Name Resolution
+INFO : PROCESSING Clause 8.2.3.5.1 Name Resolution Overview
+INFO : PROCESSING Clause 8.2.3.5.2 Local and Global Namespaces
+INFO : PROCESSING Clause 8.2.3.5.3 Local and Visible Resolution
+INFO : PROCESSING Clause 8.2.3.5.4 Full Resolution
+INFO : PROCESSING Clause 8.2.4 Core Concrete Syntax
+INFO : PROCESSING Clause 8.2.4.1 Types Concrete Syntax
+INFO : PROCESSING Clause 8.2.4.1.1 Types
+INFO : PROCESSING Clause 8.2.4.1.2 Specialization
+WARNING : Production start line does not contain exactly one '=': SpecificType : Specialization :
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.4.1.2 in production:
+SpecificType : Specialization :
+ specific = [QualifiedName]
+ | specific += OwnedFeatureChain
+ { ownedRelatedElement += specific }
+
+Unexpected token Token('COLON', ':') at line 1, column 31.
+Expected one of:
+ * EQUAL
+Previous tokens: [Token('NONTERMINAL_NAME', 'Specialization')]
+
+INFO : PROCESSING Clause 8.2.4.1.3 Conjugation
+INFO : PROCESSING Clause 8.2.4.1.4 Disjoining
+INFO : PROCESSING Clause 8.2.4.1.5 Unioning, Intersecting and Differencing
+INFO : PROCESSING Clause 8.2.4.1.6 Feature Membership
+INFO : PROCESSING Clause 8.2.4.2 Classifiers Concrete Syntax
+INFO : PROCESSING Clause 8.2.4.2.1 Classifiers
+INFO : PROCESSING Clause 8.2.4.2.2 Subclassification
+INFO : PROCESSING Clause 8.2.4.3 Features Concrete Syntax
+INFO : PROCESSING Clause 8.2.4.3.1 Features
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.4.3.1 in production:
+Feature =
+ ( FeaturePrefix
+ ( 'feature' | ownedRelationship += PrefixMetadataMember )
+ FeatureDeclaration?
+ )
+ | ( EndFeaturePrefix | BasicFeaturePrefix )
+ FeatureDeclaration
+ )
+ ValuePart? TypeBody
+
+Unexpected token Token('RPAR', ')') at line 8, column 5.
+Expected one of:
+ * _NON_CONTINUATION_LINE
+
+WARNING : Production start line does not contain exactly one '=': BasicFeaturePrefix : Feature :
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.4.3.1 in production:
+BasicFeaturePrefix : Feature :
+ ( direction = FeatureDirection )?
+ ( isDerived ?= 'derived' )?
+ ( isAbstract ?= 'abstract' )?
+ ( isComposite ?= 'composite' | isPortion ?= 'portion' )?
+ ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )?
+
+Unexpected token Token('COLON', ':') at line 1, column 30.
+Expected one of:
+ * EQUAL
+Previous tokens: [Token('NONTERMINAL_NAME', 'Feature')]
+
+WARNING : Production start line does not contain exactly one '=': FeaturePrefix :
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.4.3.1 in production:
+FeaturePrefix :
+ ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )?
+ | BasicFeaturePrefix
+ )
+ ( ownedRelationship += PrefixMetadataMember )*
+
+Unexpected token Token('LPAR', '(') at line 2, column 5.
+Expected one of:
+ * NONTERMINAL_NAME
+Previous tokens: [Token('COLON', ':')]
+
+ERROR : Unexpected tag inside element: tag=(See Note 1)
+ERROR : Unexpected tag inside element: tag=(see Note 1)
+INFO : PROCESSING Clause 8.2.4.3.2 Feature Typing
+INFO : PROCESSING Clause 8.2.4.3.3 Subsetting
+INFO : PROCESSING Clause 8.2.4.3.4 Redefinition
+INFO : PROCESSING Clause 8.2.4.3.5 Feature Chaining
+INFO : PROCESSING Clause 8.2.4.3.6 Feature Inverting
+INFO : PROCESSING Clause 8.2.4.3.7 Type Featuring
+INFO : PROCESSING Clause 8.2.5 Kernel Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.1 Data Types Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.2 Classes Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.3 Structures Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.4 Associations Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.5 Connectors Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.5.1 Connectors
+INFO : PROCESSING Clause 8.2.5.5.2 Binding Connectors
+INFO : PROCESSING Clause 8.2.5.5.3 Successions
+INFO : PROCESSING Clause 8.2.5.6 Behaviors Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.6.1 Behaviors
+INFO : PROCESSING Clause 8.2.5.6.2 Steps
+INFO : PROCESSING Clause 8.2.5.7 Functions Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.7.1 Functions
+INFO : PROCESSING Clause 8.2.5.7.2 Expressions
+INFO : PROCESSING Clause 8.2.5.7.3 Predicates
+INFO : PROCESSING Clause 8.2.5.7.4 Boolean Expressions and Invariants
+INFO : PROCESSING Clause 8.2.5.8 Expressions Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.8.1 Operator Expressions
+INFO : PROCESSING Clause 8.2.5.8.2 Primary Expressions
+INFO : PROCESSING Clause 8.2.5.8.3 Base Expressions
+INFO : PROCESSING Clause 8.2.5.8.4 Literal Expressions
+INFO : PROCESSING Clause 8.2.5.9 Interactions Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.9.1 Interactions
+INFO : PROCESSING Clause 8.2.5.9.2 Flows
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.5.9.2 in production:
+PayloadFeature =
+ Identification PayloadFeatureSpecializationPart ValuePart?
+ | Identification ValuePart
+ | ( ownedRelationship += OwnedFeatureTyping
+ ( ownedRelationship += OwnedMultiplicity )?
+ | ownedRelationship += OwnedMultiplicity
+ ( ownedRelationship += OwnedFeatureTyping )?
+
+Unexpected token Token('_NON_CONTINUATION_LINE', '\n') at line 7, column 51.
+Expected one of:
+ * RPAR
+
+ERROR : Unexpected tag inside element: tag=(See Note 1)
+INFO : PROCESSING Clause 8.2.5.10 Feature Values Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.11 Multiplicities Concrete Syntax
+INFO : PROCESSING Clause 8.2.5.12 Metadata Concrete Syntax
+WARNING : Production start line does not contain exactly one '=': PrefixMetadataFeature : MetadataFeature :
+ERROR : Parse error in tests\KerML_and_SysML_spec_sources\KerML-spec.html 8.2.5.12 in production:
+PrefixMetadataFeature : MetadataFeature :
+ ownedRelationship += OwnedFeatureTyping
+
+Unexpected token Token('COLON', ':') at line 1, column 41.
+Expected one of:
+ * EQUAL
+Previous tokens: [Token('NONTERMINAL_NAME', 'MetadataFeature')]
+
+INFO : PROCESSING Clause 8.2.5.13 Packages Concrete Syntax
+INFO : ===== Start of Textual Notation Grammar Checks
+INFO : Keywords extracted from textual BNF grammar scan:
+ about abstract alias all and as assoc behavior binding bool by chains class classifier comment composite conjugate
+ conjugates conjugation connector const crosses datatype default dependency derived differences disjoining disjoint
+ doc else end expr false feature featured featuring filter first flow for from function hastype if implies import in
+ inout interaction intersects inv inverse inverting istype language library locale member meta metaclass metadata
+ multiplicity namespace new nonunique not null of or ordered out package portion predicate private protected public
+ redefines redefinition references rep return specialization specializes standard step struct subclassifier subset
+ subsets subtype succession then to true type typed typing unions var xor
+INFO : Comparison of declared reserved keywords versus extracted keywords
+INFO : Declared reserved keywords not in extracted keywords:
+
+WARNING : Extracted keywords not in declared reserved keywords:
+ new
+INFO : ===== End of Textual Notation Grammar Checks
+INFO : ===== Start of Textual Notation Grammar Checks
+INFO : Keywords extracted from textual BNF grammar scan:
+ about abstract alias all and as assoc behavior binding bool by chains class classifier comment composite conjugate
+ conjugates conjugation connector const crosses datatype default dependency derived differences disjoining disjoint
+ doc else end expr false feature featured featuring filter first flow for from function hastype if implies import in
+ inout interaction intersects inv inverse inverting istype language library locale member meta metaclass metadata
+ multiplicity namespace new nonunique not null of or ordered out package portion predicate private protected public
+ redefines redefinition references rep return specialization specializes standard step struct subclassifier subset
+ subsets subtype succession then to true type typed typing unions var xor
+INFO : Comparison of declared reserved keywords versus extracted keywords
+INFO : Declared reserved keywords not in extracted keywords:
+
+WARNING : Extracted keywords not in declared reserved keywords:
+ new
+INFO : ===== End of Textual Notation Grammar Checks
+INFO : Dumping BNF grammar elements into tests\KerML_and_SysML_grammars\KerML-textual-bnf-elements.json
+INFO : Writing BNF grammar file tests\KerML_and_SysML_grammars\KerML-textual-bnf-marked_up.kebnf
+INFO : Writing BNF grammar file tests\KerML_and_SysML_grammars\KerML-textual-bnf.kebnf
+INFO : Writing BNF HTML file tests\KerML_and_SysML_grammars\KerML-textual-bnf.html
+WARNING : Grammar KerML-textual-bnf contains 4 unresolved non-terminal(s) ...
+ERROR : Cannot resolve InstatiatedTypeMember in
+ 8.2.5.8.3: ownedRelationship += InstatiatedTypeMember
+ERROR : Cannot resolve InvocationTypeMember in
+ 8.2.5.8.2: ownedRelationship += InvocationTypeMember
+ERROR : Cannot resolve ItemFlowDeclaration in
+ 8.2.5.9.2: ItemFlowDeclaration TypeBody
+ 8.2.5.9.2: ItemFlowDeclaration TypeBody
+ERROR : Cannot resolve MetaClassificationTestOperator in
+ 8.2.5.8.1: ( operator = MetaClassificationTestOperator
+INFO : ====================
+INFO : Extract BNF from tests\KerML_and_SysML_spec_sources\SysML-spec.html syntax-kind=textual-bnf clause=8.2.2 at 2025-12-04T19:31:35Z
+INFO : ====================
+INFO : PROCESSING Part 2 - Systems Modeling Language (SysML)
+INFO : PROCESSING Clause 8.2.2 Textual Notation
+INFO : PROCESSING Clause 8.2.2.1 Textual Notation Overview
+INFO : PROCESSING Clause 8.2.2.1.1 EBNF Conventions
+INFO : PROCESSING Clause 8.2.2.1.2 Lexical Structure
+WARNING : appearing inside
about abstract accept action actor after alias all allocate allocation analysis +and as assert assign assume at attribute bind binding by calc case comment +concern connect connection constant constraint crosses decide def default +defined dependency derived do doc else end entry enum event exhibit exit expose +false filter first flow for fork frame from hastype if implies import in include +individual inout interface istype item join language library locale loop merge +message meta metadata nonunique not null objective occurrence of or ordered out +package parallel part perform port private protected public redefines ref +references render rendering rep require requirement return satisfy send snapshot +specializes stakeholder standard state subject subsets succession terminate then +timeslice to transition true until use variant variation verification verify via +view viewpoint when while xor+ERROR : Unexpected tag inside
element: tag=about abstract accept action actor after alias all allocate allocation analysis +and as assert assign assume at attribute bind binding by calc case comment +concern connect connection constant constraint crosses decide def default +defined dependency derived do doc else end entry enum event exhibit exit expose +false filter first flow for fork frame from hastype if implies import in include +individual inout interface istype item join language library locale loop merge +message meta metadata nonunique not null objective occurrence of or ordered out +package parallel part perform port private protected public redefines ref +references render rendering rep require requirement return satisfy send snapshot +specializes stakeholder standard state subject subsets succession terminate then +timeslice to transition true until use variant variation verification verify via +view viewpoint when while xor +WARNING :appearing inside
DEFINED_BY = ':' | 'defined' 'by' +SPECIALIZES = ':>' | 'specializes' +SUBSETS = ':>' | 'subsets' +REFERENCES = '::>' | 'references' +CROSSES = '=>' | 'crosses' +REDEFINES = ':>>' | 'redefines' ++INFO : PROCESSING Clause 8.2.2.2 Elements and Relationships Textual Notation +INFO : PROCESSING Clause 8.2.2.3 Dependencies Textual Notation +INFO : PROCESSING Clause 8.2.2.4 Annotations Textual Notation +INFO : PROCESSING Clause 8.2.2.4.1 Annotations +INFO : PROCESSING Clause 8.2.2.4.2 Comments and Documentation +INFO : PROCESSING Clause 8.2.2.4.3 Textual Representation +INFO : PROCESSING Clause 8.2.2.5 Namespaces and Packages Textual Notation +INFO : PROCESSING Clause 8.2.2.5.1 Packages +WARNING : Production start line does not contain exactly one '=': PackageMember : OwningMembership +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.5.1 in production: +PackageMember : OwningMembership + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) + +Unexpected token Token('NONTERMINAL_NAME', 'MemberPrefix') at line 2, column 5. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'OwningMembership')] + +INFO : PROCESSING Clause 8.2.2.5.2 Package Elements +INFO : PROCESSING Clause 8.2.2.6 Definition and Usage Textual Notation +INFO : PROCESSING Clause 8.2.2.6.1 Definitions +WARNING : Production start line does not contain exactly one '=': DefinitionDeclaration : Definition +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.6.1 in production: +DefinitionDeclaration : Definition + Identification SubclassificationPart? + +Unexpected token Token('NONTERMINAL_NAME', 'Identification') at line 2, column 5. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'Definition')] + +INFO : PROCESSING Clause 8.2.2.6.2 Usages +WARNING : Production start line does not contain exactly one '=': UsagePrefix : Usage +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.6.2 in production: +UsagePrefix : Usage + UnextendedUsagePrefix UsageExtensionKeyword* + +Unexpected token Token('NONTERMINAL_NAME', 'UnextendedUsagePrefix') at line 2, column 5. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'Usage')] + +ERROR : Unexpected tag inside
element: tag=(see Note 1) +INFO : PROCESSING Clause 8.2.2.6.3 Reference Usages +INFO : PROCESSING Clause 8.2.2.6.4 Body Elements +INFO : PROCESSING Clause 8.2.2.6.5 Specialization +INFO : PROCESSING Clause 8.2.2.6.6 Multiplicity +INFO : PROCESSING Clause 8.2.2.7 Attributes Textual Notation +INFO : PROCESSING Clause 8.2.2.8 Enumerations Textual Notation +INFO : PROCESSING Clause 8.2.2.9 Occurrences Textual Notation +INFO : PROCESSING Clause 8.2.2.9.1 Occurrence Definitions +INFO : PROCESSING Clause 8.2.2.9.2 Occurrence Usages +INFO : PROCESSING Clause 8.2.2.9.3 Occurrence Successions +INFO : PROCESSING Clause 8.2.2.10 Items Textual Notation +INFO : PROCESSING Clause 8.2.2.11 Parts Textual Notation +INFO : PROCESSING Clause 8.2.2.12 Ports Textual Notation +ERROR : Unexpected tag insideelement: tag=(See Note 1) + +ERROR : Unexpected tag insideelement: tag=(See Note 2) +INFO : PROCESSING Clause 8.2.2.13 Connections Textual Notation +INFO : PROCESSING Clause 8.2.2.13.1 Connection Definition and Usage +WARNING : Production start line does not contain exactly one '=': ConnectorEndMember : EndFeatureMembership : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.13.1 in production: +ConnectorEndMember : EndFeatureMembership : + ownedRelatedElement += ConnectorEnd + +Unexpected token Token('COLON', ':') at line 1, column 43. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'EndFeatureMembership')] + +INFO : PROCESSING Clause 8.2.2.13.2 Binding Connectors +INFO : PROCESSING Clause 8.2.2.13.3 Successions +INFO : PROCESSING Clause 8.2.2.14 Interfaces Textual Notation +INFO : PROCESSING Clause 8.2.2.14.1 Interface Definitions +INFO : PROCESSING Clause 8.2.2.14.2 Interface Usages +WARNING : Production start line does not contain exactly one '=': InterfaceEnd : PortUsage : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.14.2 in production: +InterfaceEnd : PortUsage : + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +Unexpected token Token('COLON', ':') at line 1, column 26. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'PortUsage')] + +INFO : PROCESSING Clause 8.2.2.15 Allocations Textual Notation +INFO : PROCESSING Clause 8.2.2.16 Flows Textual Notation +WARNING : Production start line does not contain exactly one '=': FlowDefinition : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.16 in production: +FlowDefinition : + OccurrenceDefinitionPrefix 'flow' 'def' Definition + +Unexpected token Token('TERMINAL', "'flow'") at line 2, column 32. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'OccurrenceDefinitionPrefix')] + +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.16 in production: +PayloadFeatureSpecializationPart : Feature = + ( -> FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +No terminal matches '-' in the current parser context, at line 2 col 9 + + ( -> FeatureSpecialization )+ Multiplicity + ^ +Expected one of: + * PROPERTY_NAME + * LEXICAL_NAME + * LBRACE + * QUALIFIED_NAME + * LPAR + * TERMINAL + * NONTERMINAL_NAME + * TILDE + +Previous tokens: Token('LPAR', '(') + +ERROR : Unexpected tag insideelement: tag=(See Note 1) +INFO : PROCESSING Clause 8.2.2.17 Actions Textual Notation +INFO : PROCESSING Clause 8.2.2.17.1 Action Definitions +INFO : PROCESSING Clause 8.2.2.17.2 Action Usages +INFO : PROCESSING Clause 8.2.2.17.3 Control Nodes +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.17.3 in production: +ControlNodePrefix : OccurrenceUsage = + RefPrefix + ( isIndividual ?= 'individual )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +No terminal matches ''' in the current parser context, at line 3 col 23 + + ( isIndividual ?= 'individual )? + ^ +Expected one of: + * BOOLEAN_VALUE + * LEXICAL_NAME + * QUALIFIED_NAME + * LPAR + * TERMINAL + * NONTERMINAL_NAME + * TILDE + +Previous tokens: Token('__ANON_1', '?=') + +INFO : PROCESSING Clause 8.2.2.17.4 Send and Accept Action Usages +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.17.4 in production: +TriggerExpression : TriggerInvocationExpression = + kind = ( 'at | 'after' ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember + +Unexpected token Token('PROPERTY_NAME', 'after') at line 2, column 23. +Expected one of: + * VBAR + +INFO : PROCESSING Clause 8.2.2.17.5 Assignment Action Usages +INFO : PROCESSING Clause 8.2.2.17.6 Terminate Action Usages +INFO : PROCESSING Clause 8.2.2.17.7 Structured Control Action Usages +INFO : PROCESSING Clause 8.2.2.17.8 Action Successions +INFO : PROCESSING Clause 8.2.2.18 States Textual Notation +INFO : PROCESSING Clause 8.2.2.18.1 State Definitions +WARNING : Production start line does not contain exactly one '=': EntryTransitionMember : FeatureMembership : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.18.1 in production: +EntryTransitionMember : FeatureMembership : + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' + +Unexpected token Token('COLON', ':') at line 1, column 43. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'FeatureMembership')] + +WARNING : Production start line does not contain exactly one '=': StateSendActionUsage : SendActionUsage +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.18.1 in production: +StateSendActionUsage : SendActionUsage + SendNodeDeclaration ActionBody + +Unexpected token Token('NONTERMINAL_NAME', 'SendNodeDeclaration') at line 2, column 5. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'SendActionUsage')] + +INFO : PROCESSING Clause 8.2.2.18.2 State Usages +INFO : PROCESSING Clause 8.2.2.18.3 Transition Usages +INFO : PROCESSING Clause 8.2.2.19 Calculations Textual Notation +INFO : PROCESSING Clause 8.2.2.20 Constraints Textual Notation +INFO : PROCESSING Clause 8.2.2.21 Requirements Textual Notation +INFO : PROCESSING Clause 8.2.2.21.1 Requirement Definitions +INFO : PROCESSING Clause 8.2.2.21.2 Requirement Usages +INFO : PROCESSING Clause 8.2.2.21.3 Concerns +INFO : PROCESSING Clause 8.2.2.22 Cases Textual Notation +INFO : PROCESSING Clause 8.2.2.23 Analysis Cases Textual Notation +INFO : PROCESSING Clause 8.2.2.24 Verification Cases Textual Notation +INFO : PROCESSING Clause 8.2.2.25 Use Cases Textual Notation +WARNING : Production start line does not contain exactly one '=': IncludeUseCaseUsage : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.25 in production: +IncludeUseCaseUsage : + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody + +Unexpected token Token('TERMINAL', "'include'") at line 2, column 27. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'OccurrenceUsagePrefix')] + +INFO : PROCESSING Clause 8.2.2.26 Views and Viewpoints Textual Notation +INFO : PROCESSING Clause 8.2.2.26.1 View Definitions +INFO : PROCESSING Clause 8.2.2.26.2 View Usages +INFO : PROCESSING Clause 8.2.2.26.3 Viewpoints +INFO : PROCESSING Clause 8.2.2.26.4 Renderings +INFO : PROCESSING Clause 8.2.2.27 Metadata Textual Notation +WARNING : Production start line does not contain exactly one '=': MetadataBodyUsage : ReferenceUsage : +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.2.27 in production: +MetadataBodyUsage : ReferenceUsage : + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +Unexpected token Token('COLON', ':') at line 1, column 36. +Expected one of: + * EQUAL +Previous tokens: [Token('NONTERMINAL_NAME', 'ReferenceUsage')] + +INFO : ===== Start of Textual Notation Grammar Checks +INFO : Keywords extracted from textual BNF grammar scan: + about abstract accept action actor after alias all allocate allocation analysis and as assert assign assume + assumption at attribute bind binding by calc case comment concern connect connection constant constraint crosses + decide def default defined dependency derived do doc effect else end entry enum event exhibit exit expose false + filter first flow for fork frame from guard hastype if implies import in include individual inout interface istype + item join language library locale loop merge message meta metadata nonunique not null objective occurrence of or + ordered out package parallel part perform port private protected public redefines ref references render rendering + rep require requirement return satisfy send snapshot specializes stakeholder standard state subject subsets + succession terminate then timeslice to transition trigger true typed until use variant variation verification verify + via view viewpoint when while xor +INFO : Comparison of declared reserved keywords versus extracted keywords +INFO : Declared reserved keywords not in extracted keywords: + +WARNING : Extracted keywords not in declared reserved keywords: + assumption effect guard trigger typed +INFO : ===== End of Textual Notation Grammar Checks +INFO : ===== Start of Textual Notation Grammar Checks +INFO : Keywords extracted from textual BNF grammar scan: + about abstract accept action actor after alias all allocate allocation analysis and as assert assign assume + assumption at attribute bind binding by calc case comment concern connect connection constant constraint crosses + decide def default defined dependency derived do doc effect else end entry enum event exhibit exit expose false + filter first flow for fork frame from guard hastype if implies import in include individual inout interface istype + item join language library locale loop merge message meta metadata nonunique not null objective occurrence of or + ordered out package parallel part perform port private protected public redefines ref references render rendering + rep require requirement return satisfy send snapshot specializes stakeholder standard state subject subsets + succession terminate then timeslice to transition trigger true typed until use variant variation verification verify + via view viewpoint when while xor +INFO : Comparison of declared reserved keywords versus extracted keywords +INFO : Declared reserved keywords not in extracted keywords: + +WARNING : Extracted keywords not in declared reserved keywords: + assumption effect guard trigger typed +INFO : ===== End of Textual Notation Grammar Checks +INFO : Dumping BNF grammar elements into tests\KerML_and_SysML_grammars\SysML-textual-bnf-elements.json +INFO : Writing BNF grammar file tests\KerML_and_SysML_grammars\SysML-textual-bnf-marked_up.kebnf +INFO : Writing BNF grammar file tests\KerML_and_SysML_grammars\SysML-textual-bnf.kebnf +INFO : Writing BNF HTML file tests\KerML_and_SysML_grammars\SysML-textual-bnf.html +WARNING : Tokenize: Unexpected character '-' in state None at position 8 in line: ( -> FeatureSpecialization )+ MultiplicityPart? +WARNING : Tokenize: Missing single quote -> incomplete TERMINAL in line: ( isIndividual ?= 'individual )? +WARNING : Tokenize: Space inside TERMINAL 'at | ' in line kind = ( 'at | 'after' ) +WARNING : Tokenize: Unexpected character ''' in state TokenKind.NON_TERMINAL at position 27 in line: kind = ( 'at | 'after' ) +WARNING : Grammar SysML-textual-bnf contains 6 unresolved non-terminal(s) ... +ERROR : Cannot resolve CalculationUsageDeclaration in + 8.2.2.21.1: CalculationUsageDeclaration CalculationBody +ERROR : Cannot resolve DefinitionExtensionKeyWord in + 8.2.2.27: ( isAbstract ?= 'abstract')? DefinitionExtensionKeyWord* +ERROR : Cannot resolve EndFeatureMembership in + 8.2.2.13.1: ConnectorEndMember : EndFeatureMembership : +ERROR : Cannot resolve FeatureMembership in + 8.2.2.18.1: EntryTransitionMember : FeatureMembership : +ERROR : Cannot resolve FilterPackageImport in + 8.2.2.5.1: ownedRelationship += FilterPackageImport +ERROR : Cannot resolve SendReceiverPart in + 8.2.2.17.4: | ownedRelationship += EmptyParameterMember SendReceiverPart )? +INFO : ==================== +INFO : Extract BNF from tests\KerML_and_SysML_spec_sources\SysML-spec.html syntax-kind=graphical-bnf clause=8.2.3 at 2025-12-04T19:31:35Z +INFO : ==================== +INFO : PROCESSING Part 2 - Systems Modeling Language (SysML) +INFO : PROCESSING Clause 8.2.3 Graphical Notation +INFO : PROCESSING Clause 8.2.3.1 Graphical Notation Overview +INFO : PROCESSING Clause 8.2.3.2 Elements and Relationships Graphical Notation +WARNING : Production start line does not contain exactly one '=': compartment =| general-compartment +ERROR : Unexpected tag insideelement: tag=+ERROR : Production start line starts with a space or tab: element-inside-textual-compartment = +ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.3 Dependencies Graphical Notation +WARNING : Production start line does not contain exactly one '=': dependencies-and-annotations-element =| dependencies-element +WARNING : Production start line does not contain exactly one '=': dependencies-element =| +ERROR : Non-unique production name: element-node in {'element-inside-textual-compartment', 'binary-dependency', 'general-compartment', 'n-ary-dependency-client-or-supplier-link', 'n-ary-dependency-supplier-link', 'rel-name', 'element', 'general-view', 'element-node', 'n-ary-dependency', 'ellipsis-at-lower-left-corner', 'n-ary-association-dot', 'n-ary-dependency-client-link', 'general-element'} +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.4 Annotations Graphical Notation +WARNING : Production start line does not contain exactly one '=': dependencies-and-annotations-element =| +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.5 Namespaces and Packages Graphical Notation +WARNING : Production start line does not contain exactly one '=': general-node =| namespace-node +WARNING : Production start line does not contain exactly one '=': namespace-node =| package-node +WARNING : Production start line does not contain exactly one '=': compartment =| package-compartment +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.5 in production: +relationship-name = 'defines', 'defined by', 'specializes', 'specialized by', 'connect to', + 'subsets', 'subsetted by', 'performs', 'performed by', 'allocated', 'allocated to', + 'satisfy', 'satisfied by' + +No terminal matches ',' in the current parser context, at line 1 col 30 + +relationship-name = 'defines', 'defined by', 'specializes', 'speciali + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('TERMINAL', "'defines'") + +WARNING : Production start line does not contain exactly one '=': general-relationship =| +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.6 Definition and Usage Graphical Notation +WARNING : Production start line does not contain exactly one '=': general-node =| type-node +INFO : Parsed successfully 8.2.3.6: +general-node =| type-node + +start + nonterminal_rule + general-node + name type-node + +INFO : Parsed successfully 8.2.3.6: +type-node = + definition-node + | usage-node + +start + nonterminal_rule + type-node + alternation + name definition-node + name usage-node + +WARNING : Production start line does not contain exactly one '=': general-node |= usage-node definition-node< +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +general-node |= usage-node definition-node< + +Unexpected token Token('VBAR', '|') at line 1, column 14. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-node')] + +WARNING : Production start line does not contain exactly one '=': namespace-node =| type-node +INFO : Parsed successfully 8.2.3.6: +namespace-node =| type-node + +start + nonterminal_rule + namespace-node + name type-node + +INFO : Parsed successfully 8.2.3.6: +definition-name-with-alias = + DefinitionDeclaration + ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )? + +start + nonterminal_rule + definition-name-with-alias + sequence + name DefinitionDeclaration + expression + sequence + terminal '«alias»' + sequence + name QualifiedName + expression + sequence + terminal ',' + name QualifiedName + repetition * + repetition ? + +INFO : Parsed successfully 8.2.3.6: +usage-name-with-alias = + '^'? UsageDeclaration + ( '«alias»' ( QualifiedName (',' QualifiedName)* ) )? + +start + nonterminal_rule + usage-name-with-alias + sequence + expression + terminal '^' + repetition ? + name UsageDeclaration + expression + sequence + terminal '«alias»' + sequence + name QualifiedName + expression + sequence + terminal ',' + name QualifiedName + repetition * + repetition ? + +INFO : Parsed successfully 8.2.3.6: +compartment-stack = (compartment)* + +start + nonterminal_rule + compartment-stack + expression + name compartment + repetition * + +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +compartment =| + | features-compartment + | variants-compartment + | variant-elementusages-compartment + +Unexpected token Token('VBAR', '|') at line 2, column 5. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('__ANON_0', '=|')] + +INFO : Parsed successfully 8.2.3.6: +features-compartment = +
+ features-compartment-contents + +start + nonterminal_rule + features-compartment + sequence + image
+ name features-compartment-contents + +INFO : Parsed successfully 8.2.3.6: +features-compartment-contents = (features-compartment-element)* '…'? + +start + nonterminal_rule + features-compartment-contents + sequence + expression + name features-compartment-element + repetition * + expression + terminal '…' + repetition ? + +INFO : Parsed successfully 8.2.3.6: +features-compartment-element = el-prefix? UsagePrefix usage-cp + +start + nonterminal_rule + features-compartment-element + sequence + expression + name el-prefix + repetition ? + name UsagePrefix + name usage-cp + +INFO : Parsed successfully 8.2.3.6: +variants-compartment = +
+ variants-compartment-contents + +start + nonterminal_rule + variants-compartment + sequence + image
+ name variants-compartment-contents + +INFO : Parsed successfully 8.2.3.6: +variants-compartment-contents = members-compartment-contents + +start + nonterminal_rule + variants-compartment-contents + name members-compartment-contents + +INFO : Parsed successfully 8.2.3.6: +variant-elementusages-compartment = +
+ variants-compartment-contents + +start + nonterminal_rule + variant-elementusages-compartment + sequence + image
+ name variants-compartment-contents + +WARNING : Production start line does not contain exactly one '=': general-relationship =| +INFO : Parsed successfully 8.2.3.6: +general-relationship =| + type-relationship + +start + nonterminal_rule + general-relationship + name type-relationship + +INFO : Parsed successfully 8.2.3.6: +type-relationship = + subclassification + | subsetting + | definition + | redefinition + | composite-feature-membership + | noncomposite-feature-membership + +start + nonterminal_rule + type-relationship + alternation + name subclassification + name subsetting + name definition + name redefinition + name composite-feature-membership + name noncomposite-feature-membership + +INFO : Parsed successfully 8.2.3.6: +subclassification = +
+ +start + nonterminal_rule + subclassification + image
+ +INFO : Parsed successfully 8.2.3.6: +definition = +
+ +start + nonterminal_rule + definition + image
+ +INFO : Parsed successfully 8.2.3.6: +subsetting = +
+ +start + nonterminal_rule + subsetting + image
+ +INFO : Parsed successfully 8.2.3.6: +reference-subsetting = +
+ +start + nonterminal_rule + reference-subsetting + image
+ +INFO : Parsed successfully 8.2.3.6: +redefinition = +
+ +start + nonterminal_rule + redefinition + image
+ +INFO : Parsed successfully 8.2.3.6: +composite-feature-membership = +
+ +start + nonterminal_rule + composite-feature-membership + image
+ +INFO : Parsed successfully 8.2.3.6: +noncomposite-feature-membership = +
+ +start + nonterminal_rule + noncomposite-feature-membership + image
+ +INFO : Parsed successfully 8.2.3.6: +el-prefix = '^' | '/' + +start + nonterminal_rule + el-prefix + alternation + terminal '^' + terminal '/' + +INFO : Parsed successfully 8.2.3.6: +usage-cp = usageDeclaration ValuePart? + +start + nonterminal_rule + usage-cp + sequence + name usage + name Declaration + expression + name ValuePart + repetition ? + +INFO : Parsed successfully 8.2.3.6: +extended-def = +
+ +start + nonterminal_rule + extended-def + image
+ +INFO : Parsed successfully 8.2.3.6: +extended-def-name-compartment = + '«' BasicDefinitionPrefix? DefinitionExtensionKeyword+ 'def' '»' + definition-name-with-alias + +start + nonterminal_rule + extended-def-name-compartment + sequence + terminal '«' + expression + name BasicDefinitionPrefix + repetition ? + expression + name DefinitionExtensionKeyword + repetition + + terminal 'def' + terminal '»' + name definition-name-with-alias + +WARNING : Graphical note found in
, but should beelement: Note. This production is only valid for cases where one or more +WARNING : Production start line does not contain exactly one '=': DefinitionExtensionKeyword names a MetadataDefinition that is a direct +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +DefinitionExtensionKeyword names a MetadataDefinition that is a direct + +Unexpected token Token('NONTERMINAL_NAME', 'DefinitionExtensionKeyword') at line 1, column 1. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +WARNING : Production start line does not contain exactly one '=': or indirect specialization of KerML metaclass SemanticMetadata. +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +or indirect specialization of KerML metaclass SemanticMetadata. + +Unexpected token Token('GRAPHICAL_NAME', 'indirect') at line 1, column 4. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'or')] + +WARNING : Production start line does not contain exactly one '=': definition-node |= extended-def +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +definition-node |= extended-def + +Unexpected token Token('VBAR', '|') at line 1, column 17. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'definition-node')] + +INFO : Parsed successfully 8.2.3.6: +extended-usage = +
+ +start + nonterminal_rule + extended-usage + image
+ +INFO : Parsed successfully 8.2.3.6: +extended-usage-name-compartment = + '«' BasicUsagePrefix? UsageExtensionKeyword+ '»' + usage-name-with-alias + +start + nonterminal_rule + extended-usage-name-compartment + sequence + terminal '«' + expression + name BasicUsagePrefix + repetition ? + expression + name UsageExtensionKeyword + repetition + + terminal '»' + name usage-name-with-alias + +WARNING : Graphical note found in
, but should beelement: Note. This production is only valid for cases where one or more +WARNING : Production start line does not contain exactly one '=': UsageExtensionKeyword names a MetadataDefinition that is a direct +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +UsageExtensionKeyword names a MetadataDefinition that is a direct + +Unexpected token Token('NONTERMINAL_NAME', 'UsageExtensionKeyword') at line 1, column 1. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +ERROR : Non-unique production name: or indirect specialization of KerML metaclass SemanticMetadata. in {'language-string', 'comment-without-keyword', 'annotation-link', 'unowned-membership', 'features-compartment', 'composite-feature-membership', 'members-compartment-element', 'package-node', 'noncomposite-feature-membership', 'features-compartment-contents', 'extended-def-name-compartment', 'rel-name', 'definition-name-with-alias', 'general-view', 'element-node', 'comment-node', 'recursive-import', 'n-ary-association-dot', 'relationships-compartment-contents', 'subsetting', 'text-block', 'n-ary-dependency-client-link', 'element-inside-textual-compartment', 'package-compartment', 'packages-compartment', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'extended-usage-name-compartment', 'n-ary-dependency-supplier-link', 'variants-compartment', 'relationships-compartment', 'extended-def', 'redefinition', 'features-compartment-element', 'documentation-compartment', 'package-with-name-in-tab', 'relationships-compartment-element', 'definition', 'import', 'general-compartment', 'annotation-node', 'packages-compartment-element', 'members-compartment', 'type-node', 'top-level-import', 'documentation-node', 'element', 'textual-representation-node', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'extended-usage', 'imported-package-with-name-inside', 'reference-subsetting', 'comment-with-keyword', 'ellipsis-at-lower-left-corner', 'subclassification', 'usage-name-with-alias', 'general-element', 'owned-membership', 'packages-compartment-contents', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'definition-node |', 'general-node |', 'package-with-name-inside', 'n-ary-dependency', 'variants-compartment-contents', 'usage-cp', 'compartment-stack', 'annotated-element', 'relationship-name', 'imported-package-with-name-in-tab'} +WARNING : Production start line does not contain exactly one '=': or indirect specialization of KerML metaclass SemanticMetadata. +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +or indirect specialization of KerML metaclass SemanticMetadata. + +Unexpected token Token('GRAPHICAL_NAME', 'indirect') at line 1, column 4. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'or')] + +WARNING : Production start line does not contain exactly one '=': usage-node |= extended-usage +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.6 in production: +usage-node |= extended-usage + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.7 Attributes Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| attribute-def +WARNING : Production start line does not contain exactly one '=': usage-node =| attribute +WARNING : Production start line does not contain exactly one '=': compartment =| attributes-compartment +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.8 Enumerations Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| enumeration-def +WARNING : Production start line does not contain exactly one '=': usage-node =| enumeration +WARNING : Production start line does not contain exactly one '=': compartment =| enums-compartment +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.8 in production: +enums-compartment_contents = (enums-compartment-element)* '…'? + +No terminal matches '_' in the current parser context, at line 1 col 18 + +enums-compartment_contents = (enums-compartment-element)* + ^ +Expected one of: + * EQUAL + * "=|" + +Previous tokens: Token('GRAPHICAL_NAME', 'enums-compartment') + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.9 Occurrences Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| occurrence-def +WARNING : Production start line does not contain exactly one '=': general-relationship =| portion-relationship +WARNING : Production start line does not contain exactly one '=': usage-node =| +WARNING : Production start line does not contain exactly one '=': snapshots-name-compartment +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.9 in production: +snapshots-name-compartment + '«snapshot»' + usage-name-with-alias + +Unexpected token Token('TERMINAL', "'«snapshot»'") at line 2, column 7. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'snapshots-name-compartment')] + +ERROR : Non-unique production name: definition-node | in {'comment-without-keyword', 'annotation-link', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'relationships-compartment-contents', 'n-ary-dependency-client-link', 'packages-compartment', 'enums-compartment', 'n-ary-dependency-supplier-link', 'relationships-compartment', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'top-level-import', 'imported-package-with-name-inside', 'reference-subsetting', 'packages-compartment-contents', 'timeslice', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'noncomposite-feature-membership', 'snapshot', 'element-node', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'attributes-compartment', 'redefinition', 'attribute-def', 'annotation-node', 'occurrence-name-compartment', 'element', 'textual-representation-node', 'definition-node |', 'occurrence-def', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'comment-node', 'subsetting', 'extended-usage-name-compartment', 'occurrence-def-name-compartment', 'timeslice-name-compartment', 'occurrence', 'package-with-name-in-tab', 'import', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'ellipsis-at-lower-left-corner', 'general-element', 'enumeration', 'attribute', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'rel-name', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'extended-def', 'occurrence-ref', 'enums-compartment-element', 'event-occurrence-def', 'documentation-node', 'attribute-def-name-compartment', 'comment-with-keyword', 'usage-name-with-alias', 'owned-membership', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'package-with-name-inside', 'n-ary-dependency', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'compartment-stack'} +WARNING : Production start line does not contain exactly one '=': definition-node |= event-occurrence-def +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.9 in production: +definition-node |= event-occurrence-def + +Unexpected token Token('VBAR', '|') at line 1, column 17. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'definition-node')] + +ERROR : Non-unique production name: usage-node | in {'comment-without-keyword', 'annotation-link', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'relationships-compartment-contents', 'n-ary-dependency-client-link', 'packages-compartment', 'enums-compartment', 'n-ary-dependency-supplier-link', 'relationships-compartment', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'top-level-import', 'imported-package-with-name-inside', 'reference-subsetting', 'packages-compartment-contents', 'timeslice', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'noncomposite-feature-membership', 'snapshot', 'element-node', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'attributes-compartment', 'redefinition', 'attribute-def', 'annotation-node', 'occurrence-name-compartment', 'element', 'textual-representation-node', 'definition-node |', 'occurrence-def', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'comment-node', 'subsetting', 'extended-usage-name-compartment', 'occurrence-def-name-compartment', 'timeslice-name-compartment', 'occurrence', 'package-with-name-in-tab', 'import', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'ellipsis-at-lower-left-corner', 'general-element', 'enumeration', 'attribute', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'rel-name', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'extended-def', 'occurrence-ref', 'enums-compartment-element', 'event-occurrence-def', 'documentation-node', 'attribute-def-name-compartment', 'comment-with-keyword', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'package-with-name-inside', 'n-ary-dependency', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'compartment-stack'} +WARNING : Production start line does not contain exactly one '=': usage-node |= event-occurrence +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.9 in production: +usage-node |= event-occurrence + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.9 in production: +eventer = usage-node | definition-node< + +No terminal matches '<' in the current parser context, at line 1 col 39 + +eventer = usage-node | definition-node< + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('GRAPHICAL_NAME', 'definition-node') + +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Non-unique production name: succession-label in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'relationships-compartment-contents', 'eventer', 'n-ary-dependency-client-link', 'packages-compartment', 'enums-compartment', 'n-ary-dependency-supplier-link', 'relationships-compartment', 'sq-graphical-relationship', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'top-level-import', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'event-edge', 'individuals-compartment-contents', 'packages-compartment-contents', 'timeslice', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'attributes-compartment', 'redefinition', 'portion-relationship', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'occurrence-name-compartment', 'element', 'textual-representation-node', 'sq-l-node', 'timeslices-compartment-contents', 'individuals-compartment', 'definition-node |', 'occurrence-def', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'comment-node', 'sequence-compartment', 'subsetting', 'extended-usage-name-compartment', 'occurrence-def-name-compartment', 'succession-label', 'timeslice-name-compartment', 'occurrence', 'package-with-name-in-tab', 'proxy-label', 'import', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'general-element', 'enumeration', 'attribute', 'timeslices-compartment-element', 'sq-port', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'occurrence-ref', 'enums-compartment-element', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'documentation-node', 'sq-head-node', 'attribute-def-name-compartment', 'comment-with-keyword', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'compartment-stack'} +WARNING : Graphical note found in
, but should beelement: Note: the proxy nodes attached to a succession must refer to an event +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.10 Items Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| item-def +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.10 in production: +interconnection-element = | item| item-ref + +Unexpected token Token('VBAR', '|') at line 1, column 27. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +WARNING : Production start line does not contain exactly one '=': usage-node =| item +WARNING : Production start line does not contain exactly one '=': compartment =| items-compartment +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.11 Parts Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| part-def +ERROR : Non-unique production name: interconnection-element in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'relationships-compartment-contents', 'eventer', 'items-compartment-contents', 'n-ary-dependency-client-link', 'packages-compartment', 'enums-compartment', 'n-ary-dependency-supplier-link', 'relationships-compartment', 'sq-graphical-relationship', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'top-level-import', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'event-edge', 'individuals-compartment-contents', 'packages-compartment-contents', 'timeslice', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'redefinition', 'portion-relationship', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'occurrence-name-compartment', 'element', 'textual-representation-node', 'sq-l-node', 'timeslices-compartment-contents', 'individuals-compartment', 'definition-node |', 'occurrence-def', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'item-def-name-compartment', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'extended-usage-name-compartment', 'occurrence-def-name-compartment', 'succession-label', 'timeslice-name-compartment', 'occurrence', 'package-with-name-in-tab', 'proxy-label', 'import', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'general-element', 'enumeration', 'attribute', 'timeslices-compartment-element', 'sq-port', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'occurrence-ref', 'enums-compartment-element', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'item-name-compartment', 'documentation-node', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'comment-with-keyword', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'compartment-stack', 'item-def'} +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.11 in production: +interconnection-element = | part | part-ref + +Unexpected token Token('VBAR', '|') at line 1, column 27. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +WARNING : Production start line does not contain exactly one '=': usage-node =| part +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.11 in production: +directed-features-compartment-element = + el-prefix FeatureDirection Definition-Body-Item* + +No terminal matches '-' in the current parser context, at line 2 col 40 + + el-prefix FeatureDirection Definition-Body-Item* + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('NONTERMINAL_NAME', 'Definition') + +WARNING : Production start line does not contain exactly one '=': interconnection-view =| +WARNING : Production start line does not contain exactly one '=': general-view =| interconnection-view +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.12 Ports Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| port-def +WARNING : Production start line does not contain exactly one '=': usage-node =| port-usage +WARNING : Production start line does not contain exactly one '=': compartment =| ports-compartment +WARNING : Production start line does not contain exactly one '=': interconnection-element =| port-def | port +ERROR : Unexpected empty line in candidate production: + | +
+ | + proxy-v +ERROR : Production start line starts with a space or tab: | +WARNING : Production start line does not contain exactly one '=': | +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.12 in production: + | +
+ | + proxy-v + +Unexpected token Token('VBAR', '|') at line 1, column 5. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.13 Connections Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| connection-def +WARNING : Production start line does not contain exactly one '=': usage-node =| connection +WARNING : Production start line does not contain exactly one '=': compartment =| connections-compartment +WARNING : Production start line does not contain exactly one '=': interconnection-element =| +WARNING : Production start line does not contain exactly one '=': usage-edge =| connection-graphical | binding-connection +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.13 in production: +connection-def-graphical = +
+ | +
general-relationship |= connection-def-graphical + +Unexpected token Token('EQUAL', '=') at line 4, column 98. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * QUALIFIED_NAME + * LBRACE + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('VBAR', '|')] + +ERROR : Non-unique production name: definition-node | in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'connection-def-name-compartment', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'part-name-compartment', 'relationships-compartment-contents', 'eventer', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'packages-compartment', 'a-property', 'enums-compartment', 'port-def', 'n-ary-dependency-supplier-link', 'relationships-compartment', 'sq-graphical-relationship', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'port-t', 'top-level-import', 'part-def', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'event-edge', 'port-label', 'individuals-compartment-contents', 'connection-def-graphical', 'packages-compartment-contents', 'timeslice', 'connections-compartment-contents', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'a-direction', 'connection-relationship', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'directed-features-compartment', 'pdv', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'redefinition', 'portion-relationship', 'port-usage', 'proxy-v', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'port-r', 'occurrence-name-compartment', 'element', 'textual-representation-node', '|', 'sq-l-node', 'timeslices-compartment-contents', 'directed-features-compartment-contents', 'connection-name-compartment', 'individuals-compartment', 'n-ary-def-segment', 'definition-node |', 'occurrence-def', 'connection-label', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'item-def-name-compartment', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'parts-compartment', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'extended-usage-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'timeslice-name-compartment', 'parts-compartment-contents', 'occurrence', 'connection', 'package-with-name-in-tab', 'port-l', 'proxy-label', 'import', 'n-ary-def-connection-dot', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'part', 'parts-compartment-element', 'part-def-name-compartment', 'general-element', 'enumeration', 'directed-features-compartment-element', 'connection-graphical', 'attribute', 'connection-def', 'timeslices-compartment-element', 'ports-compartment-contents', 'cdef-label', 'c-adornment', 'n-ary-connection-def', 'sq-port', 'connection-end', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'ports-compartment-element', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'interconnection-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'port-b', 'ports-compartment', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'item-name-compartment', 'documentation-node', 'a-subsetting', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'comment-with-keyword', 'part-ref', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'pdh', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'port-name-compartment', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'connections-compartment', 'compartment-stack', 'proxy-h', 'item-def'} +WARNING : Production start line does not contain exactly one '=': definition-node |= n-ary-def-connection-dot +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.13 in production: +definition-node |= n-ary-def-connection-dot + +Unexpected token Token('VBAR', '|') at line 1, column 17. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'definition-node')] + +WARNING : Production start line does not contain exactly one '=': general-relationship |= n-ary-def-segment +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.13 in production: +general-relationship |= n-ary-def-segment + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Non-unique production name: usage-node | in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'connection-def-name-compartment', 'members-compartment-element', 'attributes-compartment-contents', 'features-compartment-contents', 'part-name-compartment', 'relationships-compartment-contents', 'eventer', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'n-ary-connection', 'packages-compartment', 'a-property', 'enums-compartment', 'port-def', 'n-ary-dependency-supplier-link', 'n-ary-connection-dot', 'relationships-compartment', 'sq-graphical-relationship', 'features-compartment-element', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'port-t', 'top-level-import', 'part-def', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'event-edge', 'port-label', 'individuals-compartment-contents', 'connection-def-graphical', 'packages-compartment-contents', 'timeslice', 'general-relationship |', 'connections-compartment-contents', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'a-direction', 'connection-relationship', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'directed-features-compartment', 'pdv', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'redefinition', 'portion-relationship', 'port-usage', 'proxy-v', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'port-r', 'occurrence-name-compartment', 'element', 'textual-representation-node', '|', 'sq-l-node', 'timeslices-compartment-contents', 'directed-features-compartment-contents', 'connection-name-compartment', 'individuals-compartment', 'n-ary-def-segment', 'definition-node |', 'occurrence-def', 'connection-label', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'item-def-name-compartment', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'parts-compartment', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'extended-usage-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'timeslice-name-compartment', 'parts-compartment-contents', 'occurrence', 'connection', 'package-with-name-in-tab', 'port-l', 'proxy-label', 'import', 'n-ary-def-connection-dot', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'part', 'parts-compartment-element', 'part-def-name-compartment', 'general-element', 'enumeration', 'directed-features-compartment-element', 'connection-graphical', 'attribute', 'connection-def', 'timeslices-compartment-element', 'ports-compartment-contents', 'cdef-label', 'c-adornment', 'n-ary-connection-def', 'sq-port', 'connection-end', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'ports-compartment-element', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'interconnection-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'port-b', 'ports-compartment', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'item-name-compartment', 'documentation-node', 'a-subsetting', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'comment-with-keyword', 'part-ref', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'pdh', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'attribute-name-compartment', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'port-name-compartment', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'connections-compartment', 'compartment-stack', 'proxy-h', 'item-def'} +WARNING : Production start line does not contain exactly one '=': usage-node |= n-ary-connection-dot +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.13 in production: +usage-node |= n-ary-connection-dot + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.14 Interfaces Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| interface-def +WARNING : Production start line does not contain exactly one '=': interconnection-element =| interface +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.14 in production: +interface-def-name-compartment = + '«' DefinitionPrefix 'interface' 'def' '»' + definition-name-with-alias< + +No terminal matches '<' in the current parser context, at line 3 col 33 + + definition-name-with-alias< + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('GRAPHICAL_NAME', 'definition-name-with-alias') + +WARNING : Production start line does not contain exactly one '=': usage-node =| interface +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Non-unique production name: connection-relationship in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'connection-def-name-compartment', 'connection-usage-elaboration', 'members-compartment-element', 'attributes-compartment-contents', 'interface', 'features-compartment-contents', 'part-name-compartment', 'relationships-compartment-contents', 'eventer', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'n-ary-connection', 'interfaces-compartment-element', 'packages-compartment', 'a-property', 'ends-compartment', 'enums-compartment', 'port-def', 'n-ary-dependency-supplier-link', 'n-ary-connection-dot', 'relationships-compartment', 'sq-graphical-relationship', 'features-compartment-element', 'binding-connection', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'port-t', 'top-level-import', 'part-def', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'event-edge', 'port-label', 'individuals-compartment-contents', 'connection-def-graphical', 'packages-compartment-contents', 'timeslice', 'general-relationship |', 'connections-compartment-contents', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'variants-compartment', 'features-compartment', 'a-direction', 'connection-relationship', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'directed-features-compartment', 'pdv', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'interfaces-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'redefinition', 'portion-relationship', 'interface-def-name-compartment', 'port-usage', 'proxy-v', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'port-r', 'occurrence-name-compartment', 'element', 'textual-representation-node', '|', 'sq-l-node', 'timeslices-compartment-contents', 'directed-features-compartment-contents', 'connection-name-compartment', 'individuals-compartment', 'n-ary-def-segment', 'definition-node |', 'occurrence-def', 'connection-label', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'unowned-membership', 'item-def-name-compartment', 'ends-compartment-element', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'parts-compartment', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'extended-usage-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'n-ary-segment', 'timeslice-name-compartment', 'parts-compartment-contents', 'occurrence', 'connection', 'interfaces-compartment-contents', 'package-with-name-in-tab', 'port-l', 'proxy-label', 'import', 'n-ary-def-connection-dot', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'interface-name-compartment', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'part', 'parts-compartment-element', 'part-def-name-compartment', 'general-element', 'enumeration', 'directed-features-compartment-element', 'connection-graphical', 'attribute', 'connection-def', 'cdot-label', 'timeslices-compartment-element', 'ports-compartment-contents', 'cdef-label', 'c-adornment', 'n-ary-connection-def', 'sq-port', 'connection-end', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'ports-compartment-element', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'interconnection-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'port-b', 'ports-compartment', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'item-name-compartment', 'documentation-node', 'a-subsetting', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'interface-def', 'comment-with-keyword', 'part-ref', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'pdh', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'rolename', 'attribute-name-compartment', 'connection-definition-elaboration', 'ends-compartment-contents', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'port-name-compartment', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'connections-compartment', 'compartment-stack', 'proxy-h', 'item-def'} +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.14 in production: +connection-relationship = + | interface-connection + +Unexpected token Token('VBAR', '|') at line 2, column 5. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.15 Allocations Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| allocation-def +WARNING : Production start line does not contain exactly one '=': usage-node =| allocation +WARNING : Production start line does not contain exactly one '=': compartment =| allocations-compartment +WARNING : Production start line does not contain exactly one '=': general-relationship =| allocate-relationship +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.15 in production: +usage-edge = |allocate-relationship + +Unexpected token Token('VBAR', '|') at line 1, column 14. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.16 Flows Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| flow-def +WARNING : Production start line does not contain exactly one '=': usage-node =| flow-node +WARNING : Production start line does not contain exactly one '=': compartment =| flows-compartment +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.16 in production: +flows-compartment = + ________________________________________ + 'flows' + flows-compartment-contents + +No terminal matches '_' in the current parser context, at line 2 col 7 + + ________________________________________ + ^ +Expected one of: + * IMAGE + * LEXICAL_NAME + * QUALIFIED_NAME + * LBRACE + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('EQUAL', '=') + +WARNING : Production start line does not contain exactly one '=': interconnection-element =| +WARNING : Production start line does not contain exactly one '=': connection-relationship =| +WARNING : Production start line does not contain exactly one '=': usage-edge =| message | flow | succession-flow +WARNING : Graphical note found in
, but should beelement: Note: proxy nodes and ends of messages must refer to occurrences +WARNING : Graphical note found in
, but should beelement: Note: proxy nodes at ends of flows must refer to directed features +ERROR : Non-unique production name: flow-node in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'connection-def-name-compartment', 'connection-usage-elaboration', 'members-compartment-element', 'attributes-compartment-contents', 'interface', 'allocation-def', 'features-compartment-contents', 'succession-flow', 'flow-def', 'part-name-compartment', 'relationships-compartment-contents', 'eventer', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'n-ary-connection', 'interfaces-compartment-element', 'packages-compartment', 'a-property', 'ends-compartment', 'enums-compartment', 'port-def', 'n-ary-dependency-supplier-link', 'n-ary-connection-dot', 'relationships-compartment', 'allocate-relationship', 'sq-graphical-relationship', 'features-compartment-element', 'binding-connection', 'flow-end-node', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'port-t', 'top-level-import', 'interface-connection', 'allocations-compartment-contents', 'part-def', 'sq-part', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'event-edge', 'port-label', 'flows-compartment', 'individuals-compartment-contents', 'connection-def-graphical', 'packages-compartment-contents', 'timeslice', 'general-relationship |', 'connections-compartment-contents', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'allocations-compartment', 'variants-compartment', 'features-compartment', 'a-direction', 'connection-relationship', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'directed-features-compartment', 'pdv', 'flows-compartment-contents', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'interfaces-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'allocation-def-name-compartment', 'redefinition', 'portion-relationship', 'interface-def-name-compartment', 'port-usage', 'proxy-v', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'port-r', 'occurrence-name-compartment', 'element', 'message', 'textual-representation-node', '|', 'sq-l-node', 'timeslices-compartment-contents', 'allocations-compartment-element', 'directed-features-compartment-contents', 'connection-name-compartment', 'flow-name-compartment', 'allocation', 'individuals-compartment', 'msg-end-node', 'n-ary-def-segment', 'message-label', 'definition-node |', 'occurrence-def', 'connection-label', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'allocation-node', 'unowned-membership', 'item-def-name-compartment', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'parts-compartment', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'flow-node', 'extended-usage-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'n-ary-segment', 'timeslice-name-compartment', 'parts-compartment-contents', 'occurrence', 'connection', 'interfaces-compartment-contents', 'package-with-name-in-tab', 'port-l', 'proxy-label', 'import', 'n-ary-def-connection-dot', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'interface-name-compartment', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'part', 'parts-compartment-element', 'part-def-name-compartment', 'general-element', 'enumeration', 'directed-features-compartment-element', 'connection-graphical', 'attribute', 'connection-def', 'cdot-label', 'timeslices-compartment-element', 'ports-compartment-contents', 'cdef-label', 'c-adornment', 'n-ary-connection-def', 'sq-port', 'connection-end', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'ports-compartment-element', 'recursive-import', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'port-b', 'flow-label', 'ports-compartment', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'interface-label', 'item-name-compartment', 'documentation-node', 'a-subsetting', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'interface-def', 'usage-edge', 'comment-with-keyword', 'part-ref', 'flows-compartment-element', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'pdh', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'rolename', 'attribute-name-compartment', 'connection-definition-elaboration', 'ends-compartment-contents', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'port-name-compartment', 'flow', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'connections-compartment', 'compartment-stack', 'proxy-h', 'item-def'} +ERROR : Non-unique production name: flow-label in {'sq-succession', 'comment-without-keyword', 'annotation-link', 'connection-def-name-compartment', 'connection-usage-elaboration', 'members-compartment-element', 'attributes-compartment-contents', 'interface', 'allocation-def', 'features-compartment-contents', 'succession-flow', 'flow-def', 'message-node-r', 'part-name-compartment', 'relationships-compartment-contents', 'eventer', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'n-ary-connection', 'interfaces-compartment-element', 'sflow-node-r', 'packages-compartment', 'a-property', 'ends-compartment', 'enums-compartment', 'port-def', 'n-ary-dependency-supplier-link', 'n-ary-connection-dot', 'relationships-compartment', 'allocate-relationship', 'sq-graphical-relationship', 'features-compartment-element', 'binding-connection', 'flow-end-node', 'documentation-compartment', 'relationships-compartment-element', 'usage-node |', 'definition', 'general-compartment', 'packages-compartment-element', 'type-node', 'port-t', 'top-level-import', 'interface-connection', 'allocations-compartment-contents', 'part-def', 'sq-part', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'event-edge', 'port-label', 'flows-compartment', 'individuals-compartment-contents', 'connection-def-graphical', 'packages-compartment-contents', 'timeslice', 'general-relationship |', 'connections-compartment-contents', 'general-node |', 'snapshots-name-compartment', 'event-occurrence-def-name-compartment', 'package-compartment', 'allocations-compartment', 'variants-compartment', 'features-compartment', 'a-direction', 'connection-relationship', 'noncomposite-feature-membership', 'snapshot', 'snapshots-compartment-element', 'snapshots-compartment-contents', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'directed-features-compartment', 'pdv', 'flows-compartment-contents', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'element-inside-textual-compartment', 'interfaces-compartment', 'enumeration-def-name-compartment', 'item-ref', 'attributes-compartment', 'allocation-def-name-compartment', 'redefinition', 'portion-relationship', 'interface-def-name-compartment', 'port-usage', 'proxy-v', 'attribute-def', 'individuals-compartment-element', 'annotation-node', 'interconnection-element', 'items-compartment', 'port-r', 'occurrence-name-compartment', 'element', 'message', 'textual-representation-node', '|', 'sq-l-node', 'timeslices-compartment-contents', 'allocations-compartment-element', 'directed-features-compartment-contents', 'connection-name-compartment', 'flow-name-compartment', 'allocation', 'individuals-compartment', 'msg-end-node', 'n-ary-def-segment', 'message-label', 'definition-node |', 'occurrence-def', 'connection-label', 'variants-compartment-contents', 'enumeration-def', 'annotated-element', 'allocation-node', 'unowned-membership', 'item-def-name-compartment', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'package-node', 'extended-def-name-compartment', 'definition-name-with-alias', 'attributes-compartment-element', 'general-view', 'parts-compartment', 'comment-node', 'sequence-compartment', 'item', 'subsetting', 'flow-node', 'extended-usage-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'n-ary-segment', 'timeslice-name-compartment', 'parts-compartment-contents', 'occurrence', 'connection', 'interfaces-compartment-contents', 'package-with-name-in-tab', 'port-l', 'proxy-label', 'import', 'n-ary-def-connection-dot', 'occurrences-compartment-contents', 'timeslice-or-snapshot-node', 'sflow-node-l', 'interface-name-compartment', 'enumeration-name-compartment', 'extended-usage', 'event-occurrence', 'lifeline', 'ellipsis-at-lower-left-corner', 'part', 'parts-compartment-element', 'part-def-name-compartment', 'general-element', 'enumeration', 'directed-features-compartment-element', 'connection-graphical', 'attribute', 'connection-def', 'cdot-label', 'timeslices-compartment-element', 'ports-compartment-contents', 'cdef-label', 'c-adornment', 'n-ary-connection-def', 'sq-port', 'connection-end', 'flow-node-l', 'usage-cp', 'members-compartment', 'subclassification', 'relationship-name', 'imported-package-with-name-in-tab', 'language-string', 'composite-feature-membership', 'snapshots-compartment', 'rel-name', 'sq-proxy', 'ports-compartment-element', 'recursive-import', 'message-node-l', 'n-ary-association-dot', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'type-relationship', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'occurrences-compartment', 'extended-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'port-b', 'flow-label', 'ports-compartment', 'sequence-view', 'sq-graphical-node', 'timeslices-compartment', 'event-occurrence-def', 'interface-label', 'item-name-compartment', 'documentation-node', 'a-subsetting', 'sq-head-node', 'items-compartment-element', 'attribute-def-name-compartment', 'interface-def', 'usage-edge', 'comment-with-keyword', 'part-ref', 'flows-compartment-element', 'usage-name-with-alias', 'owned-membership', 'event-occurrence-name-compartment', 'pdh', 'n-ary-dependency-client-or-supplier-link', 'members-compartment-contents', 'el-prefix', 'rolename', 'attribute-name-compartment', 'connection-definition-elaboration', 'ends-compartment-contents', 'sq-port-label', 'package-with-name-inside', 'n-ary-dependency', 'port-name-compartment', 'flow', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'connections-compartment', 'compartment-stack', 'proxy-h', 'item-def'} +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.17 Actions Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| action-def +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.17 in production: +action-def-name-compartment = + '«' DefinitionPrefix 'action' 'def' '»' + definition-name-with-alias< + +No terminal matches '<' in the current parser context, at line 3 col 33 + + definition-name-with-alias< + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('GRAPHICAL_NAME', 'definition-name-with-alias') + +WARNING : Production start line does not contain exactly one '=': usage-node =| +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.17 in production: +action-name-compartment = + '«' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias< + +No terminal matches '<' in the current parser context, at line 3 col 28 + + usage-name-with-alias< + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('GRAPHICAL_NAME', 'usage-name-with-alias') + +WARNING : Production start line does not contain exactly one '=': compartment =| +WARNING : Production start line does not contain exactly one '=': action-flow-element =| +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.17 in production: +param-label = QualifiedName (‘:’ QualifiedName)* + +No terminal matches '‘' in the current parser context, at line 1 col 30 + +param-label = QualifiedName (‘:’ QualifiedName)* + ^ +Expected one of: + * IMAGE + * LEXICAL_NAME + * QUALIFIED_NAME + * LBRACE + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('LPAR', '(') + +ERROR : Non-unique production name: usage-edge in {'members-compartment-element', 'message-node-r', 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'allocation', 'loop-body', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'occurrences-compartment', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'general-node |', 'snapshots-name-compartment', 'connection-relationship', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'variants-compartment-contents', 'enumeration-def', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'package-with-name-in-tab', 'sflow-node-l', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'rel-name', 'action-def', 'while-loop-action-node', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'a-subsetting', 'sq-head-node', 'interface-def', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'documentation-compartment', 'definition', 'general-compartment', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'start-node', 'subclassification', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'fork-node', 'accept-action-expression', 'event-occurrence-def', 'owned-membership', 'pdh', 'rolename', 'connections-compartment', 'features-compartment-contents', 'action-body', 'for-loop-action-node', 'action', 'enums-compartment', 'sq-graphical-relationship', 'parameters-compartment', 'binding-connection', 'packages-compartment-element', 'type-node', 'interface-connection', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'features-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.17 in production: +usage-edge = |succession perform-edge + +Unexpected token Token('VBAR', '|') at line 1, column 14. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.18 States Graphical Notation +ERROR :
element appears at start of line: + definition-node =| state-def + +state-def = + + +WARNING : Production start line does not contain exactly one '=': definition-node =| state-def +WARNING : Production start line does not contain exactly one '=': usage-node =| +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +entry-action-name-comp = + +Unexpected token Token('_NON_CONTINUATION_LINE', '\n') at line 1, column 25. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +WARNING : Production start line does not contain exactly one '=': '«' 'entry' OccurrenceUsagePrefix 'action' '»' +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +'«' 'entry' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +Unexpected token Token('TERMINAL', "'«'") at line 1, column 1. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +exit-action-name-comp = + +Unexpected token Token('_NON_CONTINUATION_LINE', '\n') at line 1, column 24. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +WARNING : Production start line does not contain exactly one '=': '«' 'exit' OccurrenceUsagePrefix 'action' '»' +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +'«' 'exit' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +Unexpected token Token('TERMINAL', "'«'") at line 1, column 1. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +do-action-name-comp = + +Unexpected token Token('_NON_CONTINUATION_LINE', '\n') at line 1, column 22. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +WARNING : Production start line does not contain exactly one '=': '«' 'do' OccurrenceUsagePrefix 'action' '»' +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +'«' 'do' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +Unexpected token Token('TERMINAL', "'«'") at line 1, column 1. +Expected one of: + * LEXICAL_NAME + * LINE_COMMENT + * GRAPHICAL_NAME +Previous tokens: [None] + +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'succession-compartment', 'occurrences-compartment', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'enumeration-def', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'definition', 'general-compartment', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'start-node', 'subclassification', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= exhibit-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +general-relationship |= exhibit-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Non-unique production name: usage-edge in {'members-compartment-element', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'succession-compartment', 'occurrences-compartment', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'enumeration-def', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'definition', 'general-compartment', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'start-node', 'subclassification', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.18 in production: +usage-edge = |transition | st-succession | exhibit-edge + +Unexpected token Token('VBAR', '|') at line 1, column 14. +Expected one of: + * IMAGE + * NONTERMINAL_NAME + * LBRACE + * QUALIFIED_NAME + * GRAPHICAL_NAME + * LPAR + * TERMINAL + * LEXICAL_NAME +Previous tokens: [Token('EQUAL', '=')] + +ERROR : Unexpected tag inside+ +state-def-name-compartment = + '«' DefinitionPrefix 'state' 'def' '»' + definition-name-with-alias + ('«' 'parallel' '»')? + +usage-node =| + state-node + | exhibit-state-usage + +state = + +
+ +state-ref = + +
+ +state-name-compartment = + '«' OccurrenceUsagePrefix 'state' '»' + usage-name-with-alias + ('«' 'parallel' '»')? + +exhibit-state-usage = +
+ +state-subaction-body = state-subaction-body-textual | action-flow-view + +state-subaction-body-textual = state-subaction-declaration? ( '{' ActionBodyItem* '}' )? + +state-subaction-declaration = + PerformActionUsageDeclaration + | AcceptNodeDeclaration + | SendNodeDeclaration + | AssignmentNodeDeclaration + + +state-do-action = +
+ state-subaction-body + +state-entry-action = + +
+ state-subaction-body + +state-exit-action = +
+ state-subaction-body + +entry-action = +
| + +
+ +entry-action-name-comp = +'«' 'entry' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +exit-action = +
+ +exit-action-name-comp = +'«' 'exit' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +do-action = +
+ +do-action-name-comp = +'«' 'do' OccurrenceUsagePrefix 'action' '»' + usage-name-with-alias + +exhibit-state-name-compartment = + '«exhibit-state»' + state-name-compartment + +compartment =| + states-compartment + | states-actions-compartment + | exhibit-states-compartment + | successions-compartment + | state-transition-compartment + +states-compartment = + +
+ states-compartment-contents + +states-compartment-contents = (states-compartment-element)* '…'? +states-compartment-element = + el-prefix? OccurrencePrefix ActionUsageDeclaration + +state-actions-compartment = + +
+ state-actions-compartment-contents + +state-actions-compartment-contents = (state-actions-compartment-element)* '…'? +state-actions-compartment-element = + el-prefix? EntryActionMember | DoActionMember | ExitActionMember + +exhibit-states-compartment = + +
+ exhibit-states-compartment-contents + +exhibit-states-compartment-contents = exhibit-state-scompartment-element* '…'? +exhibit-states-compartment-element-compartment = UsageDeclaration + +succession-compartment = + +
+ succession-compartment-contents + +succession-compartment-contents = QualifiedName* '…'? + +state-transition-compartment = + +
+ state-transition-view + +state-transition-view = + (state-transition-element)* + (dependencies-and-annotations-element)* + + +state-transition-element = + state-transition-node + | transition + | st-succession + +state-transition-node = + state-node + | state-ref-node + | start-node + | entry-action + | do-action + | exit-action + | done-node + | fork-node + | join-node + | decision-node + | merge-node + | terminate-node + | action + | perform-action-usage + | action-ref + +transition = +
+ | +
+ +state-source = + state-node | state-ref-node + +transition-label = trigger-expression '/' ActionUsage + +trigger-expression = AcceptParameterPart (guard-expression)? + +st-succession = +
+ | +
+ +exhibit-edge = +
+ +exhibitor = part | part-def + +general-relationship |= exhibit-edge + +usage-edge = |transition | st-succession | exhibit-edge
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.19 Calculations Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| calc-def +WARNING : Production start line does not contain exactly one '=': usage-node =| calc +ERROR : Non-unique production name: calc-name-compartment in {'members-compartment-element', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'succession-compartment', 'occurrences-compartment', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'enumeration-def', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': action-flow-element =| +WARNING : Production start line does not contain exactly one '=': compartment =| +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.20 Constraints Graphical Notation +ERROR :
element appears at start of line: + definition-node =| constraint-def + +constraint-def = + ++WARNING : Production start line does not contain exactly one '=': definition-node =| constraint-def +WARNING : Production start line does not contain exactly one '=': usage-node =| assume-constraint-node assert-constraint-node< +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.20 in production: +usage-node =| assume-constraint-node assert-constraint-node< + +No terminal matches '<' in the current parser context, at line 1 col 60 + +e-constraint-node assert-constraint-node< + ^ +Expected one of: + * VBAR + * IMAGE + * REPETITION_SYMBOL + * LEXICAL_NAME + * GRAPHICAL_NAME + * QUALIFIED_NAME + * LBRACE + * RPAR + * _NON_CONTINUATION_LINE + * LPAR + * TERMINAL + * NONTERMINAL_NAME + +Previous tokens: Token('GRAPHICAL_NAME', 'assert-constraint-node') + +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'occurrences-compartment', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= assume-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.20 in production: +general-relationship |= assume-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'occurrences-compartment', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= assert-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.20 in production: +general-relationship |= assert-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +WARNING : Production start line does not contain exactly one '=': compartment =| +WARNING : Production start line does not contain exactly one '=': interconnection-element =| +ERROR : Unexpected tag inside+ +constraint-def-name-compartment = + '«' DefinitionPrefix 'constraint' 'def' '»' + definition-name-with-alias + +usage-node = + constraint + | assert-constraint-usage + +constraint = + +
+ +constraint-ref = + +
+ +constraint-name-compartment = + '«' OccurrenceUsagePrefix 'constraint' '»' + usage-name-with-alias + +assert-constraint-node = + +
+ +assert-constraint-name-compartment = + '«assert constraint»' + constraint-name-compartment + +assume-constraint-node = +
+ +assume-constraint-name-compartment = + '«' OccurrenceUsagePrefix 'assume' 'constraint' '»' + usage-name-with-alias + +usage-node =| assume-constraint-node assert-constraint-node< + +assume-edge = +
+assumer = requirement | requirement-def + +general-relationship |= assume-edge + +assert-edge = +
+assertor = usage-node | definition-node + +general-relationship |= assert-edge + +compartment =| + constraints-compartment + | assert-constraints-compartment + +constraints-compartment = + +
+ constraints-compartment-contents + +constraints-compartment-contents = (constraints-usage-compartment-element)* '…'? +constraints-usage-compartment-element = + el-prefix? OccurrenceUsagePrefix ConstraintUsageDeclaration CalculationBody* + +assert-constraints-compartment = + +
+ assert-constraints-compartment-contents + +assert-constraints-compartment-contents = (assert-constraints-compartment-element)* '…'? +assert-constraints-compartment-element = + el-prefix? OccurrenceUsagePrefix ( 'not' )? + ( OwnedSubsetting FeatureSpecializationPart? | UsageDeclaration ) + CalculationUsageParameterPart CalculationBody + +interconnection-element =| + constraint-ref + | constraint +
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.21 Requirements Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| +ERROR : Non-unique production name: usage-node in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'occurrences-compartment', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'port-def', 'relationships-compartment', 'action-name-compartment', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'allocations-compartment-contents', 'sq-part', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'while-loop-action-name-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'package-node', 'parts-compartment', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'state-actions-compartment-contents', 'owned-membership', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'message-label', 'connection-label', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': compartment =| +WARNING : Production start line does not contain exactly one '=': compartment =| +WARNING : Production start line does not contain exactly one '=': interconnection-element =| +WARNING : Production start line does not contain exactly one '=': general-relationship =| frame-relationship +WARNING : Production start line does not contain exactly one '=': subject-actors-stakeholders-node =| requirement +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= satisfy-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.21 in production: +general-relationship |= satisfy-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'require-edge', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'requirer', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= require-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.21 in production: +general-relationship |= require-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Non-unique production name: usage-node | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'require-constraint-node', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'require-edge', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'requirer', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'require-constraint-name-compartment', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': usage-node |= require-constraint-node +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.21 in production: +usage-node |= require-constraint-node + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +ERROR : Non-unique production name: usage-node | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'frame-concern-name-compartment', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'frame-concern-node', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'require-constraint-node', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'require-edge', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'requirer', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'require-constraint-name-compartment', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': usage-node |= frame-concern-node +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.21 in production: +usage-node |= frame-concern-node + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +ERROR : Non-unique production name: general-relationship | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'usage-node |', 'part-def', 'perform-edge', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'until-condition', 'noncomposite-feature-membership', 'frame-concern-name-compartment', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'frame-concern-node', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'require-constraint-node', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'frame-edge', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'require-edge', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'requirer', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'require-constraint-name-compartment', 'n-ary-segment', 'proxy-label', 'extended-usage', 'cdef-label', 'framer', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': general-relationship |= frame-edge +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.21 in production: +general-relationship |= frame-edge + +Unexpected token Token('VBAR', '|') at line 1, column 22. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'general-relationship')] + +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.22 Cases Graphical Notation +WARNING : Production start line does not contain exactly one '=': compartment =| objective-compartment +ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.23 Analysis Cases Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| analysis-def +WARNING : Production start line does not contain exactly one '=': usage-node =| analysis +WARNING : Production start line does not contain exactly one '=': compartment =| analyses-compartment +WARNING : Production start line does not contain exactly one '=': action-flow-element =| +WARNING : Production start line does not contain exactly one '=': subject-actors-stakeholders-node =| analysis | analysis-def +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+INFO : PROCESSING Clause 8.2.3.24 Verification Cases Graphical Notation +WARNING : Production start line does not contain exactly one '=': definition-node =| verification-def +WARNING : Production start line does not contain exactly one '=': usage-node =| verification +ERROR : Non-unique production name: usage-node | in {'members-compartment-element', 'results-compartment', 'message-node-r', "'«' 'entry' OccurrenceUsagePrefix 'action' '»'", 'verification-def-name-compartment', 'param-label', 'part-name-compartment', 'a-redefinition', 'items-compartment-contents', 'n-ary-dependency-client-link', 'interfaces-compartment-element', 'guard-expression', 'stakeholder', 'assertor', 'n-ary-connection-dot', 'allocate-relationship', 'iteration', 'verification-name-compartment', 'usage-node |', 'part-def', 'perform-edge', 'objective-compartment', "'«' 'exit' OccurrenceUsagePrefix 'action' '»'", 'connection-def-graphical', 'assert-constraints-compartment-contents', 'analysis', 'until-condition', 'noncomposite-feature-membership', 'frame-concern-name-compartment', 'snapshots-compartment-contents', 'frames-compartment-contents', 'element-inside-textual-compartment', 'attributes-compartment', 'redefinition', 'parameter', 'state-entry-action', 'individuals-compartment-element', 'occurrence-name-compartment', 'textual-representation-node', 'sq-l-node', 'directed-features-compartment-contents', 'state-subaction-declaration', 'allocation', 'loop-body', 'actors-compartment-element', 'states-compartment-element', 'allocation-node', 'flow-on-connection', 'ends-compartment-element', 'sq-graphical-element', 'exhibit-state-usage', 'transition', 'calc-name-compartment', 'general-view', 'action-body-textual', 'then-body', 'actions-compartment', 'param-t', 'timeslice-name-compartment', 'occurrence', 'port-l', 'import', 'n-ary-def-connection-dot', 'if-condition', 'timeslice-or-snapshot-node', 'enumeration-name-compartment', 'perform-actions-compartment-element', 'ellipsis-at-lower-left-corner', 'verification', 'assert-constraints-compartment', 'connection-graphical', 'general-element', 'attribute', 'connection-def', 'condition-expression', 'aflow-succession', 'c-adornment', 'n-ary-connection-def', 'entry-action', 'assume-edge', 'succession-compartment', 'requirement-name-compartment', 'assume-constraints-compartment', 'occurrences-compartment', 'requirements-compartment-element', 'constraint-def', 'frame-concern-node', 'interconnection-compartment', 'allocation-name-compartment', 'port-def-name-compartment', 'occurrence-ref', 'succession-compartment-contents', 'enums-compartment-element', 'ports-compartment', 'timeslices-compartment', 'interface-label', 'attribute-def-name-compartment', 'flows-compartment-element', 'action-flow-compartment', 'usage-name-with-alias', 'members-compartment-contents', 'action-def-name-compartment', 'connection-definition-elaboration', 'package-with-name-inside', 'port-name-compartment', 'performed-by-compartment', 'proxy-h', 'comment-without-keyword', 'performed-by-compartment-contents', 'connection-def-name-compartment', 'analysis-def-name-compartment', 'allocation-def', 'decision-node', 'eventer', 'actions-compartment-contents', 'assign-action-node', 'sflow-node-r', 'assert-constraint-name-compartment', 'packages-compartment', 'actor', 'analyses-compartment-element', 'port-def', 'relationships-compartment', 'action-name-compartment', 'stakeholders-compartment-contents', 'features-compartment-element', 'flow-end-node', 'relationships-compartment-element', 'satisfy-requirements-compartment', 'analyses-compartment-contents', 'allocations-compartment-contents', 'sq-part', 'satisfy-requirement-usage', 'event-edge', 'perform-actions-compartment', 'exit-action', 'general-node |', 'snapshots-name-compartment', 'constraint-def-name-compartment', 'connection-relationship', 'state-transition-view', 'snapshots-compartment-element', 'element-node', 'occurrences-compartment-element', 'distinguished-parameter-link', 'flow-def-name-compartment', 'constraints-usage-compartment-element', 'concern-def-name-compartment', 'swimlane', 'analysis-def', 'item-ref', 'action-flow-relationship', 'action-flow-node', 'frames-compartment', 'attribute-def', 'items-compartment', 'port-r', 'perform-action-usage', '|', 'require-constraint-node', 'timeslices-compartment-contents', 'else-body', 'DefinitionExtensionKeyword names a MetadataDefinition that is a direct', 'msg-end-node', 'if-else-action-node', 'n-ary-def-segment', 'definition-node |', 'parameters-compartment-element', 'exhibit-state-name-compartment', 'variants-compartment-contents', 'state-subaction-body', 'requirement-def-name-compartment', 'enumeration-def', 'assumer', 'extended-def-name-compartment', 'definition-name-with-alias', 'comment-node', 'flow-node', 'extended-usage-name-compartment', 'satisfy-edge', 'require-constraints-compartment-contents', 'connection', 'state-name-compartment', 'package-with-name-in-tab', 'sflow-node-l', 'usage-node', 'interface-name-compartment', 'event-occurrence', 'merge-node', 'part-def-name-compartment', 'directed-features-compartment-element', 'assume-constraints-compartment-contents', 'subject-compartment-element', 'frame-edge', 'ports-compartment-contents', 'usage-cp', 'members-compartment', 'language-string', 'snapshots-compartment', 'states-compartment', 'rel-name', 'state-def-name-compartment', 'verify-requirement-node', 'action-def', 'transition-label', 'while-loop-action-node', 'exit-action-name-comp', 'parameters-compartment-contents', 'satisfier', 'accept-action-node', 'or indirect specialization of KerML metaclass SemanticMetadata.', 'type-relationship', 'state-ref', 'state-source', 'send-action-name-compartment', 'extended-def', 'flow-label', 'sequence-view', 'sq-graphical-node', 'exhibit-edge', 'a-subsetting', 'sq-head-node', 'interface-def', 'calcs-compartment-element', 'comment-with-keyword', 'part-ref', 'subject', 'while-loop-action-name-compartment', 'require-constraints-compartment', 'requirements-compartment', 'attribute-name-compartment', 'ends-compartment-contents', 'state-exit-action', 'sq-port-label', 'n-ary-dependency', 'connection-end', 'send-action-expression', 'compartment-stack', 'sq-succession', 'annotation-link', 'connection-usage-elaboration', 'interface', 'attributes-compartment-contents', 'concerns-compartment', 'succession-flow', 'flow-def', 'relationships-compartment-contents', 'n-ary-connection', 'send-action-node', 'subject-name', 'analyses-compartment', 'a-property', 'ends-compartment', 'n-ary-dependency-supplier-link', 'state-def', 'documentation-compartment', 'constraints-compartment', 'definition', 'general-compartment', 'calc', 'port-t', 'top-level-import', 'flows-compartment', 'port-label', 'stakeholders-compartment', 'individuals-compartment-contents', 'verification-def', 'timeslice', 'param-r', 'param-l', 'general-relationship |', 'connections-compartment-contents', 'event-occurrence-def-name-compartment', 'performer-node', 'allocations-compartment', 'a-direction', 'st-succession', 'satisfies-compartment', 'flows-compartment-contents', 'constraints-compartment-contents', 'enumeration-def-name-compartment', 'allocation-def-name-compartment', 'portion-relationship', 'interface-def-name-compartment', 'annotation-node', 'states-compartment-contents', 'assert-edge', 'element', 'message', 'requirement-ref', 'allocations-compartment-element', 'perform-actions-swimlanes', 'flow-name-compartment', 'calcs-compartment-contents', 'individuals-compartment', 'for-loop-action-name-compartment', 'satisfy-requirements-compartment-contents', 'analysis-name-compartment', 'terminate-node', 'occurrence-def', 'state-transition-element', 'annotated-element', 'while-condition', 'unowned-membership', 'item-def-name-compartment', 'subject-compartment-contents', 'package-node', 'parts-compartment', 'concern', 'sequence-compartment', 'ifelse-action-name-compartment', 'connections-compartment-element', 'occurrence-def-name-compartment', 'stakeholders-compartment-element', 'succession-label', 'interfaces-compartment-contents', 'parts-compartment-contents', 'state-transition-compartment', 'calc-def', 'concern-def', 'distinguished-parameter', 'satisfy-requirement-name-compartment', 'calcs-compartment', 'occurrences-compartment-contents', 'lifeline', 'concern-name-compartment', 'part', 'parts-compartment-element', 'cdot-label', 'enumeration', 'assert-constraints-compartment-element', 'timeslices-compartment-element', 'calc-def-name-compartment', 'start-node', 'subclassification', 'assume-constraint-name-compartment', 'recursive-import', 'requirement', 'n-ary-association-dot', 'assign-action-name-compartment', 'constraint', 'fork-node', 'state-do-action', 'verify-requirement-name-compartment', 'require-edge', 'accept-action-expression', 'event-occurrence-def', "'«' 'do' OccurrenceUsagePrefix 'action' '»'", 'actor-name', 'state-actions-compartment-contents', 'owned-membership', 'frame-relationship', 'pdh', 'state-subaction-body-textual', 'rolename', 'connections-compartment', 'exhibit-states-compartment-element-compartment', 'features-compartment-contents', 'action-body', 'exhibit-states-compartment-contents', 'for-loop-action-node', 'action', 'do-action', 'enums-compartment', 'sq-graphical-relationship', 'exhibitor', 'parameters-compartment', 'binding-connection', 'entry-action-name-comp', 'constraint-ref', 'assume-constraint-node', 'constraint-name-compartment', 'packages-compartment-element', 'type-node', 'interface-connection', 'do-action-name-comp', 'flow-node-r', 'imported-package-with-name-inside', 'reference-subsetting', 'multiplicity', 'packages-compartment-contents', 'requirer', 'param-b', 'package-compartment', 'variants-compartment', 'assert-constraint-node', 'features-compartment', 'requirements-compartment-contents', 'state-transition-node', 'state-actions-compartment', 'snapshot', 'directed-features-compartment', 'pdv', 'succession-flow-label', 'text-block', 'enums-compartment_contents', 'interfaces-compartment', 'iteration-expression', 'result-compartment-contents', 'subject-compartment', 'port-usage', 'accept-action-name-compartment', 'proxy-v', 'perform-actions-compartment-contents', 'join-node', 'interconnection-element', 'connection-name-compartment', 'concern-stakeholder-link', 'message-label', 'connection-label', 'objective-compartment-element', 'satisfies-compartment-contents', 'action-ref', 'attributes-compartment-element', 'item', 'subsetting', 'frames-compartment-element', 'state-actions-compartment-element', 'state', 'require-constraint-name-compartment', 'n-ary-segment', 'objective-compartment-contents', 'proxy-label', 'extended-usage', 'cdef-label', 'framer', 'sq-port', 'flow-node-l', 'relationship-name', 'imported-package-with-name-in-tab', 'composite-feature-membership', 'requirement-def', 'sq-proxy', 'ports-compartment-element', 'action-flow-view', 'message-node-l', 'require-constraint-element', 'UsageExtensionKeyword names a MetadataDefinition that is a direct', 'binary-dependency', 'variant-elementusages-compartment', 'trigger-expression', 'actors-compartment-contents', 'stakeholder-name', 'exhibit-states-compartment', 'port-b', 'item-name-compartment', 'documentation-node', 'items-compartment-element', 'usage-edge', 'perform-action-name-compartment', 'else-branch', 'event-occurrence-name-compartment', 'n-ary-dependency-client-or-supplier-link', 'el-prefix', 'flow', 'done-node', 'actors-compartment', 'actions-compartment-element', 'item-def'} +WARNING : Production start line does not contain exactly one '=': usage-node |= verify-requirement-node +ERROR : Parse error in tests\KerML_and_SysML_spec_sources\SysML-spec.html 8.2.3.24 in production: +usage-node |= verify-requirement-node + +Unexpected token Token('VBAR', '|') at line 1, column 12. +Expected one of: + * EQUAL + * "=|" +Previous tokens: [Token('GRAPHICAL_NAME', 'usage-node')] + +WARNING : Production start line does not contain exactly one '=': compartment =| +WARNING : Production start line does not contain exactly one '=': action-flow-element =| +WARNING : Production start line does not contain exactly one '=': general-relationship =| verify-relationship +WARNING : Production start line does not contain exactly one '=': subject-actors-stakeholders-node =| verification | verification-def +ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=+ERROR : Unexpected tag inside
element: tag=