Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
06d13704
Commit
06d13704
authored
10 years ago
by
Andrea Enrici
Browse files
Options
Downloads
Patches
Plain Diff
starting to correct mismatches
parent
07b69c73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/compiler/tmlCPparser/CPparserDEF.jjt
+15
-8
15 additions, 8 deletions
src/compiler/tmlCPparser/CPparserDEF.jjt
with
15 additions
and
8 deletions
src/compiler/tmlCPparser/CPparserDEF.jjt
+
15
−
8
View file @
06d13704
...
...
@@ -495,7 +495,7 @@ void ActivityDiagram( TMLCP mainCP ):
parseJunctionChoice( mainCP ) )+
{
currentElement = new TMLCPStop( "stop" + counter, null );
previousElement.addNextElement( currentElement );
//
previousElement.addNextElement( currentElement );
//commented in order to remove the last element to have two next Elements
globalAD.addElement( currentElement );
mainCP.addCPActivityDiagram( globalAD );
}
...
...
@@ -508,7 +508,7 @@ void parseReferenceToDiagram( TMLCP mainCP ):
boolean isSD = false;
}
{
name = ID()
//( ( name = ID() ) | "><" ) )*
name = ID()
{
for( TMLCPSequenceDiagram sd: mainCP.getCPSequenceDiagrams() ) {
if( sd.getName().equals( name ) ) {
...
...
@@ -520,7 +520,6 @@ void parseReferenceToDiagram( TMLCP mainCP ):
}
else {
currentElement = new TMLCPRefAD( name, null );
//nexts.add( elem );
}
}
}
...
...
@@ -531,7 +530,6 @@ void parseForkJoin( TMLCP mainCP ):
{
String name;
boolean isSD = false;
//TMLCPFork fork = new TMLCPFork( "fork" + counter , null );
fork1 = new TMLCPFork( "fork1" + counter , null );
join1 = new TMLCPJoin( "join1" + counter , null );
counter++;
...
...
@@ -578,7 +576,7 @@ void parseJunctionChoice( TMLCP mainCP ):
String s, s1;
ArrayList<String> guardList = new ArrayList<String>();
TMLCPChoice choice;
TMLCPElement lastElementBeforeChoice;
TMLCPElement lastElementBeforeChoice
, start
;
}
{
<LOOP_KW> s = ID() s1 = ID() ":" // the second ID parses what follows the first underscore
...
...
@@ -586,6 +584,7 @@ void parseJunctionChoice( TMLCP mainCP ):
mainCP.addCPActivityDiagram( globalAD );
globalAD = new TMLCPActivityDiagram( s + s1, null );
currentElement = new TMLCPStart( s + s1, null );
start = currentElement;
globalAD.addElement( currentElement );
previousElement = currentElement;
}
...
...
@@ -626,7 +625,7 @@ void parseJunctionChoice( TMLCP mainCP ):
previousElement = currentElement;
}
} )+ //continues the sequence of diagrams
"-" <GOTO> ( "END" ID() ID()
//when there is a GOTO END it means there is a stop state: end of the branch!
"-" <GOTO> ( "END" ID() ID()
//when there is a GOTO END it means there is a stop state: end of the branch!
{
currentElement = new TMLCPStop( "stop" + stopCounter, null );
previousElement.addNextElement( currentElement );
...
...
@@ -635,11 +634,19 @@ void parseJunctionChoice( TMLCP mainCP ):
previousElement = currentElement;
currentElement = choice; // end of a branch, the previous element is reset to the choice node
}
| ID() ID() )
| ID() ID()
{
currentElement.addNextElement( start );
/*TraceManager.addDev( " 1 Current Element: " + currentElement.toString() );
TraceManager.addDev( " 1 Previous Element: " + previousElement.toString() );*/
}
)
)+
"END" ID() ID()
{
globalAD.addElement( choice );
/*TraceManager.addDev( "Current Element: " + currentElement.toString() );
TraceManager.addDev( "Previous Element: " + previousElement.toString() );*/
previousElement = currentElement;
lastElementBeforeChoice.setNextElement( choice );
}
...
...
@@ -648,7 +655,7 @@ void parseJunctionChoice( TMLCP mainCP ):
void specialID():
{}
{
ID() <UNDERSCORE>
ID() <UNDERSCORE>
}
String guard():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment