Commit ee1036e
committed
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.1 parent 15211ed commit ee1036e
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3691 | 3691 | | |
3692 | 3692 | | |
3693 | 3693 | | |
3694 | | - | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
3695 | 3699 | | |
3696 | 3700 | | |
3697 | 3701 | | |
3698 | 3702 | | |
3699 | 3703 | | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
3700 | 3707 | | |
| 3708 | + | |
3701 | 3709 | | |
3702 | 3710 | | |
3703 | 3711 | | |
| |||
3757 | 3765 | | |
3758 | 3766 | | |
3759 | 3767 | | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
3760 | 3772 | | |
3761 | 3773 | | |
3762 | 3774 | | |
| |||
3765 | 3777 | | |
3766 | 3778 | | |
3767 | 3779 | | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
0 commit comments