On Jan 25, 2008 10:15 AM, nathan binkert <[EMAIL PROTECTED]> wrote:
> > No, there are too many syntactic situations where this would make the
> > grammar ambiguous or tortuous. We don't want to move beyond LL(1).
> > (Apart from parsing indentation and nested parentheses, of course --
> > which actually reminds me or another issue with using <> as brackets:
> > the lexer can't know whether a particular < or > is used as a bracket
> > or not, so it can't keep track of nesting like it does for (), [] and
> > {}. So <> would always remain a second-class citizen.)
>
> What about a single character prefix like we have with r'' and u''?
> We could have f{} and s{}.
> I'm not particularly enamored by the idea, but the parser should be
> able to handle it, no?

It's not the same -- r"..." is a single token to the lexer, but r{...}
is multiple tokens. It would also rule out a possible future syntactic
extension (present in some other languages) where, in analogy of
foo(...) and foo[...] you can also write foo{...}.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to