Replies: 3 comments 11 replies
-
Yes, all these syntax errors are expected: 6.3.3.1 Arguments An argument (represented by arg in the syntax rules) occurs as the argument of a compound term or element of a list. It can be an atom which is an operator, or a term with priority not greater than 999. When an argument is an arbitrary term, its priority shall be less than the priority of the ',' (comma) operator so that there is no conflict between comma as an infix operator and comma as an argument or list element separator. We have: ?- current_op(Pri, Fix, ->). Pri = 1050, Fix = xfy. and therefore we write for example: test :- member((Key -> Value), [_]). or consider using a different operator, such as for example ?- current_op(Pri, Fix, -). Pri = 500, Fix = yfx ; Pri = 200, Fix = fy. This is a key advantage of porting |
Beta Was this translation helpful? Give feedback.
-
Another problem appears the line default_set(ws_format_occupied, "▘~w"). were I get
I suspect the |
Beta Was this translation helpful? Give feedback.
-
I would like to expand on syntax errors involving operators with priority greater than that of In the example, we have: ?- T = f(a->b). error(syntax_error(incomplete_reduction),read_term/3:1). Now, why would someone not allow this? It seems clear that only the term Right, and then in later stages of development, I add an argument, and write for example: ?- T = f(a->b, c). Still clear, right? Well, ?- write_canonical((a->b,c)). ->(a,','(b,c)) true. It therefore seems very welcome that the standard prevents this type of mistake. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The following each result in a
error(syntax_error(incomplete_reduction),read_term/3:N)
error when loading.I encountered these constucts while tring to see what it would take to get plwm to run on scryer and swipl appears to accept these while scryer doesn't and I am not sure if this is a deficency in scryer of a deviation from the standard in swipl.
The first I am working around by just removing the parenthesis i.e.
test :- true.
and the second by wrapping the goal in parenthesis i.e.test :- once((a;b)).
, but the third is more difficult as it is used pervasively in the configuration of hooks and keybindings and will be found in user configs.Beta Was this translation helpful? Give feedback.
All reactions