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

ISO core standard says atom directly followed by lpar is always compound. #22

Closed
ghost opened this issue Jun 13, 2018 · 2 comments
Closed
Assignees
Labels
bug Bugs iso conforming Issues related to ISO Prolog Conforming

Comments

@ghost
Copy link

ghost commented Jun 13, 2018

In the ISO core standard, when one studies the syntax of a compound, one
finds that a special lpar is used. Basically an atom directly followed by an lpar,
should always lead to compound, even if the atom is an operator. Otherwise

write_canonical wouldn't work, you could not read the result back anymore.
Here you see the expected result in GNU Prolog:

grafik

@ghost
Copy link
Author

ghost commented Jun 13, 2018

Somehow this doesn't work anymore in Tau Prolog. Maybe a result
of the introduction of the (+)/1 operator. Here you see a screenshot,
which if I read it correctly does not give two different results

as GNU Prolog does:

grafik

@ghost
Copy link
Author

ghost commented Jun 13, 2018

The relevant ISO core standard syntax clause is the following.
This assures that write_canonical can always be read back:

6.3.3 Compound terms - functional notation

term = atom, open ct, arg list, close

It uses the "open ct" non-terminal and not the "open" non-terminal. The
"open ct" non-terminal is without layout text sequence in front. So it says
basically atom directly followed by left parenthesis should give compound.

@jariazavalverde jariazavalverde self-assigned this Jun 13, 2018
@jariazavalverde jariazavalverde added bug Bugs iso conforming Issues related to ISO Prolog Conforming labels Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs iso conforming Issues related to ISO Prolog Conforming
Projects
None yet
Development

No branches or pull requests

2 participants