Parsing library for Python?

François Pinard pinard at
Tue Feb 24 14:46:31 CET 2004

[Tim Roberts]

> C, C++, and Fortran are parsing nightmares, where end-of-line and
> spacing are important sometimes and ignored at other times, and so on.

End-of-line processing does not look too difficult for these languages.
But spaces in FORTRAN always looked difficult to parse, at least in
the original FORTRAN where they might appear anywhere, even inside an
identifier, while not even being required between "words".

One routine which was popular, at one place I worded, was named INGMTR,
as people used to always call it this way:


One traditional amusement was writing obscure programs, like:

       DO 50 I = 3

that had nothing to do with DO loops.  I wonder how FORTRAN parsers
worked to sort out such things.  Did later FORTRAN use more strict (or
at least usual) rules on white space?

François Pinard

More information about the Python-list mailing list