Closed grnydawn closed 5 years ago
This problem should be fixed when PRs #152 and #154 are on master. I tested this out on a branch and it works ...
xed67771@arcgdel01:~/proj/fparser/src/fparser$ git checkout -b tmp_issue_145 forall_stmt_bug
Switched to a new branch 'tmp_issue_145'
xed67771@arcgdel01:~/proj/fparser/src/fparser$ git merge forall_construct_stmt_bug
Auto-merging src/fparser/two/Fortran2003.py
Merge made by the 'recursive' strategy.
src/fparser/two/Fortran2003.py | 77 +++++++++++++++++------
src/fparser/two/tests/fortran2003/test_executable_construct_r213.py | 3 -
src/fparser/two/tests/fortran2003/test_forall_header_r754.py | 118 ++++++++++++++++++++++++++++++++++++
src/fparser/two/tests/test_fortran2003.py | 12 ----
4 files changed, 177 insertions(+), 33 deletions(-)
create mode 100644 src/fparser/two/tests/fortran2003/test_forall_header_r754.py
xed67771@arcgdel01:~/proj/fparser/src/fparser$ cat tmp.f90
program test
forall (up = 1:upn-1) flwafact(up,ew,ns) = 0.5d0 * (sum(flwa(up:up+1,ew,ns)) / 2.d0)**p1
!forall (up = 1:upn,i=1:2) flwafact(up,ew,ns) = 0.5d0
!forall (i=1:2,j=1:2) a(i,j) = i+j
end program test
xed67771@arcgdel01:~/proj/fparser/src/fparser$ scripts/fparser2.py tmp.f90
PROGRAM test
FORALL (up = 1 : upn - 1) flwafact(up, ew, ns) = 0.5D0 * (sum(flwa(up : up + 1, ew, ns)) / 2.D0) ** p1
END PROGRAM test
xed67771@arcgdel01:~/proj/fparser/src/fparser$
Following line failed with FortranSyntaxError exception.
forall (up = 1:upn-1) flwafact(up,ew,ns) = 0.5d0 * (sum(flwa(up:up+1,ew,ns)) / 2.d0)**p1