You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Releasing the crackfortran as a general-purpose tool for parsing Fortran declarations
The `crackfortran` tool is developed to be a backend for the f2py utility. However, crackfortran could also be very useful on its own.
The use of crackfortran could be demonstrated by the following example:
```json
► crackfortran symbol.f90 -show
Reading fortran codes...
Reading file 'symbol.f90' (format:free)
Post-processing...
Block: symbol
Post-processing (stage 2)...
[{'args': ['x', 'y', 'symx', 'opt'],
'block': 'subroutine',
'body': [],
'common': {'pltdat': ['model', 'ploter'], 'symbls': ['nsym', 'symbl']},
'commonvars': ['model', 'ploter', 'nsym', 'symbl'],
'entry': {},
'externals': [],
'from': 'symbol.f90',
'implicit': None,
'interfaced': [],
'name': 'symbol',
'sortvars': ['model', 'nsym', 'ploter', 'symbl', 'opt', 'x', 'y', 'symx'],
'vars': {'model': {'attrspec': [], 'typespec': 'integer'},
'nsym': {'attrspec': [], 'typespec': 'integer'},
'opt': {'typespec': 'integer'},
'ploter': {'attrspec': [], 'typespec': 'integer'},
'symbl': {'attrspec': [],
'dimension': ['20', '2'],
'typespec': 'integer'},
'symx': {'attrspec': [], 'dimension': ['2'], 'typespec': 'integer'},
'x': {'typespec': 'real'},
'y': {'typespec': 'real'}}}]
```
The tool presents the subroutine declaration statements as a JSON that can be consumed by other tools for further analysis.
Therefore, this patch adds changes required to expose crackfortran as an entry point, next to f2py3.
0 commit comments