<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Parser, branch fix-traceback-syntax-error</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-40334: Correctly identify invalid target in assignment errors (GH-20076)</title>
<updated>2020-05-15T01:04:52+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-15T01:04:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=16ab07063cb564c1937714bd39d6915172f005b5'/>
<id>16ab07063cb564c1937714bd39d6915172f005b5</id>
<content type='text'>
Co-authored-by: Lysandros Nikolaou &lt;lisandrosnik@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Lysandros Nikolaou &lt;lisandrosnik@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40618: Disallow invalid targets in augassign and except clauses (GH-20083)</title>
<updated>2020-05-14T20:13:50+00:00</updated>
<author>
<name>Lysandros Nikolaou</name>
<email>lisandrosnik@gmail.com</email>
</author>
<published>2020-05-14T20:13:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=ce21cfca7bb2d18921bc4ac27cb064726996c519'/>
<id>ce21cfca7bb2d18921bc4ac27cb064726996c519</id>
<content type='text'>
This commit fixes the new parser to disallow invalid targets in the
following scenarios:
- Augmented assignments must only accept a single target (Name,
  Attribute or Subscript), but no tuples or lists.
- `except` clauses should only accept a single `Name` as a target.

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fixes the new parser to disallow invalid targets in the
following scenarios:
- Augmented assignments must only accept a single target (Name,
  Attribute or Subscript), but no tuples or lists.
- `except` clauses should only accept a single `Name` as a target.

Co-authored-by: Pablo Galindo &lt;Pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40619: Correctly handle error lines in programs without file mode (GH-20090)</title>
<updated>2020-05-14T20:11:48+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-14T20:11:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=bcc30360951a303aa72b0502b77aad2c5f09f30d'/>
<id>bcc30360951a303aa72b0502b77aad2c5f09f30d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40334: Always show the caret on SyntaxErrors (GH-20050)</title>
<updated>2020-05-13T19:36:27+00:00</updated>
<author>
<name>Lysandros Nikolaou</name>
<email>lisandrosnik@gmail.com</email>
</author>
<published>2020-05-13T19:36:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a15c9b3a0524e5ca0434d2ad11076677824af941'/>
<id>a15c9b3a0524e5ca0434d2ad11076677824af941</id>
<content type='text'>
This commit fixes SyntaxError locations when the caret is not displayed,
by doing the following:

- `col_number` always gets set to the location of the offending
  node/expr. When no caret is to be displayed, this gets achieved
  by setting the object holding the error line to None.

- Introduce a new function `_PyPegen_raise_error_known_location`,
  which can be called, when an arbitrary `lineno`/`col_offset`
  needs to be passed. This function then gets used in the grammar
  (through some new macros and inline functions) so that SyntaxError
  locations of the new parser match that of the old.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fixes SyntaxError locations when the caret is not displayed,
by doing the following:

- `col_number` always gets set to the location of the offending
  node/expr. When no caret is to be displayed, this gets achieved
  by setting the object holding the error line to None.

- Introduce a new function `_PyPegen_raise_error_known_location`,
  which can be called, when an arbitrary `lineno`/`col_offset`
  needs to be passed. This function then gets used in the grammar
  (through some new macros and inline functions) so that SyntaxError
  locations of the new parser match that of the old.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40593: Improve syntax errors for invalid characters in source code. (GH-20033)</title>
<updated>2020-05-12T09:42:04+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-05-12T09:42:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=74ea6b5a7501fb393cd567fb21998d0bfeeb267c'/>
<id>74ea6b5a7501fb393cd567fb21998d0bfeeb267c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40334: produce specialized errors for invalid del targets (GH-19911)</title>
<updated>2020-05-11T21:53:58+00:00</updated>
<author>
<name>Shantanu</name>
<email>hauntsaninja@users.noreply.github.com</email>
</author>
<published>2020-05-11T21:53:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=27c0d9b54abaa4112d5a317b8aa78b39ad60a808'/>
<id>27c0d9b54abaa4112d5a317b8aa78b39ad60a808</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40585: Normalize errors messages in codeop when comparing them (GH-20030)</title>
<updated>2020-05-11T00:41:26+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-11T00:41:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5b956ca42de37c761562e9c9aeb96a0e67606e33'/>
<id>5b956ca42de37c761562e9c9aeb96a0e67606e33</id>
<content type='text'>
With the new parser, the error message contains always the trailing
newlines, causing the comparison of the repr of the error messages
in codeop to fail. This commit makes the new parser mirror the old parser's
behaviour regarding trailing newlines.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the new parser, the error message contains always the trailing
newlines, causing the comparison of the repr of the error messages
in codeop to fail. This commit makes the new parser mirror the old parser's
behaviour regarding trailing newlines.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40334: Avoid collisions between parser variables and grammar variables (GH-19987)</title>
<updated>2020-05-10T04:34:50+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-10T04:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=ac7a92cc0a821699df48bc2e30a02c25d6338f78'/>
<id>ac7a92cc0a821699df48bc2e30a02c25d6338f78</id>
<content type='text'>
This is for the C generator:
- Disallow rule and variable names starting with `_`
- Rename most local variable names generated by the parser to start with `_`

Exceptions:
- Renaming `p` to `_p` will be a separate PR
- There are still some names that might clash, e.g.
  - anything starting with `Py`
  - C reserved words (`if` etc.)
  - Macros like `EXTRA` and `CHECK`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is for the C generator:
- Disallow rule and variable names starting with `_`
- Rename most local variable names generated by the parser to start with `_`

Exceptions:
- Renaming `p` to `_p` will be a separate PR
- There are still some names that might clash, e.g.
  - anything starting with `Py`
  - C reserved words (`if` etc.)
  - Macros like `EXTRA` and `CHECK`
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40502: Initialize n-&gt;n_col_offset (GH-19988)</title>
<updated>2020-05-08T20:58:28+00:00</updated>
<author>
<name>Joannah Nanjekye</name>
<email>33177550+nanjekyejoannah@users.noreply.github.com</email>
</author>
<published>2020-05-08T20:58:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d10091aa171250c67a5079abfe26b8b3964ea39a'/>
<id>d10091aa171250c67a5079abfe26b8b3964ea39a</id>
<content type='text'>
* initialize n-&gt;n_col_offset

* 📜🤖 Added by blurb_it.

* Move initialization

Co-authored-by: nanjekyejoannah &lt;joannah.nanjekye@ibm.com&gt;
Co-authored-by: blurb-it[bot] &lt;43283697+blurb-it[bot]@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* initialize n-&gt;n_col_offset

* 📜🤖 Added by blurb_it.

* Move initialization

Co-authored-by: nanjekyejoannah &lt;joannah.nanjekye@ibm.com&gt;
Co-authored-by: blurb-it[bot] &lt;43283697+blurb-it[bot]@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40555: Check for p-&gt;error_indicator in loop rules after the main loop is done (GH-19986)</title>
<updated>2020-05-08T02:38:44+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2020-05-08T02:38:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=db9163ceef31ba00ccb23226917f9c8e9142a0b8'/>
<id>db9163ceef31ba00ccb23226917f9c8e9142a0b8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
