[New-bugs-announce] [issue41044] Pegen: double trailing comma on optional+sequence rules at python generator

Batuhan Taskaya report at bugs.python.org
Fri Jun 19 18:57:19 EDT 2020


New submission from Batuhan Taskaya <isidentical at gmail.com>:

Python generator generates two trailing commas instead of one when both repeat0 (*) + optional ([]) qualifiers used. Example failing test (raises a SyntaxError, since the generated parser can't be parseable / executable)

    def test_opt_sequence(self) -> None:
        grammar = """
        start: [NAME*]
        """
        # This case was failing because of double trailing comma at the end
        # of the generated parser. See bpo-
        make_parser(grammar)

----------
messages: 371908
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Pegen: double trailing comma on optional+sequence rules at python generator

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41044>
_______________________________________


More information about the New-bugs-announce mailing list