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

[patch] Look for ForAllStmt before ForAllConstruct #37

Open
GoogleCodeExporter opened this issue Aug 5, 2015 · 0 comments
Open

[patch] Look for ForAllStmt before ForAllConstruct #37

GoogleCodeExporter opened this issue Aug 5, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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,


Original issue reported on code.google.com by james.ke...@gmail.com on 27 Jan 2012 at 2:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant