python bnf somewhere?

Michael Hudson mwh at
Mon Mar 8 18:53:07 CET 2004

Skip Montanaro <skip at> writes:

>     Corey> Hey everyone, sorry to bug people, but I remember seeing a nice
>     Corey> complete BNF for python somewhere in the documentation but I
>     Corey> can't for the life of me find it anymore.  Anyone have a link?
> There are references all over the language reference (everywhere a BNF
> productions is shown) to
> This is probably what you were thinking of.

Also note that this grammar isn't what's used to actually parse
Python, and is probably non-trivial to use for that purpose.


  "Also, does the simple algorithm you used in Cyclops have a name?"
  "Not officially, but it answers to "hey, dumb-ass!"
                       -- Neil Schemenauer and Tim Peters, 23 Feb 2001

More information about the Python-list mailing list