Skip to content

Commit 2a6d146

Browse files
authored
Merge pull request #635 from Systems-Modeling/ST6RI-830
ST6RI-830 Global scope notation (KERML_-101)
2 parents 2c9307b + 8d6e13e commit 2a6d146

44 files changed

Lines changed: 56143 additions & 41508 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package Scoping {
2+
package P1 {
3+
class A {
4+
feature f;
5+
}
6+
package P2 {
7+
class A {
8+
feature g;
9+
}
10+
package P3 {
11+
class B :> A {
12+
feature :>> g;
13+
}
14+
}
15+
}
16+
package Objects {
17+
class Object {
18+
feature test1;
19+
}
20+
}
21+
package '$' {
22+
class Objects {
23+
class Object {
24+
feature test2;
25+
}
26+
}
27+
}
28+
package P4 {
29+
class C :> Objects::Object {
30+
feature :>> test1;
31+
}
32+
class D :> '$'::Objects::Object {
33+
feature :>> test2;
34+
}
35+
class E :> $::Objects::Object {
36+
feature :>> subobjects;
37+
}
38+
}
39+
}
40+
}
Binary file not shown.

org.omg.kerml.expressions.xtext/src-gen/org/omg/kerml/expressions/xtext/parser/antlr/internal/InternalKerMLExpressions.g

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4877,6 +4877,35 @@ ruleName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
48774877
)
48784878
;
48794879

4880+
// Entry rule entryRuleGlobalQualification
4881+
entryRuleGlobalQualification returns [String current=null]:
4882+
{ newCompositeNode(grammarAccess.getGlobalQualificationRule()); }
4883+
iv_ruleGlobalQualification=ruleGlobalQualification
4884+
{ $current=$iv_ruleGlobalQualification.current.getText(); }
4885+
EOF;
4886+
4887+
// Rule GlobalQualification
4888+
ruleGlobalQualification returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
4889+
@init {
4890+
enterRule();
4891+
}
4892+
@after {
4893+
leaveRule();
4894+
}:
4895+
(
4896+
kw='$'
4897+
{
4898+
$current.merge(kw);
4899+
newLeafNode(kw, grammarAccess.getGlobalQualificationAccess().getDollarSignKeyword_0());
4900+
}
4901+
kw='::'
4902+
{
4903+
$current.merge(kw);
4904+
newLeafNode(kw, grammarAccess.getGlobalQualificationAccess().getColonColonKeyword_1());
4905+
}
4906+
)
4907+
;
4908+
48804909
// Entry rule entryRuleQualification
48814910
entryRuleQualification returns [String current=null]:
48824911
{ newCompositeNode(grammarAccess.getQualificationRule()); }
@@ -4929,22 +4958,34 @@ ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleT
49294958
(
49304959
(
49314960
{
4932-
newCompositeNode(grammarAccess.getQualifiedNameAccess().getQualificationParserRuleCall_0());
4961+
newCompositeNode(grammarAccess.getQualifiedNameAccess().getGlobalQualificationParserRuleCall_0());
4962+
}
4963+
this_GlobalQualification_0=ruleGlobalQualification
4964+
{
4965+
$current.merge(this_GlobalQualification_0);
4966+
}
4967+
{
4968+
afterParserOrEnumRuleCall();
4969+
}
4970+
)?
4971+
(
4972+
{
4973+
newCompositeNode(grammarAccess.getQualifiedNameAccess().getQualificationParserRuleCall_1());
49334974
}
4934-
this_Qualification_0=ruleQualification
4975+
this_Qualification_1=ruleQualification
49354976
{
4936-
$current.merge(this_Qualification_0);
4977+
$current.merge(this_Qualification_1);
49374978
}
49384979
{
49394980
afterParserOrEnumRuleCall();
49404981
}
49414982
)?
49424983
{
4943-
newCompositeNode(grammarAccess.getQualifiedNameAccess().getNameParserRuleCall_1());
4984+
newCompositeNode(grammarAccess.getQualifiedNameAccess().getNameParserRuleCall_2());
49444985
}
4945-
this_Name_1=ruleName
4986+
this_Name_2=ruleName
49464987
{
4947-
$current.merge(this_Name_1);
4988+
$current.merge(this_Name_2);
49484989
}
49494990
{
49504991
afterParserOrEnumRuleCall();

org.omg.kerml.expressions.xtext/src-gen/org/omg/kerml/expressions/xtext/parser/antlr/internal/InternalKerMLExpressions.tokens

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'!='=24
22
'!=='=26
33
'#'=49
4+
'$'=66
45
'%'=42
56
'&'=21
67
'('=50
@@ -15,7 +16,7 @@
1516
'..'=37
1617
'.?'=55
1718
'/'=41
18-
'::'=66
19+
'::'=67
1920
';'=57
2021
'<'=33
2122
'<='=35
@@ -115,3 +116,4 @@ T__63=63
115116
T__64=64
116117
T__65=65
117118
T__66=66
119+
T__67=67

0 commit comments

Comments
 (0)