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

Improve term! macro to support extra prolog syntax #5

Open
matko opened this issue Oct 4, 2021 · 2 comments
Open

Improve term! macro to support extra prolog syntax #5

matko opened this issue Oct 4, 2021 · 2 comments

Comments

@matko
Copy link
Collaborator

matko commented Oct 4, 2021

As per #4, currently the term! macro does not support

  • quote notation for atoms
  • cons-list notation (useful for unification with tails)
  • dynamic functor names (useful for runtime predicate definitions)

This should be improved.

@ThePuzzlemaker
Copy link
Contributor

ThePuzzlemaker commented Oct 4, 2021

Another useful addition could be the neck operator :-, conjunction ,, etc. The neck can just be turned into a term as the functor application :-(Head, Body) where Head is a functor before the neck and and Body is the part after. Conjunction is similar, iirc
Though this would probably mean making a full-fledged precedence parser.

@ThePuzzlemaker
Copy link
Contributor

(At that point it may be helpful to consider trying to leverage PL_chars_to_term, perhaps? Then we could replace all unquotes (#foo) as variables then find those variables and unify with the terms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants