Open danleh opened 6 years ago
Hey! I'm back. :-) Sorry, longest not-seeing-of-an-issue ever. This definitely looks like a bug to me. You're using things correctly. Honestly, an empty list of results should never happen. The disambiguation filters are designed in such a way that they should never eliminate all results unless the grammar itself encodes precedence in an opposite way from the filters (that isn't happening here). I'll look into it.
Given the following test case
where we define a simple grammar with just
Identifier
s and functionApplication
. I intend application to be left-associative and thus writefilter prec(Application)
withBinaryNode
anddef assocLeft: Boolean = true
.The first example works fine, only the left-associative AST is returned. However, in the second example where we use parentheses, an empty list is returned (where we would expect the right-associative AST).
Am I using
filter
and/orBinaryNode
wrong? Or is this a bug?