Comments

Comments in Datalog are either 1) the % character and continue to the end of the line, or 2) C-style with /* to start and */ to end. These correspond to the same rules as Prolog.

comment

comment ::= line-comment | block-comment ;

line-comment

line-comment
        ::= "%" [^\r\n]* EOL ;

block-comment

block-comment
        ::= '/*' ( [^*] | '*'+ [^*/] )* '*'* '*/' ;

Example

% Here's a comment
?- ancestor(xerces, X). % and another
?- ancestor(brooke /* and one inline */, X). % and another