PreForM.py supports the most used
cpp pre-processing
directives and provides advanced features typical of templating systems.
Even if PreForM.py is currently Fortran-agnostic (it being usable
within any programming languages) it is focused on Fortran programming
language.The features are:
cpp pre-processing directives:
- conditionals:
- operators (also nested):
-
defined MACROordefined(MACRO); -
EXPRESSION || EXPRESSION(logic or); -
EXPRESSION && EXPRESSION(logic and);
-
-
#if EXPRESSION; -
#elif EXPRESSION; -
#ifdef MACRO; -
#ifndef MACRO; -
#else; -
#endif;
- operators (also nested):
- macros:
- standard predefined macros:
-
__FILE__; -
__LINE__; -
__DATE__; -
__TIME__;
-
- expansion;
- stringification;
- concatenation;
- variadic macros;
- object-like macros:
-
#define MACRO [VALUE], VALUE is optional;
-
- function-like macros:
-
#define FUNCTION FUNCTION_DEFINITION;
-
-
#undef;
- standard predefined macros:
-
#include;
-
#PFM for EXPRESSION-#PFM endforpairs loop control (only for one iteration counter at time
cpp pre-processing directives should start at the first column, the symbol # being the first one. PreForM.py relaxes this rule allowing any number of leading white spaces before #.https://github.com/szaghi/PreForM
No comments:
Post a Comment