[issue44324] add a "expected expression" syntax error

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

[issue44324] add a "expected expression" syntax error

2021-06-17 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44324] add a "expected expression" syntax error

2021-06-08 Thread Arjun
Change by Arjun : -- keywords: +patch pull_requests: +25176 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26592 ___ Python tracker ___

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I saw that unclosed parentheses' special error are checked in the same > place. Just to clarify: unclosed parentheses is a tokenizer error, not a parser error and this is handled by checking the tokenize status when it has already failed. The

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >> Well, I was thinking we could just do a simple check in >> _PyPegen_check_tokenizer_errors or _PyPegen_run_parser functions. If the >> last three tokens in the Parser object's tokens array are NAME, >> EQUAL/MINEQUAL/etc and NEWLINE, we raise the

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
Arjun added the comment: > This one will be very tricky to do correctly because the '=' is very > context-sensitive and the parser can be confused when backtracking, so this > *may* be quite delicate/complex Well, I was thinking we could just do a simple check in

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I suspect this is going to be a pain for malformed expressions on the right. For instance: >>> a = {x: for x in {}} File "", line 1 a = {x: for x in {}} ^^^ SyntaxError: expected an expression --

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This one will be very tricky to do correctly because the '=' is very context-sensitive and the parser can be confused when backtracking, so this *may* be quite delicate/complex. I need to play a bit with this to know how feasible this would be.

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
Arjun added the comment: I forgot to add, I would be willing to make the necessary changes, if accepted -- ___ Python tracker ___

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
New submission from Arjun : Recently, CPython got a new syntax error, "SyntaxError: expression expected after dictionary key and ':'". I propose to add a "expected expression" in general for consistency. I would like to have it changed for all the "equals" (e.g. PLUSEQUAL, MINEQUAL, etc).