Open antoine-morvan opened 1 year ago
In general there is a problem in distinguishing between arrays and functions in Fortran unless you are able to fully link the program and in general we are only parsing part of a full program. What fparser2 currently does is match with the first thing it can which I guess is an assignment here. I think in your particular case we could determine that it is a function as we could add mytestfunc to the symbol table. However, we don't do that at the moment.
Hi,
In the AST, I did not find a way to differenciate function calls and array references.
My sample program is the following:
and my script is the following:
The debug print for the 2 assignments to
myvar
is the following:We can observe that woth assignements RHS are a
Part_Ref / Name / Subscript / Const
.Is there any way to differenciate the two cases ?
Best.