Skip to content

Commit

Permalink
issue #171. Hack to remove statement function matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertford committed Mar 28, 2019
1 parent 75b8829 commit 145d85a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/fparser/scripts/fparser2.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def runner(_, options, args):
f2003_parser = ParserFactory().create()
program = f2003_parser(reader)
print (program)
print (repr(program))
except FortranSyntaxError as msg:
print ("Syntax error: {0}".format(str(msg)))
try:
Expand Down
4 changes: 4 additions & 0 deletions src/fparser/sergi_example.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
subroutine field_copy_code()
output(ji,jj) = input(ji,jj)
end subroutine field_copy_code

6 changes: 5 additions & 1 deletion src/fparser/two/Fortran2003.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,14 @@ class Declaration_Construct(Base): # R207
| <type-declaration-stmt>
| <stmt-function-stmt>
"""
#subclass_names = ['Comment', 'Derived_Type_Def', 'Entry_Stmt', 'Enum_Def',
# 'Format_Stmt', 'Interface_Block', 'Parameter_Stmt',
# 'Procedure_Declaration_Stmt', 'Specification_Stmt',
# 'Type_Declaration_Stmt', 'Stmt_Function_Stmt']
subclass_names = ['Comment', 'Derived_Type_Def', 'Entry_Stmt', 'Enum_Def',
'Format_Stmt', 'Interface_Block', 'Parameter_Stmt',
'Procedure_Declaration_Stmt', 'Specification_Stmt',
'Type_Declaration_Stmt', 'Stmt_Function_Stmt']
'Type_Declaration_Stmt']


class Execution_Part(BlockBase): # R208
Expand Down
2 changes: 1 addition & 1 deletion src/fparser/two/Fortran2008.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class Declaration_Construct_C1112(Declaration_Construct): # C1112
subclass_names = Declaration_Construct.subclass_names[:]
subclass_names.remove('Format_Stmt')
subclass_names.remove('Entry_Stmt')
subclass_names.remove('Stmt_Function_Stmt')
#subclass_names.remove('Stmt_Function_Stmt')


class Submodule(BlockBase): # R1116 [C1112,C1114]
Expand Down

0 comments on commit 145d85a

Please sign in to comment.