Skip to content

mhoertnagl/Prolog-Nano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

human(socrates).
human(aristotle).
human(plato).
god(zeus).
god(apollo).
mortal(X) :- human(X).

?- human(socrates)
program : rule+ query+

query : '?-' term '.'

rule : term '.'
     | term :- terms '.'

terms : term
      | term ',' terms

term : PREDICATE '(' terms ')'
     | PREDICATE
     | VARIABLE

This grammar is rather simplistic and allows non-sensical input like A :- a. Or a :- A.

Ressources

About

Super slim Prolog interpreter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages