On Dec 12, 3:03 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > OTOH, you could actually parse the pascal file(s). This gives > you infinte flexibility to do whatever you want with the > parse-tree. Things get hairy when you have included ("uses") > files, and you also have to write up a grammar for Pascal that > can be understood by Python. The common wisdom seems to be to > use PyParsing[1] for such parsing tasks. ...
Oof! Fond as I am of promoting pyparsing, writing a Pascal compiler (or even just syntax checker) is not a job I would tackle lightly, much less suggest to a new Python developer. A Pascal *subset* might be a good first step, and check for feasibility. But the shell-out-to-a-compiler strategy has a much higher chance of success. -- Paul -- http://mail.python.org/mailman/listinfo/python-list