Closed s-webber closed 1 year ago
Projog does not correctly parse infix operands that have xfy associativity. It parses them the same as infix operators that have yfx associativity.
xfy
yfx
Below are examples of how Projog currently parse yfx and xfy operators and how xfy operators should be parsed:
Current correct behaviour parsing +/2 (which has yfx associativity):
+/2
?- write_canonical((a+b+c)). +(+(a, b), c)
Current incorrect behaviour when parsing ,/2 and ;/2 (which both have xfy associativity):
,/2
;/2
?- write_canonical((a,b,c)). ,(,(a, b), c) ?- write_canonical((a;b;c)). ;(;(a, b), c)
Expected behaviour when parsing ,/2 and ;/2 (which both have xfy associativity):
?- write_canonical((a,b,c)). ,(a, ,(b, c)) ?- write_canonical((a;b;c)). ;(a, ;(b, c))
Projog does not correctly parse infix operands that have
xfy
associativity. It parses them the same as infix operators that haveyfx
associativity.Below are examples of how Projog currently parse
yfx
andxfy
operators and howxfy
operators should be parsed:Current correct behaviour parsing
+/2
(which hasyfx
associativity):Current incorrect behaviour when parsing
,/2
and;/2
(which both havexfy
associativity):Expected behaviour when parsing
,/2
and;/2
(which both havexfy
associativity):