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

Failed to parse this statement: write(6,'(10(e12.5,a))') ((array(i),' '), i=1,nb) #281

Open
uNouss opened this issue Jan 23, 2024 · 0 comments

Comments

@uNouss
Copy link

uNouss commented Jan 23, 2024

I have provided this code as an example.

      program main
      implicit none
      
      integer i
      integer nb
      parameter(nb=3)
      real array(nb)

*     -- initialize 'array'
      do i=1, nb
        array(i) = sin(real(i))
      enddo

*     -- print 'array' with '--' as separator
      write(6,'(10(f7.5,a))') ((array(i),'--'), i=1,nb)

      end

It's a Fortran77 code that I have retrieved and am working on.
I'd like to parse it with fortran-src and get the corresponding AST.

But I have an error on line $15$.

As far as I know, this statement is valid in fortran77 (see https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vnc5/index.html ).

If so, is it possible to take this type of expression into account in the parser as part of read, write and print?

asciicast

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

1 participant