python bnf somewhere?

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


Skip Montanaro <skip at pobox.com> 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
> 
>     http://www.python.org/doc/current/ref/grammar.txt
> 
> 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.

Cheers,
mwh

-- 
  "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