fparser.two.Fortran2008.format_item_r1003
Module containing Fortran 2008 Format_Item rule R1003
Classes
Fortran 2008 rule R1003 |
Module Contents
- class fparser.two.Fortran2008.format_item_r1003.Format_Item(string, parent_cls=None)[source]
Bases:
fparser.two.Fortran2003.Format_ItemFortran 2008 rule R1003
- format-item is [ r ] data-edit-desc
or control-edit-desc or char-string-edit-desc or [ r ] ( format-item-list ) or format-item-c1002 or hollerith-item or * ( format-item-list )
Extends the Fortran 2003 rule R1003 with the additional unlimited format repeat specifier
*before a parenthesised format-item-list.- subclass_names = ['Hollerith_Item', 'Control_Edit_Desc', 'Char_String_Edit_Desc', 'Format_Item_C1002', 'Format_Item'][source]
- static match(string: str) Tuple[str | fparser.two.Fortran2003.Digit_String, fparser.two.Fortran2003.Format_Item | fparser.two.Fortran2003.Format_Item_List] | None[source]
Attempts to match the supplied text with this rule.
Calls the Fortran 2003 match first. If that fails, checks for the Fortran 2008 unlimited format repeat:
*(format-item-list).- Parameters:
string – Fortran code to check for a match.
- Returns:
None if there is no match, a tuple of size 2 containing a repeat specifier (
"*"or a Repeat instance) and the matched descriptor or format-item-list.