fparser.common.utils

Various utility functions.

Permission to use, modify, and distribute this software is given under the terms of the NumPy License. See http://scipy.org.

NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. Author: Pearu Peterson <pearu@cens.ioc.ee> Created: May 2006

Module Contents

Classes

classes

Make classes available as attributes of this class.

Functions

split_comma(line[, item, comma, keep_empty, brackets])

Split (an optionally bracketed) comma-separated list into

parse_array_spec(line[, item])

specs_split_comma(line[, item, upper])

parse_bind(line[, item])

parse_result(line[, item])

get_module_file(name, directory[, _cache])

str2stmt(string[, isfree, isstrict])

Convert Fortran code to Statement tree.

Attributes

is_name

exception fparser.common.utils.ParseError[source]

Bases: Exception

Common base class for all non-exit exceptions.

exception fparser.common.utils.AnalyzeError[source]

Bases: Exception

Common base class for all non-exit exceptions.

fparser.common.utils.is_name[source]
fparser.common.utils.split_comma(line, item=None, comma=',', keep_empty=False, brackets=None)[source]

Split (an optionally bracketed) comma-separated list into items and return a list containing them. If supplied then brackets must be a list of containing two strings, the first being the opening bracket and the second the closing bracket.

fparser.common.utils.parse_array_spec(line, item=None)[source]
fparser.common.utils.specs_split_comma(line, item=None, upper=False)[source]
fparser.common.utils.parse_bind(line, item=None)[source]
fparser.common.utils.parse_result(line, item=None)[source]
fparser.common.utils.get_module_file(name, directory, _cache={})[source]
fparser.common.utils.str2stmt(string, isfree=True, isstrict=False)[source]

Convert Fortran code to Statement tree.

class fparser.common.utils.classes[source]

Bases: type

Make classes available as attributes of this class.

To add a class to the attributes list, one must use:

class Name(metaclass=classes):

in the definition of the class.

In addition, apply the following tasks:

  • decorate analyze methods with show_item_on_failure