travellhyne / f2py

Automatically exported from code.google.com/p/f2py
Other
0 stars 0 forks source link

sub subroutines #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This code fails to parse (analyze):

==============
MODULE testa

CONTAINS

SUBROUTINE f(arga)
INTEGER :: arga

CONTAINS

SUBROUTINE subf(argx)
INTEGER :: argx
END SUBROUTINE subf

END SUBROUTINE f

END MODULE testa
==============

The reason is that at block_statements.py:624 it is assumed that after the 
filter_stmts function on line 620 is executed, there are no blank lines or 
comments between the 'CONTAINS' and the 'END SUBROUTINE f' line. 

see attached file for my proposed patch - I didn't dare to commit to mercurial 
yet, will do it myself once I'm feeling more comfortable, besides.. maybe my 
fix sucks:

Original issue reported on code.google.com by omar.aw...@gmail.com on 30 Aug 2010 at 8:16

Attachments:

GoogleCodeExporter commented 9 years ago
I think your fix is reasonable. I have committed the fix with the
corresponding test to hg repo.

Original comment by pearu.peterson on 31 Aug 2010 at 11:59