[issue42997] Improve error message for missing : before suites

2021-02-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42997] Improve error message for missing : before suites

2021-02-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 58fb156edda1a0e924a38bfed494bd06cb09c9a3 by Pablo Galindo in branch 'master': bpo-42997: Improve error message for missing : before suites (GH-24292) https://github.com/python/cpython/commit/58fb156edda1a0e924a38bfed494bd06cb09c9a3

[issue42997] Improve error message for missing : before suites

2021-01-26 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > Yeah, but the cut is "absolute" (because of the syntax Error). IIRC the > normal cut only affects that rule, no? Right. -- ___ Python tracker

[issue42997] Improve error message for missing : before suites

2021-01-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > It's basically a positive lookahead with a cut, but the extra feature that it > raises a SyntaxError, right? Yeah, but the cut is "absolute" (because of the syntax Error). IIRC the normal cut only affects that rule, no? --

[issue42997] Improve error message for missing : before suites

2021-01-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > See also issue1634034. The problem with issue1634034 is that is not anymore possible without manual changes to the grammar with the PEG parser (or new infrastructure). The new parser does not have a defined concept of "i expected this token and now

[issue42997] Improve error message for missing : before suites

2021-01-26 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: I propose to go with the first approach. I really like that and I can see us using it in various place in the future. It's basically a positive lookahead with a cut, but the extra feature that it raises a SyntaxError, right? I'll have a look at the PR

[issue42997] Improve error message for missing : before suites

2021-01-22 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue1634034. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: PR 24293 implements the second idea (only new rules and no new machinery) -- ___ Python tracker ___

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +23115 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24293 ___ Python tracker ___

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: There are several ways to implement this: In PR24292 I implemented this idea by adding a new element to the grammar: '&&'. This allows to hard-expect a token: if the token is not there the parsing hard-fails immediately without trying anything else

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +23113 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24292 ___ Python tracker

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lys.nikolaou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Instead of displaying a generic syntax error: Python 3.8.6 (default, Oct 10 2020, 18:31:21) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> for x in range File "", line 1 for x in range