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
73be2f2d
Commit
73be2f2d
authored
10 years ago
by
Andrea Enrici
Browse files
Options
Downloads
Patches
Plain Diff
corrected a bug in parsing the fork-join
parent
c67be792
No related branches found
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
-4
15 additions, 4 deletions
src/compiler/tmlCPparser/CPparserDEF.jjt
with
15 additions
and
4 deletions
src/compiler/tmlCPparser/CPparserDEF.jjt
+
15
−
4
View file @
73be2f2d
...
...
@@ -524,8 +524,6 @@ void parseReferenceToDiagram( TMLCP mainCP ):
}
}
//Modify the data structure of the activity diagram as TMLCPElement is an abstract class, so it is not possible to instantiate an
//ArrayList<TMLCPElement> to be returned after parsing the fork-join
void parseForkJoin( TMLCP mainCP ):
{
String name;
...
...
@@ -541,6 +539,7 @@ void parseForkJoin( TMLCP mainCP ):
fork1.addNextElement( currentElement ); //the next element of Fork is only the first element of the sequence
globalAD.addElement( currentElement );
previousElement = currentElement;
TraceManager.addDev( "Je me plante apres" );
}
// from now on is like parsing a normal sequence, in the sense that I ignore the fact of being inside a fork-join
(
...
...
@@ -555,15 +554,27 @@ void parseForkJoin( TMLCP mainCP ):
)*
"}" // end of the first branch
{ previousElement.addNextElement( join1 ); }
// then one or more branches
( "*" "{" parseReferenceToDiagram( mainCP )
{
fork1.addNextElement( currentElement );
globalAD.addElement( currentElement );
previousElement = currentElement;
}
"}"
// from now on is like parsing a normal sequence, in the sense that I ignore the fact of being inside a fork-join
(
<SEQUENCING_OP> parseReferenceToDiagram( mainCP )
{
if( currentElement != null ) {
previousElement.addNextElement( currentElement );
globalAD.addElement( currentElement );
previousElement = currentElement;
}
}
)*
"}" // end of a branch
{ previousElement.addNextElement( join1 ); }
)+ "};"
)+ "};"
// end of a whole fork-join
{
globalAD.addElement( fork1 );
globalAD.addElement( join1 );
...
...
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