Skip to content

Commit

Permalink
Create a system to convert version 1 metadata to version 2
Browse files Browse the repository at this point in the history
Version 2 contains config-file-like format in a separate file.
Dimensions are taken from the Fortran code and converted to standard names while possible.
The conversion process generates warnings where it was unable to do a complete conversion.

Fixes #171
  • Loading branch information
gold2718 authored Mar 23, 2019
2 parents ec6498f + d447000 commit 228a14d
Show file tree
Hide file tree
Showing 13 changed files with 5,056 additions and 0 deletions.
409 changes: 409 additions & 0 deletions scripts/convert_metadata.py

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions scripts/fortran_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Public API for the fortran_parser library
"""

__all__ = [
'fortran_type_definition',
'parse_fortran_file',
'parse_fortran_var_decl'
]

from parse_fortran_file import parse_fortran_file
from parse_fortran import parse_fortran_var_decl, fortran_type_definition
688 changes: 688 additions & 0 deletions scripts/fortran_tools/parse_fortran.py

Large diffs are not rendered by default.

820 changes: 820 additions & 0 deletions scripts/fortran_tools/parse_fortran_file.py

Large diffs are not rendered by default.

497 changes: 497 additions & 0 deletions scripts/metadata_table.py

Large diffs are not rendered by default.

1,142 changes: 1,142 additions & 0 deletions scripts/metavar.py

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions scripts/parse_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""Public API for the parse_tools library
"""
__all__ = [
'CCPPError',
'check_balanced_paren',
'check_cf_standard_name',
'check_dimensions',
'check_fortran_id',
'check_fortran_intrinsic',
'check_fortran_ref',
'check_fortran_type',
'context_string',
'FORTRAN_DP_RE',
'FORTRAN_ID',
'FORTRAN_SCALAR_REF',
'initLog',
'ParseContext',
'ParseInternalError',
'ParseSource',
'ParseSyntaxError',
'ParseObject',
'PreprocStack',
'register_fortran_ddt_name',
'registered_fortran_ddt_name',
'setLogLevel',
'setLogToFile',
'setLogToNull',
'setLogToStdout',
]

from parse_source import ParseContext, ParseSource
from parse_source import ParseSyntaxError, ParseInternalError
from parse_source import CCPPError, context_string
from parse_object import ParseObject
from parse_checkers import check_fortran_id, FORTRAN_ID
from parse_checkers import FORTRAN_DP_RE
from parse_checkers import check_fortran_ref, FORTRAN_SCALAR_REF
from parse_checkers import check_fortran_intrinsic
from parse_checkers import check_fortran_type, check_balanced_paren
from parse_checkers import registered_fortran_ddt_name
from parse_checkers import register_fortran_ddt_name
from parse_checkers import check_dimensions, check_cf_standard_name
from parse_log import init_log, set_log_level
from parse_log import set_log_to_stdout, set_log_to_null
from parse_log import set_log_to_file
from preprocess import PreprocStack
# End if
Loading

0 comments on commit 228a14d

Please sign in to comment.