"Hassan Aurag" <aurag at geocities.com> writes: > I am trying to write a Fortran parser in python. > > What I need is really simple. Given a fortran file, get all variables > with their type and decompose arthmetic operations. Stuff like a = b+c > ..... and check their types to see if those ops can be dangerous when > ported on various platforms. > > So, I won't need a full fledged compiler, but really something simple. I > am new to regular exps and friends, so if anyone can help with something > simple I can start with, please drop me a note! Either this is a usage of "really simple" with which I was previously unfamiliar, or you have seriously underestimated the difficulty of the task described. Comparatively minor example: as whitespace is not significant in Fortran a statement that begins "DO 50 I =" could be either the beginning of a do-loop that extends through statement 50, or the beginning of an assignment to the variable do50i. -- Mark Jackson - http://www.alumni.caltech.edu/~mjackson Popular memory may be short, but it is nothing compared with the amnesia of experts. - Adam Gopnik
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4