# Path: fparser/api.py
# def get_reader(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#                ignore_comments = True):
# def parse(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#           ignore_comments = True, analyze=True):
# def walk(stmt, depth=-1, _initial_depth = None):


from fparser import api
from __future__ import absolute_import


def test_reproduce_issue():
    source_str = '''\
MODULE testa

TYPE t
   INTEGER :: x
END TYPE

CONTAINS

SUBROUTINE f(arga)
INTEGER :: arga
TYPE(t), DIMENSION(2) :: v

v(1)%x = 23
v  (2) % x = 42

END SUBROUTINE f
END MODULE testa
'''

# Path: fparser/api.py
# def get_reader(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#                ignore_comments = True):
# def parse(input, isfree=None, isstrict=None, include_dirs = None, source_only = None,
#           ignore_comments = True, analyze=True):
# def walk(stmt, depth=-1, _initial_depth = None):


# Path: fparser/tests/test_issue26.py
from fparser import api

from __future__ import absolute_import


def test_reproduce_issue():
    source_str = '''\
MODULE testa

TYPE t
   INTEGER :: x
END TYPE

CONTAINS

SUBROUTINE f(arga)
INTEGER :: arga
TYPE(t), DIMENSION(2) :: v

v(1)%x = 23
v  (2) % x = 42

END SUBROUTINE f
END MODULE testa
'''

    tree = api.parse(source_str, isfree=True, isstrict=False,