Guido van Rossum <gu...@python.org> added the comment:

In response to my PEG blogs last year someone showed me an entirely different 
algorithm, based on first looking for matching parentheses (and other matching 
things), then for operators by priority, and so on. The approach was designed 
with C in mind but looked like it would fit reasonably well with Python, once 
you view e.g. ':' as an operator of a certain priority, and figure out what to 
do with indentation.

This would actually be closer to the old approach, accepting "a+1 = b" 
initially as an assignment and then rejecting "a+1" as a target.

I wonder if we could (eventually) use this approach as a fallback when a syntax 
error is found. But it is an entirely different theoretical framework, so we 
should probably not hurry with this.

IOW I'm okay with closing this issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40599>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to