Skip to content
The best Prolog visualizer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gulp
miscellaneous/redirect
resources
src
.gitignore
README.md
firebase.json
gulpfile.js
package.json

README.md

prolog

The best Prolog visualizer http://www.cdglabs.org/prolog

Usage

Grammar

Prolog {
  Program
    = Rule* Query

  Rule  -- a rule
    = Clause ':-' Clauses '.'  -- body
    | Clause '.'               -- noBody

  Query  -- a query
    = Clauses '?'

  Clause  -- a clause
    = symbol '(' Term (',' Term)* ')'  -- args
    | symbol                           -- noArgs

  Clauses
    = Clause (',' Clause)*

  Term
    = Clause
    | List
    | variable

  List
    = '[' ']'           -- empty
    | '[' Contents ']'  -- nonEmpty

  Contents
    = Term ',' Contents  -- cons1
    | Term '|' Term      -- cons2
    | Term               -- single

  variable  -- a variable
    = upper alnum*

  symbol -- a symbol
    = lower alnum*

  tokens
    = (variable | symbol | _)*
}

Credit

Authors:

  • Zhixuan Lai
  • Alessandro Warth

Made possible by:

You can’t perform that action at this time.