[Python-Dev] Modifying Grammar/grammar and other foul acts

"Martin v. Löwis" martin at v.loewis.de
Sat Mar 6 17:56:20 CET 2010


> 1.)  I assume the Grammar/grammar is read top to bottom.  Confirm?

Confirm - but this is not surprising: *any* source file is typically
read from top to bottom. Randoma access reading is typically done for
binary files, only.

So you must be asking something else, but I can't guess what that might be.

> 2.)  More help figuring out how to debug what python *thinks* it's
> seeing when it see "def a() {pass}".  It's not getting to the ast
> construction stage, as near as I can tell.  What additional breakpoints
> can I set to see where it's failing. 

Enable the D() debugging in parser.c (configure with --with-pydebug,
and set PYTHONDEBUG).

Regards,
Martin



More information about the Python-Dev mailing list