fparser.two.Fortran2008.proc_decl_r1214

Module containing Fortran 2008 Proc_Decl rule R1214

Classes

Proc_Decl

Fortran 2008 rule R1214

Module Contents

class fparser.two.Fortran2008.proc_decl_r1214.Proc_Decl(string, parent_cls=None)[source]

Bases: fparser.two.Fortran2003.Proc_Decl

Fortran 2008 rule R1214

proc-decl is procedure-entity-name [ => proc-pointer-init ]

where (R1216) proc-pointer-init is either null-init or initial-proc-target, and (R1217) initial-proc-target is a procedure-name. The Fortran 2003 form of R1214 only accepts null-init on the right-hand side of =>; this subclass extends it to also accept an initial-proc-target so that declarations such as:

procedure(cb), pointer, nopass :: eval => dummy

parse under std='f2008'.

subclass_names = ['Procedure_Entity_Name', 'Proc_Decl'][source]
use_names = ['Null_Init', 'Name'][source]
static match(string: str) Tuple[fparser.two.Fortran2003.Procedure_Entity_Name, str, fparser.two.Fortran2003.Null_Init | fparser.two.Fortran2003.Name] | None[source]

Attempts to match the supplied text with this rule.

Calls the Fortran 2003 match first (which handles the null-init branch); if that fails, tries the Fortran 2008 initial-proc-target branch where the right-hand side of => is a procedure-name.

Parameters:

string – Fortran code to check for a match.

Returns:

None if there is no match, otherwise a 3-tuple of (procedure-entity-name, "=>", proc-pointer-init).