Closed GoogleCodeExporter closed 9 years ago
This issue was closed by revision r19.
Original comment by pearu.peterson
on 9 Mar 2010 at 9:14
Thanks for the bug report. I have fixed this issue in svn.
By the way, the recommended way to iterate reader instance is
{{{
reader = FortranFileReader(ffile)
for item in reader:
# process item
}}}
Note that FortranFileReader is iterator (it defines __iter__ and next methods).
Original comment by pearu.peterson
on 9 Mar 2010 at 9:19
[deleted comment]
Thank you so much for your fixing.
I am now leaning fparser, and also python itself.
fparser is very interesting for me
(a while ago, I looked into parser in gfortran or something,
but it was too complicated).
A minor problem: a result obtained from the code below is
item=Comment('C-\nC a\nC b\nC 1',(3, 9))
So, I can not reproduce the original code from this item
since C\n or just \n are missing.
I don't know wether you need to fix it now or not
(probably I don't need this now).
-------------------------------
subroutine bndfp()
use m_struc_def
C-
C a
C b
C
C 1
read(6,*) abc
end
-------------------------------
Original comment by TakaoKot...@gmail.com
on 10 Mar 2010 at 2:43
The above behavior comes from fparser design: ignore empty
lines and empty comments. And so indeed, the original code
is not reproduced exactly.
Do you actually need that the original code would be reproduced
exactly?
Original comment by pearu.peterson
on 10 Mar 2010 at 9:28
No. Probably not.
From your code and document, I gradually understand fparser,
and your idea on it. I now have impression that
I can manage to treat it (at least as a user), though I need to learn it more.
Original comment by TakaoKot...@gmail.com
on 10 Mar 2010 at 6:07
I have just commited a patch that will not ignore empty comments.
Empty lines are still ignored.
Original comment by pearu.peterson
on 15 Mar 2010 at 7:46
Original issue reported on code.google.com by
TakaoKot...@gmail.com
on 9 Mar 2010 at 2:34Attachments: