You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tree-sitter generates GLR parsers, that can parse truly ambiguous languages. Yet, at the moment, I think tree-sitter uses some heuristics to pick a single parse tree. I totally understand that for most practical applications that's what people usually want, but would it be possible to provide an extra API that would return all possible parse trees? Or, at least, return a flag indicating that the returned tree is not the only possible one?
Expected behavior
No response
The text was updated successfully, but these errors were encountered:
Sure, if a grammar is wildly ambiguous, there is a chance of combinatorial explosion. Even though I don't think that's going to be an issue in practice, but yeah, then maybe just returning a flag indicating "we had to guess, another parse trees are possible" would be better performance wise.
Problem
Tree-sitter generates GLR parsers, that can parse truly ambiguous languages. Yet, at the moment, I think tree-sitter uses some heuristics to pick a single parse tree. I totally understand that for most practical applications that's what people usually want, but would it be possible to provide an extra API that would return all possible parse trees? Or, at least, return a flag indicating that the returned tree is not the only possible one?
Expected behavior
No response
The text was updated successfully, but these errors were encountered: