fparser Reference Guide  0.0.14
fparser.two.Fortran2003.Ac_Implied_Do_Control Class Reference
Inheritance diagram for fparser.two.Fortran2003.Ac_Implied_Do_Control:
Collaboration diagram for fparser.two.Fortran2003.Ac_Implied_Do_Control:

Public Member Functions

def tostr (self)
 

Static Public Member Functions

def match (string)
 

Static Public Attributes

 subclass_names
 
 use_names
 

Detailed Description

Fortran2003 rule R471.
Specifies the syntax for the control of an implicit loop within an
array constructor.

ac-implied-do-control is ac-do-variable = scalar-int-expr,
                                scalar-int-expr [ , scalar-int-expr ]

where (R472) ac-do-variable is scalar-int-variable

Definition at line 2759 of file Fortran2003.py.

Member Function Documentation

◆ match()

def fparser.two.Fortran2003.Ac_Implied_Do_Control.match (   string)
static
Attempts to match the supplied string with the pattern for
implied-do control.

:param str string: the string to test for a match.

:returns: None if there is no match or a 2-tuple containing the \
  do-variable name and the list of integer expressions (for \
  start, stop [, step]).
:rtype: NoneType or \
(:py:class:`fparser.two.Fortran2003.Ac_Do_Variable`, list)

Definition at line 2776 of file Fortran2003.py.

References fparser.two.Fortran2003.Comment.items, fparser.one.statements.StatementWithNamelist.items, fparser.one.statements.Assign.items, fparser.one.statements.Call.items, fparser.one.statements.ComputedGoto.items, fparser.one.statements.AssignedGoto.items, fparser.two.utils.Base.items, fparser.one.statements.Print.items, fparser.one.statements.Read0.items, fparser.one.statements.Read1.items, fparser.one.typedecl_statements.Implicit.items, fparser.one.statements.Write.items, fparser.one.statements.Allocate.items, fparser.one.statements.Deallocate.items, fparser.one.statements.ModuleProcedure.items, fparser.one.statements.Access.items, fparser.two.utils.SequenceBase.items, fparser.one.statements.Save.items, fparser.one.statements.Nullify.items, fparser.one.statements.Use.items, fparser.one.statements.Parameter.items, fparser.one.statements.Equivalence.items, fparser.one.statements.Dimension.items, fparser.one.statements.Target.items, fparser.one.statements.Pointer.items, fparser.two.utils.EndStmtBase.items, fparser.one.statements.Inquire.items, fparser.one.statements.Namelist.items, fparser.one.statements.Common.items, fparser.one.statements.Intent.items, fparser.one.statements.Entry.items, fparser.one.statements.GenericBinding.items, fparser.one.statements.Allocatable.items, fparser.one.statements.Bind.items, fparser.one.statements.Case.items, fparser.one.statements.TypeIs.items, fparser.one.statements.ClassIs.items, fparser.one.statements.Enumerator.items, and fparser.one.statements.Depend.items.

2776  def match(string):
2777  """ Attempts to match the supplied string with the pattern for
2778  implied-do control.
2779 
2780  :param str string: the string to test for a match.
2781 
2782  :returns: None if there is no match or a 2-tuple containing the \
2783  do-variable name and the list of integer expressions (for \
2784  start, stop [, step]).
2785  :rtype: NoneType or \
2786  (:py:class:`fparser.two.Fortran2003.Ac_Do_Variable`, list)
2787  """
2788  idx = string.find("=")
2789  if idx == -1:
2790  return None
2791  do_var = string[:idx].rstrip()
2792  line, repmap = string_replace_map(string[idx + 1 :].lstrip())
2793  int_exprns = line.split(",")
2794  if not (2 <= len(int_exprns) <= 3):
2795  return None
2796  exprn_list = [Scalar_Int_Expr(repmap(s.strip())) for s in int_exprns]
2797  return Ac_Do_Variable(do_var), exprn_list
2798 
Here is the caller graph for this function:

The documentation for this class was generated from the following file: