Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that component references work in this form. #3592

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

HansOlsson
Copy link
Collaborator

It is a clarification, since it already states that they are component-references and the quoted part includes it.

See modelica/ModelicaStandardLibrary#4494

It is a clarification, since it already states that they are component-references and the quoted part includes it.

See modelica/ModelicaStandardLibrary#4494
HansOlsson added a commit to HansOlsson/ModelicaSpecification that referenced this pull request Oct 28, 2024
…r in the source.

I believe this is as clear and it preserves the two important parts of the previous change: embedded space (required quoted identifier) and embedded } (more complicated quoting).
It does not include a hierarchical name as that it is now explained separately.
Should thus be merged after modelica#3592
Not needed, but I think it avoids issue.
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.

To me it would make more sense to fix this by extending

When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) are involved, the form \%\{\emph{par}\} must be used.

into

When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) or non-identifier component references (e.g., \lstinline!a.p! for the parameter \lstinline!p! in the component \lstinline!a!) are involved, the form \%\{\emph{par}\} must be used.

A better term for non-identifier component references would be great, though.

@eshmoylova
Copy link
Member

To me it would make more sense to fix this by extending

When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) are involved, the form \%\{\emph{par}\} must be used.

into

When quoted identifiers (e.g., \lstinline!rec.'}'.'quoted ident'!) or non-identifier component references (e.g., \lstinline!a.p! for the parameter \lstinline!p! in the component \lstinline!a!) are involved, the form \%\{\emph{par}\} must be used.

A better term for non-identifier component references would be great, though.

I agree with this suggestion. Otherwise it is not clear how '%a.p' is supposed to be interpreted. Are non-identifier component references the same as composite names?

@HansOlsson
Copy link
Collaborator Author

I have now tried to rewrite it based on the suggestions. After some attempts I realized that it would only make sense if the dot-part was separated so that we can first explain what it does, and then the special part about dots.

Note that it is a bit redundant that the quoted identifier is also a composite name (and I find the specific quoted identifier hard to read), but there's #3593 for cleaning up that.

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 a285934 into modelica:master Nov 6, 2024
1 check passed
@HansOlsson HansOlsson deleted the ClarifyCompText branch November 6, 2024 10:13
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.

4 participants