fparser.two.Fortran2008.coshape_spec_r511a

Module containing Fortran2008 Coshape_Spec rule R511.a

Module Contents

Classes

Coshape_Spec

coshape-spec is [ lower-cobound : ] upper-cobound

class fparser.two.Fortran2008.coshape_spec_r511a.Coshape_Spec(string, parent_cls=None)[source]

Bases: fparser.two.utils.SeparatorBase

coshape-spec is [ lower-cobound : ] upper-cobound

subclass_names = [][source]
use_names = ['Lower_Cobound', 'Upper_Cobound'][source]
static match(string)[source]

Implements the matching for a coarray shape.

Parameters:

string (str) – the string to match as shape.

Returns:

None if there is no match, otherwise a 2-tuple with lower bound if given or None, and upper bound.

Return type:

NoneType or (None, fparser.two.Fortran2008.Upper_Cobound) or (fparser.two.Fortran2008.Lower_Cobound, fparser.two.Fortran2008.Upper_Cobound)

tostr()[source]

Converts the Shape specification to string.

Returns:

the shape specification as string.

Return type:

str