Skip to content
Snippets Groups Projects
Commit e146003d authored by Sophie Coudert's avatar Sophie Coudert
Browse files

little improvment of error detection

parent 014135e8
No related branches found
No related tags found
4 merge requests!504merge first stable version of Avatar-SysML V2,!503merge the first stable version of the Avatar-SysML parser/generator,!501Avatar sys ml 04 2024,!498Avatar sys ml 04 2024 (first merge request, only for verification)
......@@ -477,6 +477,9 @@ syncChDecl ::= PART:p IDENT:id COLON SYNC_T EQUAL SYNC_T LPAR RELATION_F EQUAL I
addError( new AvatarFromSysMLError(AvatarFromSysMLError.LOWERROR, pxleft, "Channel " + id.getAvatarName() +
" is already declared", theChannel.getLeft()) );
} else {
if (theRelation.getAsynchronous())
addError(new AvatarFromSysMLError(AvatarFromSysMLError.HIGHWARNING,
pxleft, "synchroneous channels require a synchroneous relation\n"));
theRelation.addChannel(theChannel);
theChannel.setLeft(pxleft);
theChannel.setRight(sxright);
......@@ -489,6 +492,9 @@ nbfChDecl ::= PART:p IDENT:id COLON NBFIFO_T EQUAL NBFIFO_T LPAR RELATION_F EQUA
addError( new AvatarFromSysMLError(AvatarFromSysMLError.LOWERROR, pxleft, "Channel " + id.getAvatarName() +
" is already declared", theChannel.getLeft()) );
} else {
if (! theRelation.getAsynchronous())
addError(new AvatarFromSysMLError(AvatarFromSysMLError.HIGHWARNING,
pxleft, "FIFO channels require an asynchroneous relation\n"));
theRelation.addChannel(theChannel);
theChannel.setLeft(pxleft);
theChannel.setRight(sxright);
......@@ -501,6 +507,9 @@ bfChDecl ::= PART:p IDENT:id COLON BFIFO_T EQUAL BFIFO_T LPAR RELATION_F EQUAL I
addError( new AvatarFromSysMLError(AvatarFromSysMLError.LOWERROR, pxleft, "Channel " + id.getAvatarName() +
" is already declared", theChannel.getLeft()) );
} else {
if (! theRelation.getAsynchronous())
addError(new AvatarFromSysMLError(AvatarFromSysMLError.HIGHWARNING,
pxleft, "FIFO channels require an asynchroneous relation\n"));
theRelation.addChannel(theChannel);
theChannel.setLeft(pxleft);
theChannel.setRight(sxright);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment