GitHub - jldupont/prolog.js: prolog interpreter in javascript | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

jldupont/prolog.js

Repository files navigation

prolog.js

Prolog parser, compiler and interpreter in Javascript

Status

Build Status

Features

  • No server-code required
  • Fact
  • Rule
  • Cut operator !
  • Conjunction , and disjunction ;
  • true and false boolean
  • Operators (for more details, please see lexer.js
    • is
    • +, -, * and / arithmetic operators
    • = unification
    • =:=, =\=, >, <, =< and >= arithmetic operators
    • +, - and not unary operators
  • builtin and user namespaces
    • But no builtin facts or rules are provided out-of-the-box
  • List with | tail operator
  • ?- unary operator
  • fail

?- operator

The query operator is not standard in prolog source code. It is provided as convenience and used in the online demo.

DEMO

The demo can be accessed through here.

Javascript bridge

The compiler can be fed directly with Javascript objects. The classes Functor and Token can be used for this purpose. To understand how to construct "sentences" using these objects, I would encourage looking at the /tests and experimenting with Prolog.parse_per_sentence.

Contact

For more information, please contact Jean-Lou Dupont on G+.

About

prolog interpreter in javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.