Prolog Text palin

/**
* Prolog code for the palindrome without attributes example.
*
* Vanilla DCG formulation:
*
* DCG Vanilla DCG
* --------------------------------
* Head --> Body Head ==> Body
* Non-terminal Non-terminal
* [] []
* [terminal] [Terminal]
* Body, Body Body, Body
* {Body} N/A
* Body; Body N/A
* \+ Body N/A
* Etc.. Etc..
*
* Copyright 2011 XLOG Technologies GmbH, Switzerland
* Jekejeke Prolog 0.9.1 (a fast and small prolog interpreter)
*/

:- sys_op(1200, xfx, ==>).

palin ==> [].
palin ==> [_].
palin ==> [Border], palin, [Border].

Comments