New submission from Batuhan Taskaya <isidenti...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41044>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to