summaryrefslogtreecommitdiffstats
path: root/Parser/pegen_errors.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-107450: Remove unnecessary overflow check in parser error handler (#110940)Lysandros Nikolaou2023-10-161-6/+0
|
* gh-107450: Check for overflow in the tokenizer and fix overflow test (#110832)Lysandros Nikolaou2023-10-161-0/+5
| | | | Co-authored-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-107450: Raise OverflowError when parser column offset overflows (#110754)Lysandros Nikolaou2023-10-121-0/+6
|
* gh-104169: Refactor tokenizer into lexer and wrappers (#110684)Lysandros Nikolaou2023-10-111-1/+2
| | | | | | | | | | | * The lexer, which include the actual lexeme producing logic, goes into the `lexer` directory. * The wrappers, one wrapper per input mode (file, string, utf-8, and readline), go into the `tokenizer` directory and include logic for creating a lexer instance and managing the buffer for different modes. --------- Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵Pablo Galindo Salgado2023-09-221-26/+0
| | | | incorrect soft keywords (#109606)
* gh-108179: Add error message for parser stack overflows (#108256)Dennis Sweeney2023-08-221-0/+8
|
* gh-106320: Remove private _PyErr C API functions (#106356)Victor Stinner2023-07-031-0/+1
| | | | Remove private _PyErr C API functions: move them to the internal C API (pycore_pyerrors.h).
* gh-102856: Python tokenizer implementation for PEP 701 (#104323)Marta Gómez Macías2023-05-211-2/+2
| | | | | | | | | | | This commit replaces the Python implementation of the tokenize module with an implementation that reuses the real C tokenizer via a private extension module. The tokenize module now implements a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward compatibility. As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-103656: Transfer f-string buffers to parser to avoid use-after-free ↵Lysandros Nikolaou2023-04-271-0/+2
| | | | | (GH-103896) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* gh-102856: Initial implementation of PEP 701 (#102855)Pablo Galindo Salgado2023-04-191-4/+12
| | | | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
* gh-100050: Fix an assertion error when raising unclosed parenthesis errors ↵Pablo Galindo Salgado2022-12-061-0/+4
| | | | | in the tokenizer (GH-100065) Automerge-Triggered-By: GH:pablogsal
* gh-97973: Return all necessary information from the tokenizer (GH-97984)Lysandros Nikolaou2022-10-061-3/+2
| | | | | Right now, the tokenizer only returns type and two pointers to the start and end of the token. This PR modifies the tokenizer to return the type and set all of the necessary information, so that the parser does not have to this.
* gh-95876: Fix format string in pegen error location code (#95877)Christian Heimes2022-08-111-1/+1
|
* [3.11] bpo-14916: interactive fd is not tied to stdin [type-bug] (#91469)Paul m. p. Peny2022-07-161-1/+1
| | | | | | | | | | | * bpo-14916: interactive fd is not always stdin related to https://github.com/python/cpython/pull/31006 merged bugfix following https://bugs.python.org/issue14916 * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-94360: Fix a tokenizer crash when reading encoded files with syntax ↵Pablo Galindo Salgado2022-07-051-4/+4
| | | | | | | | | | | errors from stdin (#94386) * gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin Signed-off-by: Pablo Galindo <pablogsal@gmail.com> * nitty nit Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-47117: Don't crash if we fail to decode characters when the tokenizer ↵Pablo Galindo Salgado2022-03-261-2/+7
| | | | | buffers are uninitialized (GH-32129) Automerge-Triggered-By: GH:pablogsal
* Fix the caret position in some syntax errors in interactive mode (GH-30718)Pablo Galindo Salgado2022-01-201-2/+3
|
* bpo-46339: Include clarification on assert in ↵Pablo Galindo Salgado2022-01-181-0/+3
| | | | 'get_error_line_from_tokenizer_buffers' (#30545)
* bpo-46339: Fix crash in the parser when computing error text for multi-line ↵Pablo Galindo Salgado2022-01-111-2/+9
| | | | | f-strings (GH-30529) Automerge-Triggered-By: GH:pablogsal
* bpo-46240: Correct the error for unclosed parentheses when the tokenizer is ↵Pablo Galindo Salgado2022-01-041-1/+2
| | | | not finished (GH-30378)
* bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if ↵Pablo Galindo Salgado2021-11-241-2/+2
| | | | inside parentheses (GH-29757)
* Ensure the str member of the tokenizer is always initialised (GH-29681)Pablo Galindo Salgado2021-11-211-1/+1
|
* Refactor parser compilation units into specific components (GH-29676)Pablo Galindo Salgado2021-11-211-0/+425