mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-23 04:31:33 +08:00
Under the old implementation, ``` outer: A [inner] B C inner: B C [inner] ``` wouldn't get detected as the ambiguous grammar that it is, whereas ``` outer: A rest rest: [inner] B C inner: B C [inner] ``` would. This would manifest itself as non-determinism in the DFA state generation. See the discussion #62 on for a full explanation. This modifies the ambiguity detection to work on a broader class of issues, so it should now hopefully detect all cases where the given grammar is ambiguous. At some point, we could extend this logic to allow developers to optionally set precedence of grammar productions, which could resolve ambiguities, but that's not a strict requirement for parsing python.