more readable
This commit is contained in:
parent
e89a03d456
commit
c5a80bc75d
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 72c58103860e127d37ccf3a06827331de29406ca
|
Subproject commit 87d9413e3e1d6a349eb2350e913ecfe6b423c537
|
|
@ -16,7 +16,8 @@ module IO
|
||||||
private
|
private
|
||||||
|
|
||||||
character(len=*), parameter, public :: &
|
character(len=*), parameter, public :: &
|
||||||
IO_WHITESPACE = achar(44)//achar(32)//achar(9)//achar(10)//achar(13) !< whitespace characters
|
IO_WHITESPACE = achar(44)//achar(32)//achar(9)//achar(10)//achar(13), & !< whitespace characters
|
||||||
|
IO_QUOTES = "'"//'"'
|
||||||
character, parameter, public :: &
|
character, parameter, public :: &
|
||||||
IO_EOL = new_line('DAMASK'), & !< end of line character
|
IO_EOL = new_line('DAMASK'), & !< end of line character
|
||||||
IO_COMMENT = '#'
|
IO_COMMENT = '#'
|
||||||
|
|
|
@ -125,7 +125,7 @@ integer function find_end(str,e_char)
|
||||||
N_cu = 0
|
N_cu = 0
|
||||||
i = 1
|
i = 1
|
||||||
do while(i<=len_trim(str))
|
do while(i<=len_trim(str))
|
||||||
if (str(i:i) == '"' .or. str(i:i) == "'") i = i + scan(str(i+1:),str(i:i))
|
if (scan(str(i:i),IO_QUOTES) == 1) i = i + scan(str(i+1:),str(i:i))
|
||||||
if (N_sq==0 .and. N_cu==0 .and. scan(str(i:i),e_char//',') == 1) exit
|
if (N_sq==0 .and. N_cu==0 .and. scan(str(i:i),e_char//',') == 1) exit
|
||||||
N_sq = N_sq + merge(1,0,str(i:i) == '[')
|
N_sq = N_sq + merge(1,0,str(i:i) == '[')
|
||||||
N_cu = N_cu + merge(1,0,str(i:i) == '{')
|
N_cu = N_cu + merge(1,0,str(i:i) == '{')
|
||||||
|
@ -147,9 +147,9 @@ logical function quotedString(line)
|
||||||
|
|
||||||
quotedString = .false.
|
quotedString = .false.
|
||||||
|
|
||||||
if (line(1:1) == '"' .or. line(1:1) == "'") then
|
if (scan(line(:1),IO_QUOTES) == 1) then
|
||||||
quotedString = .true.
|
quotedString = .true.
|
||||||
if(line(len(line):len(line)) /= line(1:1)) call IO_error(710,ext_msg=line)
|
if(line(len(line):len(line)) /= line(:1)) call IO_error(710,ext_msg=line)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end function quotedString
|
end function quotedString
|
||||||
|
@ -382,7 +382,7 @@ subroutine list_item_inline(blck,s_blck,inline) !ToDo: SR: merge with remove_
|
||||||
indent_next = indentDepth(blck(s_blck:))
|
indent_next = indentDepth(blck(s_blck:))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
if(scan(inline,",") > 0) inline = '"'//inline//'"' ! ToDO: SR: Parse as string and not multiple list items. To be added later
|
if(scan(inline,",") > 0) inline = '"'//inline//'"'
|
||||||
|
|
||||||
end subroutine list_item_inline
|
end subroutine list_item_inline
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue