SIGN IN SIGN UP

bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053)

This program can segfault the parser by stack overflow:

```
import ast

code = "f(" + ",".join(['a' for _ in range(100000)]) + ")"
print("Ready!")
ast.parse(code)
```

the reason is that the rule for arguments has a simple recursion when collecting args:

args[expr_ty]:
    [...]
    | a=named_expression b=[',' c=args { c }] {
        [...] }
P
Pablo Galindo committed
4a97b1517a6b5ff22e2984b677a680b07ff0ce11
Parent: 3940333
Committed by GitHub <noreply@github.com> on 9/2/2020, 4:44:19 PM