Pascal code checker!

Paul McGuire ptmcg at austin.rr.com
Wed Dec 12 17:05:11 EST 2007


On Dec 12, 3:03 pm, Tim Chase <python.l... at tim.thechases.com> 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



More information about the Python-list mailing list