fab.tools.preprocessor#

This file contains the base class for any preprocessor, and two derived classes for cpp and fpp.

Classes

Cpp()

Class for cpp.

CppFortran()

Class for cpp when used as a Fortran preprocessor

Fpp()

Class for Intel's Fortran-specific preprocessor.

Preprocessor(name, exec_name, category[, ...])

This is the base class for any preprocessor.

class fab.tools.preprocessor.Preprocessor(name, exec_name, category, availablility_option=None)#

This is the base class for any preprocessor.

Parameters:
  • name (str) – the name of the preprocessor.

  • exec_name (Union[str, Path]) – the name of the executable.

  • category (Category) – the category (C_PREPROCESSOR or FORTRAN_PREPROCESSOR)

preprocess(input_file, output_file, add_flags=None)#

Calls the preprocessor to process the specified input file, creating the requested output file.

Parameters:
  • input_file (Path) – input file.

  • output_file (Path) – the output filename.

  • add_flags (Optional[List[Union[Path, str]]]) – List with additional flags to be used. (default: None)

class fab.tools.preprocessor.Cpp#

Class for cpp.

class fab.tools.preprocessor.CppFortran#

Class for cpp when used as a Fortran preprocessor

class fab.tools.preprocessor.Fpp#

Class for Intel’s Fortran-specific preprocessor.