![]() |
Octopus
|
Data Types | |
| type | block_t |
| interface | oct_parse_block |
| interface | oct_parse_complex |
| interface | oct_parse_double |
| interface | oct_parse_int |
| interface | oct_parse_string |
| interface | parse_block_cmplx |
| interface | parse_block_cols |
| interface | parse_block_end |
| interface | parse_block_float |
| interface | parse_block_integer |
| interface | parse_block_n |
| interface | parse_end |
| interface | parse_environment |
| interface | parse_expression |
| interface | parse_init |
| interface | parse_input_file |
| interface | parse_isdef |
| interface | parse_variable |
| interface | sym_output_table |
Functions/Subroutines | |
| subroutine, public | parser_initialize_symbol_table (log_file, dont_write) |
| Initialise the Octopus parser symbol table from file of keys. More... | |
| subroutine, public | parser_init () |
| Initialise the Octopus parser. More... | |
| subroutine, public | parser_end () |
| End the Octopus parser. More... | |
| logical function, public | parse_is_defined (namespace, name) |
| integer function, public | parse_input_string (file_contents, set_used) |
| subroutine | parse_integer (namespace, name, def, res) |
| subroutine | parse_integer8 (namespace, name, def, res) |
| subroutine | parse_integer48 (namespace, name, def, res) |
| subroutine | parse_integer84 (namespace, name, def, res) |
| subroutine | parse_string (namespace, name, def, res) |
| subroutine | parse_logical (namespace, name, def, res) |
| subroutine | parse_cmplx (namespace, name, def, res) |
| integer function, public | parse_block (namespace, name, blk, check_varinfo_) |
| subroutine, public | parse_block_logical (blk, l, c, res) |
| subroutine | oct_parse_double_unit (namespace, name, def, res, unit) |
| subroutine | oct_parse_block_double_unit (blk, l, c, res, unit) |
| subroutine | oct_parse_expression_vec0 (re, im, ndim, x, r, t, pot) |
| subroutine, public | parse_array (inp_string, x, arraychar) |
| A very primitive way to "preprocess" a string that contains reference to the elements of a two-dimensional array, substituting them with the values of the array x. This way the string can be processed by the parser later. More... | |
| subroutine | parse_check_varinfo (varname) |
| character(len=:) function, allocatable, public | parse_get_full_name (namespace, varname) |
| Given a namespace and a variable name, this function will iterate over all namespace ancestors contained in the namespace, until it finds one for which the variable is defined. If it finds such namespace it returns the variable name prefixed with the namespace. If it does not find any suitable namespace it returns the variable name without any prefix. More... | |
| subroutine, public | parse_block_string (blk, l, c, res, convert_to_c) |
| subroutine | oct_parse_expression (re, im, ndim, x, r, t, pot) |
| The public subroutine parse_expression accepts two possible interfaces, one which assumes that the variables in the expression are "x(:)", "r" and "t", and another one which permits to set one variable to whichever string. Examples of usage: More... | |
| subroutine | oct_parse_expression_vec1 (re, im, c, x, string) |
| subroutine | parse_fatal () |
Variables | |
| character(len=27), parameter, public | parser_varname_excluded_characters = '|!''"#$%&/\()=?{}+-*^.,;:<> ' |
| The following characters should not be allowed in variable names. More... | |
| subroutine, public parser_oct_m::parser_initialize_symbol_table | ( | character(len=*), intent(in), optional | log_file, |
| logical, intent(in), optional | dont_write | ||
| ) |
Initialise the Octopus parser symbol table from file of keys.
Several steps are performed:
| [in] | log_file | Parser log file |
| [in] | dont_write | do not write log file (default: only write from process 0) |
Definition at line 326 of file parser.F90.
| subroutine, public parser_oct_m::parser_init |
Initialise the Octopus parser.
Definition at line 386 of file parser.F90.
| subroutine, public parser_oct_m::parser_end |
End the Octopus parser.
Definition at line 418 of file parser.F90.
| logical function, public parser_oct_m::parse_is_defined | ( | type(namespace_t), intent(in) | namespace, |
| character(len=*), intent(in) | name | ||
| ) |
Definition at line 439 of file parser.F90.
| integer function, public parser_oct_m::parse_input_string | ( | character(len=*), intent(in) | file_contents, |
| integer, intent(in) | set_used | ||
| ) |
Definition at line 452 of file parser.F90.
| subroutine parser_oct_m::parse_integer | ( | type(namespace_t), intent(in) | namespace, |
| character(len=*), intent(in) | name, | ||
| integer, intent(in) | def, | ||
| integer, intent(out) | res | ||
| ) |
Definition at line 470 of file parser.F90.
|
private |
Definition at line 490 of file parser.F90.
|
private |
Definition at line 503 of file parser.F90.
|
private |
Definition at line 521 of file parser.F90.
|
private |
Definition at line 541 of file parser.F90.
|
private |
Definition at line 563 of file parser.F90.
|
private |
Definition at line 586 of file parser.F90.
| integer function, public parser_oct_m::parse_block | ( | type(namespace_t), intent(in) | namespace, |
| character(len=*), intent(in) | name, | ||
| type(block_t), intent(out) | blk, | ||
| logical, intent(in), optional | check_varinfo_ | ||
| ) |
Definition at line 599 of file parser.F90.
| subroutine, public parser_oct_m::parse_block_logical | ( | type(block_t), intent(in) | blk, |
| integer, intent(in) | l, | ||
| integer, intent(in) | c, | ||
| logical, intent(out) | res | ||
| ) |
Definition at line 623 of file parser.F90.
|
private |
Definition at line 637 of file parser.F90.
|
private |
Definition at line 661 of file parser.F90.
|
private |
Definition at line 673 of file parser.F90.
| subroutine, public parser_oct_m::parse_array | ( | character(len=*), intent(inout) | inp_string, |
| real(real64), dimension(:, :), intent(in) | x, | ||
| character(len=1), intent(in) | arraychar | ||
| ) |
A very primitive way to "preprocess" a string that contains reference to the elements of a two-dimensional array, substituting them with the values of the array x. This way the string can be processed by the parser later.
Definition at line 689 of file parser.F90.
|
private |
Definition at line 719 of file parser.F90.
| character(len=:) function, allocatable, public parser_oct_m::parse_get_full_name | ( | type(namespace_t), intent(in), target | namespace, |
| character(len=*), intent(in) | varname | ||
| ) |
Given a namespace and a variable name, this function will iterate over all namespace ancestors contained in the namespace, until it finds one for which the variable is defined. If it finds such namespace it returns the variable name prefixed with the namespace. If it does not find any suitable namespace it returns the variable name without any prefix.
To make it clear what we mean by all namespace ancestors contained in a given namesspace, lets suppose that we have the following namespace:
"A.B.C"
Clearly "A" and "B" are ancestors of "C", but also the full path to "B", that is "A.B", is an ancestor. For practical purposes we will also consider that "C" is an ancestor of itself. So "C", "B.C" and "A.B.C" are also ancestors.
The order in which the function iterates over the possible namespace ancestors is crucial, as it effectively determines namespace precedence in the input file. The order is such that it goes from the rigth-most ancestor to the left-most, and form the more complete path to the least complete. So for the above example, the order will be the following:
"A.B.C", "B.C", "C", "A.B", "B", "A"
as "C" is the right-most ancestor while "A" is the left-most and "A.B.C" is the most complete path while "C" is the least complete.
Definition at line 757 of file parser.F90.
| subroutine, public parser_oct_m::parse_block_string | ( | type(block_t), intent(in) | blk, |
| integer, intent(in) | l, | ||
| integer, intent(in) | c, | ||
| character(len=*), intent(inout) | res, | ||
| logical, intent(in), optional | convert_to_c | ||
| ) |
Definition at line 794 of file parser.F90.
| subroutine parser_oct_m::oct_parse_expression | ( | real(real64), intent(out) | re, |
| real(real64), intent(out) | im, | ||
| integer, intent(in) | ndim, | ||
| real(real64), intent(in) | x, | ||
| real(real64), intent(in) | r, | ||
| real(real64), intent(in) | t, | ||
| character(len=*), intent(in) | pot | ||
| ) |
The public subroutine parse_expression accepts two possible interfaces, one which assumes that the variables in the expression are "x(:)", "r" and "t", and another one which permits to set one variable to whichever string. Examples of usage:
call parse_expression(f_re, f_im, ndim, x(:), r, t, & "0.5*0.01*r^2")
call parse_expression(f_re, f_im, "t", t, "cos(0.01*t)")
Definition at line 837 of file parser.F90.
| subroutine parser_oct_m::oct_parse_expression_vec1 | ( | real(real64), intent(out) | re, |
| real(real64), intent(out) | im, | ||
| character(len=*), intent(in) | c, | ||
| real(real64), intent(in) | x, | ||
| character(len=*), intent(in) | string | ||
| ) |
Definition at line 858 of file parser.F90.
| subroutine parser_oct_m::parse_fatal |
Definition at line 883 of file parser.F90.
| character(len=27), parameter, public parser_oct_m::parser_varname_excluded_characters = '|!''"#$%&/\()=?{}+-*^.,;:<> ' |
The following characters should not be allowed in variable names.
Definition at line 135 of file parser.F90.