subroutineparse_filerecursiveprivate
recursive subroutine parse_file(c, path)
Read file path into the block being read.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| c | type(fypp_t) | inout | the state | |
| path | character(len=*) | in | the file |
Calls
Source
Show the code
recursive subroutine parse_file(c, path)
type(fypp_t), intent(inout) :: c !! the state
character(len=*), intent(in) :: path !! the file
character(len=:), allocatable :: text, errmsg
integer :: stat
call read_whole_file(path, text, stat, errmsg)
if (stat /= 0) then
call fail(c, 'cannot read '//path)
return
end if
call without_carriage_returns(text)
call parse_text(c, text, path)
end subroutine parse_file