-
Notifications
You must be signed in to change notification settings - Fork 44
Add restriction for time. #3790
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -361,6 +361,7 @@ \subsection{Built-in Variable time}\label{built-in-variable-time}\indexinline{ti | |
|
|
||
| All declared variables are functions of the independent variable \lstinline!time!. | ||
| The variable \lstinline!time! is a built-in variable available in all models and blocks, which is treated as an input variable. | ||
| The name \lstinline!time! is reserved and may not declared in any class. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought the plan in #1243 (comment) was to make it a keyword? That still sounds like the clean way to do it; just add it to
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that would be the alternative. I see two minor issues:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| It is implicitly defined as: | ||
| \begin{lstlisting}[language=modelica] | ||
| input Real time (final quantity = "Time", | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not the same "need" to treat
timesimilar toReal, as there is only one trivial change needed in the grammar fortime, whereas the builtin types would require a bit more. Hence, I think we should dotimeproperly instead of expanding the non-keyword mess.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, as far as I can see it was not entirely trivial - and since tool grammars are unlikely to exactly match the grammar in the specification there's a risk that something was missed.