Skip to content

Commit e2f9941

Browse files
committed
Updated keyword highlighting.
1 parent 2361b01 commit e2f9941

9 files changed

Lines changed: 48 additions & 55 deletions

File tree

org.omg.sysml.jupyter.jupyterlab/src/main/mode.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,22 @@ export function defineSysMLv2Mode(): void {
3939
name: 'clike',
4040
keywords: [
4141
"about", "abstract", "accept", "action", "actor", "alias", "all", "allocate", "allocation", "analysis",
42-
"and", "as", "assert", "assoc", "assume", "attribute", "bind", "block", "by", "calc", "case", "comment",
42+
"and", "as", "assert", "assume", "attribute", "bind", "binding", "by", "calc", "case", "comment",
4343
"concern", "connect", "connection", "constraint", "decide", "def", "default", "defined", "dependency",
44-
"do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature", "filter",
45-
"first", "flow", "for", "fork", "frame", "from", "hastype", "id", "if", "implies", "import", "in",
44+
"derived", "do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature",
45+
"filter", "first", "flow", "for", "fork", "frame", "from", "hastype", "if", "implies", "import", "in",
4646
"include", "individual", "inout", "interface", "istype", "item", "join", "language", "merge", "message",
4747
"metadata", "nonunique", "not", "objective", "occurrence", "of", "or", "ordered", "out", "package",
48-
"parallel", "part", "perform", "port", "private", "protected", "public", "redefines", "ref", "render",
49-
"rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot", "specializes",
50-
"stakeholder", "state", "stream", "subject", "subsets", "succession", "then", "timeslice", "to",
48+
"parallel", "part", "perform", "port", "private", "protected", "public", "readonly", "redefines", "ref",
49+
"render", "rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot",
50+
"specializes", "stakeholder", "state", "subject", "subsets", "succession", "then", "timeslice", "to",
5151
"transition", "use", "variant", "variation", "verification", "verify", "via", "view", "viewpoint", "xor"
5252
].reduce(f_wordify, {}),
5353
defKeywords: [
54-
"action", "activity", "allocation", "analysis", "attribute", "block", "calc", "case", "comment",
55-
"concern", "connection", "constraint", "def", "doc", "enum", "id", "interface", "item", "link",
56-
"metadata", "objective", "occurrence", "package", "part", "port", "ref", "rendering", "rep",
57-
"requirement", "snapshot", "state", "subject", "timeslice", "transition", "type", "value",
58-
"verification", "view", "viewpoint"
54+
"action", "allocation", "analysis", "attribute", "binding", "calc", "case", "comment", "concern",
55+
"connection", "constraint", "def", "doc", "enum", "interface", "item", "metadata", "objective",
56+
"occurrence", "package", "part", "port", "ref", "rendering", "rep", "requirement", "snapshot", "state",
57+
"subject", "succession", "timeslice", "transition", "verification", "view", "viewpoint"
5958
].reduce(f_wordify, {}),
6059
typeFirstDefinitions: true,
6160
atoms: ['true', 'false', 'null'].reduce(f_wordify),

org.omg.sysml.jupyter.kernel/src/main/resources/kernel/kernel.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,22 @@ var enableMode = function (CodeMirror) {
5151
name: "clike",
5252
keywords: words([
5353
"about", "abstract", "accept", "action", "actor", "alias", "all", "allocate", "allocation", "analysis",
54-
"and", "as", "assert", "assoc", "assume", "attribute", "bind", "block", "by", "calc", "case", "comment",
54+
"and", "as", "assert", "assume", "attribute", "bind", "binding", "by", "calc", "case", "comment",
5555
"concern", "connect", "connection", "constraint", "decide", "def", "default", "defined", "dependency",
56-
"do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature", "filter",
57-
"first", "flow", "for", "fork", "frame", "from", "hastype", "id", "if", "implies", "import", "in",
56+
"derived", "do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature",
57+
"filter", "first", "flow", "for", "fork", "frame", "from", "hastype", "if", "implies", "import", "in",
5858
"include", "individual", "inout", "interface", "istype", "item", "join", "language", "merge", "message",
5959
"metadata", "nonunique", "not", "objective", "occurrence", "of", "or", "ordered", "out", "package",
60-
"parallel", "part", "perform", "port", "private", "protected", "public", "redefines", "ref", "render",
61-
"rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot", "specializes",
62-
"stakeholder", "state", "stream", "subject", "subsets", "succession", "then", "timeslice", "to",
60+
"parallel", "part", "perform", "port", "private", "protected", "public", "readonly", "redefines", "ref",
61+
"render", "rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot",
62+
"specializes", "stakeholder", "state", "subject", "subsets", "succession", "then", "timeslice", "to",
6363
"transition", "use", "variant", "variation", "verification", "verify", "via", "view", "viewpoint", "xor"
6464
]),
6565
defKeywords: words([
66-
"action", "activity", "allocation", "analysis", "attribute", "block", "calc", "case", "comment",
67-
"concern", "connection", "constraint", "def", "doc", "enum", "id", "interface", "item", "link",
68-
"metadata", "objective", "occurrence", "package", "part", "port", "ref", "rendering", "rep",
69-
"requirement", "snapshot", "state", "subject", "timeslice", "transition", "type", "value",
70-
"verification", "view", "viewpoint"
66+
"action", "allocation", "analysis", "attribute", "binding", "calc", "case", "comment", "concern",
67+
"connection", "constraint", "def", "doc", "enum", "interface", "item", "metadata", "objective",
68+
"occurrence", "package", "part", "port", "ref", "rendering", "rep", "requirement", "snapshot", "state",
69+
"subject", "succession", "timeslice", "transition", "verification", "view", "viewpoint"
7170
]),
7271
typeFirstDefinitions: true,
7372
atoms: words("true false null"),

tool-support/syntax-highlighting/jetbrains/KerML.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<option name="HAS_PARENS" value="true" />
1212
<option name="HAS_STRING_ESCAPES" value="true" />
1313
</options>
14-
<keywords keywords="about;abstract;alias;all;and;as;assoc;behavior;binding;bool;by;class;classifier;comment;composite;conjugate;conjugates;conjugation;connector;datatype;default;disjoining;disjoint;doc;element;else;end;expr;false;feature;featured;featuring;filter;first;flow;for;from;function;generalization;hastype;id;if;implies;import;in;inout;interaction;inv;is;istype;language;member;metadata;multiplicity;namespace;nonunique;not;null;of;or;ordered;out;package;portion;predicate;private;protected;public;redefines;redefinition;relationship;rep;specialization;specializes;step;stream;struct;subclassifier;subset;subsets;subtype;succession;then;to;true;type;typed;typing;xor" ignore_case="false" />
14+
<keywords keywords="about;abstract;alias;all;and;as;assoc;behavior;binding;bool;by;class;classifier;comment;composite;conjugate;conjugates;conjugation;connector;datatype;default;derived;disjoining;disjoint;doc;element;else;end;expr;false;feature;featured;featuring;filter;first;flow;for;from;function;hastype;if;implies;import;in;inout;interaction;inv;is;istype;language;member;metadata;multiplicity;namespace;nonunique;not;null;of;or;ordered;out;package;portion;predicate;private;protected;public;readonly;redefines;redefinition;relationship;rep;specialization;specializes;step;struct;subclassifier;subset;subsets;subtype;succession;then;to;true;type;typed;typing;xor" ignore_case="false" />
1515
<keywords2 keywords="!;!=;%;&amp;;&amp;&amp;;*;**;+;-;-&gt;;..;/;:;::;:&gt;;:&gt;&gt;;&lt;;&lt;=;=;==;=&gt;;&gt;;&gt;=;?;??;@;^;^^;|;||;~" />
1616
</highlighting>
1717
<extensionMap>

tool-support/syntax-highlighting/jetbrains/SysML.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<option name="HAS_PARENS" value="true" />
1212
<option name="HAS_STRING_ESCAPES" value="true" />
1313
</options>
14-
<keywords keywords="about;abstract;accept;action;actor;alias;all;allocate;allocation;analysis;and;as;assert;assoc;assume;attribute;bind;block;by;calc;case;comment;concern;connect;connection;constraint;decide;def;default;defined;dependency;do;doc;else;end;entry;enum;event;exhibit;exit;expose;false;feature;filter;first;flow;for;fork;frame;from;hastype;id;if;implies;import;in;include;individual;inout;interface;istype;item;join;language;merge;message;metadata;nonunique;not;null;objective;occurrence;of;or;ordered;out;package;parallel;part;perform;port;private;protected;public;redefines;ref;render;rendering;rep;require;requirement;return;satisfy;send;snapshot;specializes;stakeholder;state;stream;subject;subsets;succession;then;timeslice;to;transition;true;use;variant;variation;verification;verify;via;view;viewpoint;xor" ignore_case="false" />
14+
<keywords keywords="about;abstract;accept;action;actor;alias;all;allocate;allocation;analysis;and;as;assert;assume;attribute;bind;binding;by;calc;case;comment;concern;connect;connection;constraint;decide;def;default;defined;dependency;derived;do;doc;else;end;entry;enum;event;exhibit;exit;expose;false;feature;filter;first;flow;for;fork;frame;from;hastype;if;implies;import;in;include;individual;inout;interface;istype;item;join;language;merge;message;metadata;nonunique;not;null;objective;occurrence;of;or;ordered;out;package;parallel;part;perform;port;private;protected;public;readonly;redefines;ref;render;rendering;rep;require;requirement;return;satisfy;send;snapshot;specializes;stakeholder;state;subject;subsets;succession;then;timeslice;to;transition;true;use;variant;variation;verification;verify;via;view;viewpoint;xor" ignore_case="false" />
1515
<keywords2 keywords="!;!=;%;&amp;;&amp;&amp;;*;**;+;-;-&gt;;..;/;:;::;:&gt;;:&gt;&gt;;&lt;;&lt;=;=;==;=&gt;;&gt;;&gt;=;?;??;@;^;^^;|;||;~" />
1616
</highlighting>
1717
<extensionMap>

tool-support/syntax-highlighting/jupyter/additional_def_keywords.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
# Used by xtext_grammar_converter.py to generate Jupyter mode.ts source
33
# Format: one line per keyword, and comment lines start with # or //
44
# Keywords included for backwards compatibility
5-
activity
6-
block
7-
link
8-
type
9-
value
5+
#
106
# Keywords without corresponding definition declarations
117
metadata
128
objective
139
ref
1410
snapshot
1511
subject
1612
timeslice
13+
binding
14+
succession
1715
transition
16+
#
1817
# Keywords that do not fall into the definition/usage pattern
1918
comment
2019
doc
2120
package
2221
rep
23-
# Keyword to specify a 'human ID'
24-
id

tool-support/syntax-highlighting/jupyter/kernel.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,22 @@ var enableMode = function (CodeMirror) {
5151
name: "clike",
5252
keywords: words([
5353
"about", "abstract", "accept", "action", "actor", "alias", "all", "allocate", "allocation", "analysis",
54-
"and", "as", "assert", "assoc", "assume", "attribute", "bind", "block", "by", "calc", "case", "comment",
54+
"and", "as", "assert", "assume", "attribute", "bind", "binding", "by", "calc", "case", "comment",
5555
"concern", "connect", "connection", "constraint", "decide", "def", "default", "defined", "dependency",
56-
"do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature", "filter",
57-
"first", "flow", "for", "fork", "frame", "from", "hastype", "id", "if", "implies", "import", "in",
56+
"derived", "do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature",
57+
"filter", "first", "flow", "for", "fork", "frame", "from", "hastype", "if", "implies", "import", "in",
5858
"include", "individual", "inout", "interface", "istype", "item", "join", "language", "merge", "message",
5959
"metadata", "nonunique", "not", "objective", "occurrence", "of", "or", "ordered", "out", "package",
60-
"parallel", "part", "perform", "port", "private", "protected", "public", "redefines", "ref", "render",
61-
"rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot", "specializes",
62-
"stakeholder", "state", "stream", "subject", "subsets", "succession", "then", "timeslice", "to",
60+
"parallel", "part", "perform", "port", "private", "protected", "public", "readonly", "redefines", "ref",
61+
"render", "rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot",
62+
"specializes", "stakeholder", "state", "subject", "subsets", "succession", "then", "timeslice", "to",
6363
"transition", "use", "variant", "variation", "verification", "verify", "via", "view", "viewpoint", "xor"
6464
]),
6565
defKeywords: words([
66-
"action", "activity", "allocation", "analysis", "attribute", "block", "calc", "case", "comment",
67-
"concern", "connection", "constraint", "def", "doc", "enum", "id", "interface", "item", "link",
68-
"metadata", "objective", "occurrence", "package", "part", "port", "ref", "rendering", "rep",
69-
"requirement", "snapshot", "state", "subject", "timeslice", "transition", "type", "use", "value",
70-
"verification", "view", "viewpoint"
66+
"action", "allocation", "analysis", "attribute", "binding", "calc", "case", "comment", "concern",
67+
"connection", "constraint", "def", "doc", "enum", "interface", "item", "metadata", "objective",
68+
"occurrence", "package", "part", "port", "ref", "rendering", "rep", "requirement", "snapshot", "state",
69+
"subject", "succession", "timeslice", "transition", "verification", "view", "viewpoint"
7170
]),
7271
typeFirstDefinitions: true,
7372
atoms: words("true false null"),

tool-support/syntax-highlighting/jupyter/mode.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,22 @@ export function defineSysMLv2Mode(): void {
3939
name: 'clike',
4040
keywords: [
4141
"about", "abstract", "accept", "action", "actor", "alias", "all", "allocate", "allocation", "analysis",
42-
"and", "as", "assert", "assoc", "assume", "attribute", "bind", "block", "by", "calc", "case", "comment",
42+
"and", "as", "assert", "assume", "attribute", "bind", "binding", "by", "calc", "case", "comment",
4343
"concern", "connect", "connection", "constraint", "decide", "def", "default", "defined", "dependency",
44-
"do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature", "filter",
45-
"first", "flow", "for", "fork", "frame", "from", "hastype", "id", "if", "implies", "import", "in",
44+
"derived", "do", "doc", "else", "end", "entry", "enum", "event", "exhibit", "exit", "expose", "feature",
45+
"filter", "first", "flow", "for", "fork", "frame", "from", "hastype", "if", "implies", "import", "in",
4646
"include", "individual", "inout", "interface", "istype", "item", "join", "language", "merge", "message",
4747
"metadata", "nonunique", "not", "objective", "occurrence", "of", "or", "ordered", "out", "package",
48-
"parallel", "part", "perform", "port", "private", "protected", "public", "redefines", "ref", "render",
49-
"rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot", "specializes",
50-
"stakeholder", "state", "stream", "subject", "subsets", "succession", "then", "timeslice", "to",
48+
"parallel", "part", "perform", "port", "private", "protected", "public", "readonly", "redefines", "ref",
49+
"render", "rendering", "rep", "require", "requirement", "return", "satisfy", "send", "snapshot",
50+
"specializes", "stakeholder", "state", "subject", "subsets", "succession", "then", "timeslice", "to",
5151
"transition", "use", "variant", "variation", "verification", "verify", "via", "view", "viewpoint", "xor"
5252
].reduce(f_wordify, {}),
5353
defKeywords: [
54-
"action", "activity", "allocation", "analysis", "attribute", "block", "calc", "case", "comment",
55-
"concern", "connection", "constraint", "def", "doc", "enum", "id", "interface", "item", "link",
56-
"metadata", "objective", "occurrence", "package", "part", "port", "ref", "rendering", "rep",
57-
"requirement", "snapshot", "state", "subject", "timeslice", "transition", "type", "use", "value",
58-
"verification", "view", "viewpoint"
54+
"action", "allocation", "analysis", "attribute", "binding", "calc", "case", "comment", "concern",
55+
"connection", "constraint", "def", "doc", "enum", "interface", "item", "metadata", "objective",
56+
"occurrence", "package", "part", "port", "ref", "rendering", "rep", "requirement", "snapshot", "state",
57+
"subject", "succession", "timeslice", "transition", "verification", "view", "viewpoint"
5958
].reduce(f_wordify, {}),
6059
typeFirstDefinitions: true,
6160
atoms: ['true', 'false', 'null'].reduce(f_wordify),

tool-support/syntax-highlighting/vscode/kerml/syntaxes/kerml.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"repository": {
1919
"keywords": {
2020
"patterns": [
21-
{ "match": "\\b(about|abstract|alias|all|and|as|assoc|behavior|binding|bool|by|class|classifier|comment|composite|conjugate|conjugates|conjugation|connector|datatype|default|disjoining|disjoint|doc|element|else|end|expr|false|feature|featured|featuring|filter|first|flow|for|from|function|generalization|hastype|id|if|implies|import|in|inout|interaction|inv|is|istype|language|member|metadata|multiplicity|namespace|nonunique|not|null|of|or|ordered|out|package|portion|predicate|private|protected|public|redefines|redefinition|relationship|rep|specialization|specializes|step|stream|struct|subclassifier|subset|subsets|subtype|succession|then|to|true|type|typed|typing|xor)\\b", "name": "keyword.other.kerml" },
21+
{ "match": "\\b(about|abstract|alias|all|and|as|assoc|behavior|binding|bool|by|class|classifier|comment|composite|conjugate|conjugates|conjugation|connector|datatype|default|derived|disjoining|disjoint|doc|element|else|end|expr|false|feature|featured|featuring|filter|first|flow|for|from|function|hastype|if|implies|import|in|inout|interaction|inv|is|istype|language|member|metadata|multiplicity|namespace|nonunique|not|null|of|or|ordered|out|package|portion|predicate|private|protected|public|readonly|redefines|redefinition|relationship|rep|specialization|specializes|step|struct|subclassifier|subset|subsets|subtype|succession|then|to|true|type|typed|typing|xor)\\b", "name": "keyword.other.kerml" },
2222
{ "match": "(%|&|&&|\\?|\\?\\?|\\^|\\^\\^|\\||\\|\\|)", "name": "keyword.operator.logical.kerml" },
2323
{ "match": "(!|!=|\\<|\\<=|=|==|\\>|\\>=)", "name": "keyword.operator.comparison.kerml" },
2424
{ "match": "(\\*|\\*\\*|\\+|\\-|/)", "name": "keyword.operator.arithmetic.kerml" },

0 commit comments

Comments
 (0)