a = b = 1 just syntactic sugar?

Greg Ewing (using news.cis.dfn.de) g2h5dqi002 at sneakemail.com
Mon Jun 9 22:12:16 EDT 2003


Steven Taschuk wrote:
> This is a problem because, as Martin has pointed out, the current
> parser and grammar are LL(1);

You need to be careful when making statements like this about
the Python grammar. Python's parser generator is a strange
beast that allows regular expressions in its productions. It's
not immediately obvious what effect this has on the class of
languages it can parse.

It *might* be the case that there is an equivalent LL(1)
grammar for any grammar that pgen can handle, but I can't
think of a proof of this off the top of my head.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list