(git:6a2e663)
cp_parser_types Module Reference

Utility routines to read data from files. Kept as close as possible to the old parser because. More...

Functions/Subroutines

subroutine, public parser_release (parser)
 releases the parser More...
 
subroutine, public parser_create (parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
 Start a parser run. Initial variables allow to @SET stuff before opening the file. More...
 
subroutine, public parser_reset (parser)
 Resets the parser: rewinding the unit and re-initializing all parser structures. More...
 

Variables

character(len=default_path_length), dimension(2, 1:0), public empty_initial_variables
 
character(len=1), parameter, public default_continuation_character = CHAR(92)
 
character(len=4), parameter, public default_separators = ",:;="
 
character(len=3), parameter, public default_end_section_label = "END"
 
character(len=1), dimension(2), parameter, public default_comment_character = (/"#", "!"/)
 
character(len=1), parameter, public default_section_character = "&"
 
character(len=1), parameter, public default_quote_character = '"'
 
integer, parameter, public max_unit_number = 999
 

Detailed Description

Utility routines to read data from files. Kept as close as possible to the old parser because.

  1. string handling is a weak point of fortran compilers, and it is easy to write correct things that do not work
  2. conversion of old code
    History
    22.11.1999 first version of the old parser (called qs_parser) Matthias Krack 06.2004 removed module variables, cp_parser_type, new module [fawzi] 08.2008 Added buffering [tlaino]
    Author
    fawzi

Function/Subroutine Documentation

◆ parser_release()

subroutine, public cp_parser_types::parser_release ( type(cp_parser_type), intent(inout)  parser)

releases the parser

Parameters
parser...
Date
14.02.2001
Author
MK
Version
1.0

Definition at line 108 of file cp_parser_types.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parser_create()

subroutine, public cp_parser_types::parser_create ( type(cp_parser_type), intent(out)  parser,
character(len=*), intent(in), optional  file_name,
integer, intent(in), optional  unit_nr,
type(mp_para_env_type), optional, pointer  para_env,
character(len=*), intent(in), optional  end_section_label,
character(len=*), intent(in), optional  separator_chars,
character(len=1), intent(in), optional  comment_char,
character(len=1), intent(in), optional  continuation_char,
character(len=1), intent(in), optional  quote_char,
character(len=1), intent(in), optional  section_char,
logical, intent(in), optional  parse_white_lines,
character(len=*), dimension(:, :), optional  initial_variables,
logical, intent(in), optional  apply_preprocessing 
)

Start a parser run. Initial variables allow to @SET stuff before opening the file.

Parameters
parser...
file_name...
unit_nr...
para_env...
end_section_label...
separator_chars...
comment_char...
continuation_char...
quote_char...
section_char...
parse_white_lines...
initial_variables...
apply_preprocessing...
Date
14.02.2001
Author
MK
Version
1.0

Definition at line 144 of file cp_parser_types.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parser_reset()

subroutine, public cp_parser_types::parser_reset ( type(cp_parser_type), intent(inout)  parser)

Resets the parser: rewinding the unit and re-initializing all parser structures.

Parameters
parser...
Date
12.2008
Author
Teodoro Laino [tlaino]

Definition at line 227 of file cp_parser_types.F.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ empty_initial_variables

character(len=default_path_length), dimension(2, 1:0), public cp_parser_types::empty_initial_variables

Definition at line 53 of file cp_parser_types.F.

◆ default_continuation_character

character(len=1), parameter, public cp_parser_types::default_continuation_character = CHAR(92)

Definition at line 59 of file cp_parser_types.F.

◆ default_separators

character(len=4), parameter, public cp_parser_types::default_separators = ",:;="

Definition at line 60 of file cp_parser_types.F.

◆ default_end_section_label

character(len=3), parameter, public cp_parser_types::default_end_section_label = "END"

Definition at line 61 of file cp_parser_types.F.

◆ default_comment_character

character(len=1), dimension(2), parameter, public cp_parser_types::default_comment_character = (/"#", "!"/)

Definition at line 62 of file cp_parser_types.F.

◆ default_section_character

character(len=1), parameter, public cp_parser_types::default_section_character = "&"

Definition at line 62 of file cp_parser_types.F.

◆ default_quote_character

character(len=1), parameter, public cp_parser_types::default_quote_character = '"'

Definition at line 62 of file cp_parser_types.F.

◆ max_unit_number

integer, parameter, public cp_parser_types::max_unit_number = 999

Definition at line 65 of file cp_parser_types.F.