Issue 25 in f2py: sub subroutines

1 view
Skip to first unread message

f2...@googlecode.com

unread,
Aug 30, 2010, 4:17:22 PM8/30/10
to f2py-...@googlegroups.com
Status: New
Owner: omar.aw...@gmail.com
CC: pearu.peterson
Labels: Type-Defect Priority-Medium

New issue 25 by omar.aw...@gmail.com: sub subroutines
http://code.google.com/p/f2py/issues/detail?id=25

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:

Attachments:
fparser_subroutine.patch 580 bytes

f2...@googlecode.com

unread,
Aug 31, 2010, 8:00:35 AM8/31/10
to f2py-...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 25 by pearu.peterson: sub subroutines
http://code.google.com/p/f2py/issues/detail?id=25

I think your fix is reasonable. I have committed the fix with the
corresponding test to hg repo.

Reply all
Reply to author
Forward
0 new messages