Skip to content

Should we restrict somehow the nesting? #37

@pablogsal

Description

@pablogsal

When investigating what is the current maximum nesting with the current grammar, I found this:

Figure_1

where test_case is this function:

def test_case(n):
    parser.parse_string("("*n + "1+1" + ")"*n)

This means that the parser will appear to hang if the nesting is >>25 as the timings grow exponentially.

What do you think we should do about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions