G3Kappa / Ergo

Other
4 stars 0 forks source link

Parsing errors #45

Open G3Kappa opened 1 year ago

G3Kappa commented 1 year ago

Long term issue for all parsing errors. There are currently no outstanding parsing errors to look at.

G3Kappa commented 1 year ago

In

:- use_module(option).

tree(nil, _, _, _).
tree(Node, V, L, R) :-
  named_tuple(Node, node, (Value,Left,Right)),
  named_arg(Value, value, V),
  named_arg(Left, left, L),
  named_arg(Right, right, R),
  tree(L, _, _, _), tree(R, _, _, _).

named_tuple(Node, node, (Value,Left,Right)) is incorrectly parsed as named_tuple(Node, node, Value, Left, Right).

This results in calling the non-existent predicate named_tuple/5

FIXED

G3Kappa commented 1 year ago

Also see #1

G3Kappa commented 1 year ago

image

G3Kappa commented 1 year ago

image

This is also #FIXED. The problem was related to how predicates are pretty-printed, however. The parser gets a gold star.

G3Kappa commented 6 months ago

Parsing a lambda of the form:

[_] >> (term1, term2)

Leads to an infinite loop. This only seems to occur when the body of the lambda is a tuple.