This module exposes two functions, [[parse_f_source]]
and [[parse_c_source]]
,
which perform a rudimentary parsing of fortran and c source files
in order to extract information required for module dependency tracking.
Both functions additionally calculate and store a file digest (hash) which is used by the backend (fpm_backend) to skip compilation of unmodified sources.
Both functions return an instance of the srcfile_t type.
For more information, please read the documentation for each function:
[[parse_f_source]]
[[parse_c_source]]
Parsing of c, cpp source files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | c_filename | |||
type(error_t), | intent(out), | allocatable | :: | error |
Parsing of free-form fortran source files
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | f_filename | |||
type(error_t), | intent(out), | allocatable | :: | error |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | f_filename |
Current file name and line number (for error messaging) |
||
integer, | intent(in) | :: | i | |||
character(len=*), | intent(in) | :: | line |
The line being parsed. MUST BE preprocessed with trim(adjustl() |
||
logical, | intent(out) | :: | use_stmt |
Does this line contain a |
||
logical, | intent(out) | :: | is_intrinsic |
Is the module in this statement intrinsic? |
||
character(len=:), | intent(out), | allocatable | :: | module_name |
used module name |
|
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |