pygccxml.declarations.call_invocation

Package pygccxml :: Package declarations :: Module call_invocation |

# Module call_invocation

source code

free function call parser

This module implements all functionality necessary to parse C++ free function invocation. In other words this module is able to extract next information from the string like this `print_message( message )` .

- name ( print_message )
- list of arguments ( message )

This module also defines few convenience function like split and join.

Functions
is_call_invocation(decl_string) returns True if decl_string is function invocation and False otherwise | source code
name(decl_string) returns name of function | source code
args(decl_string) returns list of function arguments | source code
find_args(text, start=None) finds arguments within function invocation. | source code
split(decl_string) returns (name, [arguments] ) | source code
split_recursive(decl_string) returns [(name, [arguments])] | source code
join(name, args, arg_separator=None) returns name( argument_1, argument_2, ..., argument_n ) | source code

Variables
| NOT_FOUND = ``(`-1`,` -1`)``

Function Details

### is_call_invocation(decl_string) | source code
returns True if decl_string is function invocation and False otherwise Parameters: `decl_string` (str) - string that should be checked for pattern presence Returns: bool

### name(decl_string) | source code
returns name of function Parameters: `decl_string` (str) Returns: str

### args(decl_string) | source code
returns list of function arguments Parameters: `decl_string` (str) Returns: [str]

### find_args(text, start=None) | source code
finds arguments within function invocation. Parameters: `text` (str) Returns: [ arguments ] or NOT_FOUND if arguments could not be found