Skip to content

Conversation

@HansOlsson
Copy link
Collaborator

During the conference we got feedback that the grammar is ambiguous.

I understand that the problem is due to trying to make the grammar more logical - but:

  • We should be consistent; so that equations and statements are treated in a similar way.
  • We might as well explain it - people familiar with parsers should just be able to read the grammar.

@HansOlsson HansOlsson requested a review from henrikt-ma October 7, 2025 07:52
@HansOlsson
Copy link
Collaborator Author

We could also add:
Similarly if output-expression-list is not merely an expression it is only allowed in statement as explicitly given and in equation-or-procedure matching "(" output-expression-list ")" = component-reference function-call-args

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not against rewriting the production rules per se, but I'd like to hear exactly which ambiguity that was reported during the conference?

@HansOlsson
Copy link
Collaborator Author

I am not against rewriting the production rules per se, but I'd like to hear exactly which ambiguity that was reported during the conference?

Added above.

Co-authored-by: Henrik Tidefelt <[email protected]>
@henrikt-ma
Copy link
Collaborator

Let's settle what to do with the example at the next phone meeting!

@HansOlsson HansOlsson added this to the 2025-November milestone Nov 5, 2025
@HansOlsson
Copy link
Collaborator Author

Language group: Shorten by removing production rules.

@HansOlsson
Copy link
Collaborator Author

Language group: Shorten by removing production rules.

Now done.

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only suggesting to omit the See below. The rest is looking good.

Co-authored-by: Henrik Tidefelt <[email protected]>
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed one more thing.

Co-authored-by: Henrik Tidefelt <[email protected]>
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, then it was the indentation…

HansOlsson and others added 2 commits November 11, 2025 16:44
Co-authored-by: Henrik Tidefelt <[email protected]>
Co-authored-by: Henrik Tidefelt <[email protected]>
Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@HansOlsson HansOlsson merged commit 333d9ee into modelica:master Nov 12, 2025
1 check passed
@HansOlsson HansOlsson deleted the ClarifySyntax branch November 12, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants