kdl icon indicating copy to clipboard operation
kdl copied to clipboard

KQL syntax ambiguity

Open lolbinarycat opened this issue 9 months ago • 1 comments

'>' is a valid char for identifiers, so [a>b>c] could be parsed as [prop(a>b>c)] or [prop(a>b) > prop(c)] or [prop(a) > prop(b>c)].

which interpretation is correct?

lolbinarycat avatar May 21 '25 11:05 lolbinarycat

I think the grammar should be modified to require spaces around comparison and decedent operators.

as far as I can tell, any other solution would require unbounded lookahead, due to situations like [a>b>c > d>e>f>g].

lolbinarycat avatar May 21 '25 13:05 lolbinarycat