Issue 37 in f2py: [patch] Look for ForAllStmt before ForAllConstruct

2 views
Skip to first unread message

f2...@googlecode.com

unread,
Jan 27, 2012, 9:52:20 AM1/27/12
to f2py-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 37 by james.ke...@gmail.com: [patch] Look for ForAllStmt before
ForAllConstruct
http://code.google.com/p/f2py/issues/detail?id=37

This patch ensures that the parser looks for ForAllStmt before
ForAllConstruct, since after fixing the typo reported in Issue 34, forall
constructs match the regular expression used for finding forall statements,
but then cause an AnalyzeError since for a forall statement there is not
matching EndForall.

diff -r 732d6b540026 -r be4de39a1147 fparser/block_statements.py
--- a/fparser/block_statements.py Fri Jan 27 14:29:58 2012 +0000
+++ b/fparser/block_statements.py Fri Jan 27 14:31:54 2012 +0000
@@ -1249,8 +1249,8 @@
# GeneralAssignment = Assignment + PointerAssignment
# EndFunction, EndProgram, EndSubroutine - part of the corresponding blocks

-executable_construct = [ Associate, Do, ForallConstruct, IfThen,
- Select, WhereConstruct ] + action_stmt
+executable_construct = ([ Associate, Do, IfThen, Select, WhereConstruct ] +
+ action_stmt + [ ForallConstruct ])
#Case, see Select

execution_part_construct = executable_construct + [ Format, Entry,

Reply all
Reply to author
Forward
0 new messages