fparser Reference Guide  0.0.14
fparser.two.C99Preprocessor.Cpp_Macro_Identifier_List Class Reference
Inheritance diagram for fparser.two.C99Preprocessor.Cpp_Macro_Identifier_List:
Collaboration diagram for fparser.two.C99Preprocessor.Cpp_Macro_Identifier_List:

Public Member Functions

def tostr (self)
 
- Public Member Functions inherited from fparser.two.utils.StringBase
def init (self, string)
 
def tostr (self)
 
def torepr (self)
 
- Public Member Functions inherited from fparser.two.utils.Base
def __init__ (self, string, parent_cls=None)
 
def __new__ (cls, string, parent_cls=None)
 
def get_root (self)
 
def children (self)
 
def init (self, items)
 
def torepr (self)
 
def __str__ (self)
 
def __repr__ (self)
 
def tofortran (self, tab="", isfix=None)
 
def restore_reader (self, reader)
 
- Public Member Functions inherited from fparser.two.utils.ComparableMixin
def __lt__ (self, other)
 
def __le__ (self, other)
 
def __eq__ (self, other)
 
def __ge__ (self, other)
 
def __gt__ (self, other)
 
def __ne__ (self, other)
 

Static Public Member Functions

def match (string)
 
- Static Public Member Functions inherited from fparser.two.utils.StringBase
def match (pattern, string)
 

Static Public Attributes

 subclass_names
 
- Static Public Attributes inherited from fparser.two.utils.Base
 subclasses
 

Additional Inherited Members

- Public Attributes inherited from fparser.two.utils.StringBase
 string
 
- Public Attributes inherited from fparser.two.utils.Base
 parent
 
 items
 

Detailed Description

Implements the matching of an identifier list in a macro definition.

identifier-list is (identifier [, identifier-list or ...])
                   or (...)

Definition at line 514 of file C99Preprocessor.py.

Member Function Documentation

◆ match()

def fparser.two.C99Preprocessor.Cpp_Macro_Identifier_List.match (   string)
static
Implements the matching of a macro identifier list as part of
a macro definition. It must consist of one or more macro
identifier separated by comma, or "..." for a variadic argument
list, and must be surrouned by parentheses.

For simplicity, the matched list is kept as a single string and not
matched as
:py:class:`fparser.two.C99Preprocessor.Cpp_Macro_Identifier`.

:param str string: the string to match with the pattern rule.

:return: a tuple of size 1 containing a string with the \
 matched identifier list if there is a match, or None if \
 there is not.
:rtype: (`str`,) or `NoneType`

Definition at line 531 of file C99Preprocessor.py.

531  def match(string):
532  """Implements the matching of a macro identifier list as part of
533  a macro definition. It must consist of one or more macro
534  identifier separated by comma, or "..." for a variadic argument
535  list, and must be surrouned by parentheses.
536 
537  For simplicity, the matched list is kept as a single string and not
538  matched as
539  :py:class:`fparser.two.C99Preprocessor.Cpp_Macro_Identifier`.
540 
541  :param str string: the string to match with the pattern rule.
542 
543  :return: a tuple of size 1 containing a string with the \
544  matched identifier list if there is a match, or None if \
545  there is not.
546  :rtype: (`str`,) or `NoneType`
547 
548  """
549  if not string:
550  return None
551  return StringBase.match(Cpp_Macro_Identifier_List._pattern, string)
552 
Here is the caller graph for this function:

◆ tostr()

def fparser.two.C99Preprocessor.Cpp_Macro_Identifier_List.tostr (   self)
:return: this macro-identifier-list as a string.
:rtype: str

Definition at line 553 of file C99Preprocessor.py.

References fparser.two.utils.StringBase.string.

553  def tostr(self):
554  """
555  :return: this macro-identifier-list as a string.
556  :rtype: str
557  """
558  return self.string
559 
560 
Here is the caller graph for this function:

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