13.8. Additional Features of Logikus
At this point, we have covered the fundamentals of logic programming. If you understand structures, variables, facts, and rules, you can create logic programs to model logical problems in the real world. In practice, several other features enhance this modeling, including
Comments
Evaluations
Negation
Anonymous variables
Lists
13.8.1. Comments
The Logikus parser that comes with this book accepts comments in the same format that Java does. A comment that begins with // extends to the end of the line on which it appears. For example, the line
founded(rome, bc750); // according to legend...
provides a comment on the stated fact.
A comment that begins with /* comments out all text until the next */. If there is ...
Get Building Parsers with Java™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.