mkparse.py
author Zack Weinberg <zweinberg@mozilla.com>
Tue, 24 Feb 2009 10:21:23 -0500
changeset 163 23188c81c0715301f319e343a9a6acf9fd15d3c3
parent 150 d3574d51916dce209529f41c7ae1a7f5c5210ca0
child 228 4c65b790ac95be806bde1236117b75e8ba1e14ca
permissions -rwxr-xr-x
Use standard python built-in `enumerate` and universal-newline support instead of `iterlines`.

import sys
import pymake.parser

for f in sys.argv[1:]:
    print "Parsing %s" % f
    fd = open(f)
    stmts = pymake.parser.parsestream(fd, f)
    print stmts