Conversation
Contributor
|
Thank you, Adina. I fixed some minor issues with the PR.
By the way, some of those examples were also using other forms of syntax that we have since changed. We should strive to always keep them up-to-date, possibly by creating an automated test suite. I'll file a new issue about this. |
This was referenced Dec 11, 2024
Contributor
|
By the way, those are not variables.
Therefore I am a bit skeptical of the new syntax but if you have discussed it in the last meeting I can roll with it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Writing
enum channel {c, g1, g2,vmm1,vmm2, vmm3}creates a new type calledchannelwhich is anenum. However, we already have a predefined type calledchannel. This causes a name collision.There are two alternatives, which can help us to avoid the name collision:
channeland define channel as an enumeration type as inenum channel {c, g1, g2,vmm1,vmm2, vmm3}channeland declare several variables of typechannel, which will be used throughout an ReCiPe model to allow the agents to communicate with each other. This is done like this:channel c, g1, g2, vmm1, vmm2, vmm3Since channels are important elements in an ReCiPe model, it makes sense to have a predefined type called
channel. Therefore, I chose to implement the second alternative in the grammar.