loki.frontend.tests.test_regex_frontend

Verify correct parsing behaviour of the REGEX frontend

Functions

fixture_here()

fixture_reset_regex_frontend_timeout()

fixture_testdir(here)

test_declaration_whitespace_attributes()

Test correct behaviour with/without white space inside declaration attributes (reported in #318).

test_make_complete_sanitize(frontend)

Test that attempts to first REGEX-parse and then complete source code with unsupported features that require "frontend sanitization".

test_regex_function_inline_return_type()

test_regex_fypp()

Test that unexpanded fypp-annotations are handled gracefully in the REGEX frontend.

test_regex_import_linebreaks()

Verify correct handling of line breaks in import statements

test_regex_interface_module()

test_regex_interface_subroutine()

test_regex_loki_69()

Test compliance of REGEX frontend with edge cases reported in LOKI-69.

test_regex_module_from_source()

Verify that the regex frontend is able to parse modules

test_regex_module_imports()

Verify that the regex frontend is able to find and correctly parse Fortran imports

test_regex_prefix(frontend, tmp_path)

test_regex_preproc_in_contains()

test_regex_raw_source()

Verify that unparsed source appears in-between matched objects

test_regex_raw_source_with_cpp()

Verify that unparsed source appears in-between matched objects and preprocessor statements are preserved

test_regex_raw_source_with_cpp_incomplete()

Verify that unparsed source appears inside matched objects if parser classes are used to restrict the matching

test_regex_sourcefile_from_file(testdir)

Verify that the regex frontend is able to parse source files containing multiple modules and subroutines

test_regex_sourcefile_from_file_parser_classes(testdir)

test_regex_sourcefile_from_source()

Verify that the regex frontend is able to parse source files containing multiple modules and subroutines

test_regex_subroutine_from_source()

Verify that the regex frontend is able to parse subroutines

test_regex_subroutine_imports()

Verify that the regex frontend is able to find and correctly parse Fortran imports

test_regex_timeout()

This source fails to parse because of missing SUBROUTINE in END statement, and the test verifies that a timeout is encountered

test_regex_typedef()

Verify that the regex frontend is able to parse type definitions and correctly parse procedure bindings.

test_regex_typedef_generic()

test_regex_variable_declaration(testdir)

Test correct parsing of derived type variable declarations

test_regex_variable_declaration_parentheses()

fixture_here()
fixture_testdir(here)
fixture_reset_regex_frontend_timeout()
test_regex_subroutine_from_source()

Verify that the regex frontend is able to parse subroutines

test_regex_module_from_source()

Verify that the regex frontend is able to parse modules

test_regex_sourcefile_from_source()

Verify that the regex frontend is able to parse source files containing multiple modules and subroutines

test_regex_sourcefile_from_file(testdir)

Verify that the regex frontend is able to parse source files containing multiple modules and subroutines

test_regex_sourcefile_from_file_parser_classes(testdir)
test_regex_raw_source()

Verify that unparsed source appears in-between matched objects

test_regex_raw_source_with_cpp()

Verify that unparsed source appears in-between matched objects and preprocessor statements are preserved

test_regex_raw_source_with_cpp_incomplete()

Verify that unparsed source appears inside matched objects if parser classes are used to restrict the matching

test_make_complete_sanitize(frontend)

Test that attempts to first REGEX-parse and then complete source code with unsupported features that require “frontend sanitization”.

test_regex_timeout()

This source fails to parse because of missing SUBROUTINE in END statement, and the test verifies that a timeout is encountered

test_regex_module_imports()

Verify that the regex frontend is able to find and correctly parse Fortran imports

test_regex_subroutine_imports()

Verify that the regex frontend is able to find and correctly parse Fortran imports

test_regex_import_linebreaks()

Verify correct handling of line breaks in import statements

test_regex_typedef()

Verify that the regex frontend is able to parse type definitions and correctly parse procedure bindings.

test_regex_typedef_generic()
test_regex_loki_69()

Test compliance of REGEX frontend with edge cases reported in LOKI-69. This should become a full-blown Scheduler test when REGEX frontend undeprins the scheduler.

test_regex_variable_declaration(testdir)

Test correct parsing of derived type variable declarations

test_regex_variable_declaration_parentheses()
test_regex_preproc_in_contains()
test_regex_interface_subroutine()
test_regex_interface_module()
test_regex_function_inline_return_type()
test_regex_prefix(frontend, tmp_path)
test_regex_fypp()

Test that unexpanded fypp-annotations are handled gracefully in the REGEX frontend.

test_declaration_whitespace_attributes()

Test correct behaviour with/without white space inside declaration attributes (reported in #318).