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

Adding DataStatementConstant entity #214

Open
lsafina opened this issue Mar 13, 2024 · 4 comments
Open

Adding DataStatementConstant entity #214

lsafina opened this issue Mar 13, 2024 · 4 comments

Comments

@lsafina
Copy link
Contributor

lsafina commented Mar 13, 2024

Currently FASTFortranDataGroup is designed to have dataConstants as a list of FASTFortranTExpression which covers the case when a data constant is a constant or the symbolic name of a constant.

However, there exist a case when a data constant is presented in the format r*c equivalent to r successive occurrences of the constant c.

At the moment there is no expression able to cover this case.

I propose to create DataStatementConstant -> FASTFortranTExpression with properties occurence and constant both of the type FASTFortranIntegerLiteral

@lsafina
Copy link
Contributor Author

lsafina commented Mar 13, 2024

@NicolasAnquetil
Copy link
Contributor

I am not sure the constant need to be numerical
To be checked, but it may need to be a TExpression itself ...

Another solution I see is to have a TDataStatementConstant and a RepeatedDataConstant (with occurence and constant):
`st
DataGroup <>-* TDataConstant
RepeatedDataConstant --|> TDataConstant
(RepeatedDataConstant property: occurence) - NumericalLiteral
(RepeatedDataConstant property: constant) - TExpression
Literal --|> TDataConstant
ScalarVariable --|> TDataConstant

@NicolasAnquetil
Copy link
Contributor

inviting @uNouss to the discussion

@lsafina
Copy link
Contributor Author

lsafina commented Mar 25, 2024

DataGroup <>-* TDataConstant
RepeatedDataConstant --|> TDataConstant
(RepeatedDataConstant property: occurence) - TDataConstant
(RepeatedDataConstant property: constant) - TDataConstant
Literal --|> TDataConstant
ScalarVariable --|> TDataConstant

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

No branches or pull requests

2 participants