/* (c) https://github.com/MontiCore/monticore */ package de.monticore; /* This is a MontiCore stable grammar. * Adaptations -- if any -- are conservative. */ /** * This grammar defines completeness information in UML * like "...", "(c)", but also "(...,c)" * */ component grammar Completeness { /** ASTCompleteness represents the completeness in several kinds of diagrams of the UML/P; Syntax: (left-completeness, right-completeness) For example: CD: Diagramm: left: Types, right: Assoziations Types: left: Attributes, right: Methods @attribute incomplete true if left and right side are incomplete (...) @attribute complete true if left and right side are complete (c) @attribute rightComplete true if only right side is complete (...,c) @attribute leftComplete true if only left is complete (c,...) */ Completeness = // separate brackets to avoid lexer-symbol clashes {noSpace(2,3)}? "(" [complete:"c"] ")" // "(c)" | {noSpace(2,3)}? "(" [incomplete:"..."] ")" // "(...)" | [incomplete:"(...,...)"] | {noSpace(2,3,4,5)}? "(" [complete:"c"] "," "c" ")" // "(c,c)" | [rightComplete:"(...,c)"] | [leftComplete:"(c,...)"]; // to allow use of "c" e.g. as variable: nokeyword "c"; }