Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception parsing query with non-alphanumeric predicate name. #36

Closed
s-webber opened this issue Jun 1, 2014 · 1 comment
Closed

Exception parsing query with non-alphanumeric predicate name. #36

s-webber opened this issue Jun 1, 2014 · 1 comment
Assignees
Labels

Comments

@s-webber
Copy link
Owner

s-webber commented Jun 1, 2014

Current (incorrect) behaviour when the predicate name is the same as an infix operator:

?- X = +(1,1).

Error parsing query:
Expected . but got: ,(1, 1) after: ?-(=(X, +))
?-X = +(1,1).
           ^

Current (incorrect) behaviour when the predicate name is not the same as an infix operator:

?- X = ~(1,1).

Error parsing query:
invalid command: ~(
?-X = ~(1,1).
       ^

Correct behaviour:

?- X = +(1, 1).

X = 1 + 1

yes (0 ms)

Note: it does currently work if the predicate name is quoted (e.g. ?- X = '+'(1,1).).

@s-webber s-webber added the bug label Jun 1, 2014
@s-webber s-webber self-assigned this Jun 1, 2014
@s-webber
Copy link
Owner Author

s-webber commented Jun 1, 2014

Previous commit deals with queries of form ?- X = ~(1,1). (i.e. where predicate name is not also the name of an infix operator).

Reopening as still work required to parse queries like ?- X = +(1,1).

@s-webber s-webber reopened this Jun 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant