This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/manuals/refman/grammar.html
pmoura 9fe4d26c59 Logtalk 2.27.0 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1539 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2006-02-10 17:44:05 +00:00

810 lines
24 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xml+xhtml; charset=utf-8" />
<title>Logtalk: Grammar</title>
<link rel="stylesheet" href="../screen.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="../print.css" type="text/css" media="print"/>
</head>
<body>
<div class="top-left">Logtalk reference manual</div>
<div class="top-right">Grammar</div>
<div class="bottom-left"><span class="page"/></div>
<div class="bottom-right"><span class="page"/></div>
<div class="navtop"><a href="../index.html">contents</a> &gt; <a href="index.html">reference manual</a></div>
<h2>Grammar</h2>
<p>
The Logtalk grammar is here described using Backus-Naur Form syntax. Non-terminal symbols in <i>italics</i> have the definition found in the ISO Prolog Standard. Terminal symbols are represented in a <code>fixed width font</code> and between "".
</p>
<h3>Compilation units<a id="compilation_units"></a></h3>
<blockquote>
<dl>
<dt>entity ::=</dt>
<dd>object |</dd>
<dd>category |</dd>
<dd>protocol</dd>
</dl>
</blockquote>
<h3>Object definition<a id="object_definition"></a></h3>
<blockquote>
<dl>
<dt>object ::=</dt>
<dd>begin_object_directive [object_directives] [clauses] end_object_directive.</dd>
</dl>
<dl>
<dt>begin_object_directive ::=</dt>
<dd>"<code>:- object(</code>" object_identifier [ "<code>,</code>" object_relations] "<code>).</code>"</dd>
</dl>
<dl>
<dt>end_object_directive ::=</dt>
<dd>"<code>:- end_object.</code>"</dd>
</dl>
<dl>
<dt>object_relations ::=</dt>
<dd>prototype_relations |</dd>
<dd>non_prototype_relations</dd>
</dl>
<dl>
<dt>prototype_relations ::=</dt>
<dd>prototype_relation |</dd>
<dd>prototype_relation "<code>,</code>" prototype_relations</dd>
</dl>
<dl>
<dt>prototype_relation ::=</dt>
<dd>implements_protocols |</dd>
<dd>imports_categories |</dd>
<dd>extends_objects</dd>
</dl>
<dl>
<dt>non_prototype_relations ::=</dt>
<dd>non_prototype_relation |</dd>
<dd>non_prototype_relation "<code>,</code>" non_prototype_relations</dd>
</dl>
<dl>
<dt>non_prototype_relation ::=</dt>
<dd>implements_protocols |</dd>
<dd>imports_categories |</dd>
<dd>instantiates_classes |</dd>
<dd>specializes_classes</dd>
</dl>
</blockquote>
<h3>Category definition<a id="category_definition"></a></h3>
<blockquote>
<dl>
<dt>category ::=</dt>
<dd>begin_category_directive [category_directives] [clauses] end_category_directive.</dd>
</dl>
<dl>
<dt>begin_category_directive ::=</dt>
<dd>"<code>:- category(</code>" category_identifier [ "<code>,</code>" category_relations] "<code>).</code>"</dd>
</dl>
<dl>
<dt>end_category_directive ::=</dt>
<dd>"<code>:- end_category.</code>"</dd>
</dl>
<dl>
<dt>category_relations ::=</dt>
<dd>category_relation |</dd>
<dd>category_relation "<code>,</code>" category_relations</dd>
</dl>
<dl>
<dt>category_relation ::=</dt>
<dd>implements_protocols |</dd>
<dd>imports_categories</dd>
</dl>
</blockquote>
<h3>Protocol definition<a id="protocol_definition"></a></h3>
<blockquote>
<dl>
<dt>protocol ::=</dt>
<dd>begin_protocol_directive [protocol_directives] end_protocol_directive.</dd>
</dl>
<dl>
<dt>begin_protocol_directive ::=</dt>
<dd>"<code>:- protocol(</code>" protocol_identifier [ "<code>,</code>" extends_protocols] "<code>).</code>"</dd>
</dl>
<dl>
<dt>end_protocol_directive ::=</dt>
<dd>"<code>:- end_protocol.</code>"</dd>
</dl>
</blockquote>
<h3>Entity relations<a id="entity_relations"></a></h3>
<blockquote>
<dl>
<dt>implements_protocols ::=</dt>
<dd>"<code>implements(</code>" implemented_protocols "<code>)</code>"</dd>
</dl>
<dl>
<dt>extends_protocols ::=</dt>
<dd>"<code>extends(</code>" extended_protocols "<code>)</code>"</dd>
</dl>
<dl>
<dt>imports_categories ::=</dt>
<dd>"<code>imports(</code>" imported_categories "<code>)</code>"</dd>
</dl>
<dl>
<dt>extends_objects ::=</dt>
<dd>"<code>extends(</code>" extended_objects "<code>)</code>"</dd>
</dl>
<dl>
<dt>instantiates_classes ::=</dt>
<dd>"<code>instantiates(</code>" instantiated_objects "<code>)</code>"</dd>
</dl>
<dl>
<dt>specializes_classes ::=</dt>
<dd>"<code>specializes(</code>" specialized_objects "<code>)</code>"</dd>
</dl>
<h4>Implemented protocols<a id="implemented_protocols"></a></h4>
<blockquote>
<dl>
<dt>implemented_protocols ::=</dt>
<dd>implemented_protocol |</dd>
<dd>implemented_protocol_sequence |</dd>
<dd>implemented_protocol_list</dd>
</dl>
<dl>
<dt>implemented_protocol ::=</dt>
<dd>protocol_identifier |</dd>
<dd>scope "<code>::</code>" protocol_identifier</dd>
</dl>
<dl>
<dt>implemented_protocol_sequence ::=</dt>
<dd>implemented_protocol |</dd>
<dd>implemented_protocol "<code>,</code>" implemented_protocol_sequence</dd>
</dl>
<dl>
<dt>implemented_protocol_list ::=</dt>
<dd>"<code>[</code>" implemented_protocol_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Extended protocols<a id="extended_protocols"></a></h4>
<blockquote>
<dl>
<dt>extended_protocols ::=</dt>
<dd>extended_protocol |</dd>
<dd>extended_protocol_sequence |</dd>
<dd>extended_protocol_list</dd>
</dl>
<dl>
<dt>extended_protocol ::=</dt>
<dd>protocol_identifier |</dd>
<dd>scope "<code>::</code>" protocol_identifier</dd>
</dl>
<dl>
<dt>extended_protocol_sequence ::=</dt>
<dd>extended_protocol |</dd>
<dd>extended_protocol "<code>,</code>" extended_protocol_sequence</dd>
</dl>
<dl>
<dt>extended_protocol_list ::=</dt>
<dd>"<code>[</code>" extended_protocol_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Imported categories<a id="imported_categories"></a></h4>
<blockquote>
<dl>
<dt>imported_categories ::=</dt>
<dd>imported_category |</dd>
<dd>imported_category_sequence |</dd>
<dd>imported_category_list</dd>
</dl>
<dl>
<dt>imported_category ::=</dt>
<dd>category_identifier |</dd>
<dd>scope "<code>::</code>" category_identifier</dd>
</dl>
<dl>
<dt>imported_category_sequence ::=</dt>
<dd>imported_category |</dd>
<dd>imported_category "<code>,</code>" imported_category_sequence</dd>
</dl>
<dl>
<dt>imported_category_list ::=</dt>
<dd>"<code>[</code>" imported_category_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Extended objects<a id="extended_objects"></a></h4>
<blockquote>
<dl>
<dt>extended_objects ::=</dt>
<dd>extended_object |</dd>
<dd>extended_object_sequence |</dd>
<dd>extended_object_list</dd>
</dl>
<dl>
<dt>extended_object ::=</dt>
<dd>object_identifier |</dd>
<dd>scope "<code>::</code>" object_identifier</dd>
</dl>
<dl>
<dt>extended_object_sequence ::=</dt>
<dd>extended_object |</dd>
<dd>extended_object "<code>,</code>" extended_object_sequence</dd>
</dl>
<dl>
<dt>extended_object_list ::=</dt>
<dd>"<code>[</code>" extended_object_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Instantiated objects<a id="instantiated_objects"></a></h4>
<blockquote>
<dl>
<dt>instantiated_objects ::=</dt>
<dd>instantiated_object |</dd>
<dd>instantiated_object_sequence |</dd>
<dd>instantiated_object_list</dd>
</dl>
<dl>
<dt>instantiated_object ::=</dt>
<dd>object_identifier |</dd>
<dd>scope "<code>::</code>" object_identifier</dd>
</dl>
<dl>
<dt>instantiated_object_sequence ::=</dt>
<dd>instantiated_object</dd>
<dd>instantiated_object "<code>,</code>" instantiated_object_sequence |</dd>
</dl>
<dl>
<dt>instantiated_object_list ::=</dt>
<dd>"<code>[</code>" instantiated_object_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Specialized objects<a id="specialized_objects"></a></h4>
<blockquote>
<dl>
<dt>specialized_objects ::=</dt>
<dd>specialized_object |</dd>
<dd>specialized_object_sequence |</dd>
<dd>specialized_object_list</dd>
</dl>
<dl>
<dt>specialized_object ::=</dt>
<dd>object_identifier |</dd>
<dd>scope "<code>::</code>" object_identifier</dd>
</dl>
<dl>
<dt>specialized_object_sequence ::=</dt>
<dd>specialized_object |</dd>
<dd>specialized_object "<code>,</code>" specialized_object_sequence</dd>
</dl>
<dl>
<dt>specialized_object_list ::=</dt>
<dd>"<code>[</code>" specialized_object_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Entity scope<a id="scope"></a></h4>
<blockquote>
<dl>
<dt>scope ::=</dt>
<dd>"<code>public</code>" |</dd>
<dd>"<code>protected</code>" |</dd>
<dd>"<code>private</code>"</dd>
</dl>
</blockquote>
</blockquote>
<h3>Entity identifiers<a id="entity_identifiers"></a></h3>
<blockquote>
<dl>
<dt>entity_identifiers ::=</dt>
<dd>entity_identifier |</dd>
<dd>entity_identifier_sequence |</dd>
<dd>entity_identifier_list</dd>
</dl>
<dl>
<dt>entity_identifier ::=</dt>
<dd>object_identifier |</dd>
<dd>protocol_identifier |</dd>
<dd>category_identifier</dd>
</dl>
<dl>
<dt>entity_identifier_sequence ::=</dt>
<dd>entity_identifier |</dd>
<dd>entity_identifier "<code>,</code>" entity_identifier_sequence</dd>
</dl>
<dl>
<dt>entity_identifier_list ::=</dt>
<dd>"<code>[</code>" entity_identifier_sequence "<code>]</code>"</dd>
</dl>
<h4>Object identifiers<a id="object_identifiers"></a></h4>
<blockquote>
<dl>
<dt>object_identifiers ::=</dt>
<dd>object_identifier |</dd>
<dd>object_identifier_sequence |</dd>
<dd>object_identifier_list</dd>
</dl>
<dl>
<dt>object_identifier ::=</dt>
<dd><i>atom</i> |</dd>
<dd><i>compound</i></dd>
</dl>
<dl>
<dt>object_identifier_sequence ::=</dt>
<dd>object_identifier |</dd>
<dd>object_identifier "<code>,</code>" object_identifier_sequence</dd>
</dl>
<dl>
<dt>object_identifier_list ::=</dt>
<dd>"<code>[</code>" object_identifier_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Category identifiers<a id="category_identifiers"></a></h4>
<blockquote>
<dl>
<dt>category_identifiers ::=</dt>
<dd>category_identifier |</dd>
<dd>category_identifier_sequence |</dd>
<dd>category_identifier_list</dd>
</dl>
<dl>
<dt>category_identifier ::=</dt>
<dd><i>atom</i></dd>
</dl>
<dl>
<dt>category_identifier_sequence ::=</dt>
<dd>category_identifier |</dd>
<dd>category_identifier "<code>,</code>" category_identifier_sequence</dd>
</dl>
<dl>
<dt>category_identifier_list ::=</dt>
<dd>"<code>[</code>" category_identifier_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h4>Protocol identifiers<a id="protocol_identifiers"></a></h4>
<blockquote>
<dl>
<dt>protocol_identifiers ::=</dt>
<dd>protocol_identifier |</dd>
<dd>protocol_identifier_sequence |</dd>
<dd>protocol_identifier_list</dd>
</dl>
<dl>
<dt>protocol_identifier ::=</dt>
<dd><i>atom</i></dd>
</dl>
<dl>
<dt>protocol_identifier_sequence ::=</dt>
<dd>protocol_identifier |</dd>
<dd>protocol_identifier "<code>,</code>" protocol_identifier_sequence</dd>
</dl>
<dl>
<dt>protocol_identifier_list ::=</dt>
<dd>"<code>[</code>" protocol_identifier_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
</blockquote>
<h3>Source file names<a id="source_file_names"></a></h3>
<blockquote>
<dl>
<dt>source_file_names ::=</dt>
<dd>source_file_name |</dd>
<dd>source_file_name_list</dd>
</dl>
<dl>
<dt>source_file_name ::=</dt>
<dd><em>atom</em> |</dd>
<dd>library_source_file_name</dd>
</dl>
<dl>
<dt>library_source_file_name ::=</dt>
<dd>library_name "<code>(</code>" <em>atom</em> "<code>)</code>"</dd>
</dl>
<dl>
<dt>library_name ::=</dt>
<dd><em>atom</em></dd>
</dl>
<dl>
<dt>source_file_name_sequence ::=</dt>
<dd>source_file_name |</dd>
<dd>source_file_name "<code>,</code>" source_file_name_sequence</dd>
</dl>
<dl>
<dt>source_file_name_list ::=</dt>
<dd>"<code>[</code>" source_file_name_sequence "<code>]</code>"</dd>
</dl>
</blockquote>
<h3>Directives<a id="directives"></a></h3>
<blockquote>
<h4>Source file directives<a id="source_file_directives"></a></h4>
<blockquote>
<dl>
<dt>source_file_directives ::=</dt>
<dd>source_file_directive |</dd>
<dd>source_file_directive source_file_directives</dd>
</dl>
<dl>
<dt>source_file_directive ::=</dt>
<dd>"<code>:- encoding(</code>" <i>atom</i> "<code>).</code>" |</dd>
<dd><i>initialization_directive</i> |</dd>
<dd><i>operator_directive</i></dd>
</dl>
</blockquote>
<h4>Object directives<a id="object_directives"></a></h4>
<blockquote>
<dl>
<dt>object_directives ::=</dt>
<dd>object_directive |</dd>
<dd>object_directive object_directives</dd>
</dl>
<dl>
<dt>object_directive ::=</dt>
<dd><i>initialization_directive</i> |</dd>
<dd>"<code>:- uses(</code>" object_identifier "<code>).</code>" |</dd>
<dd>"<code>:- calls(</code>" protocol_identifiers "<code>).</code>" |</dd>
<dd>"<code>:- dynamic.</code>" |</dd>
<dd>"<code>:- info(</code>" info_list "<code>).</code>" |</dd>
<dd>predicate_directives</dd>
</dl>
</blockquote>
<h4>Category directives<a id="category_directives"></a></h4>
<blockquote>
<dl>
<dt>category_directives ::=</dt>
<dd>category_directive |</dd>
<dd>category_directive category_directives</dd>
</dl>
<dl>
<dt>category_directive ::=</dt>
<dd><i>initialization_directive</i> |</dd>
<dd>"<code>:- uses(</code>" object_identifier "<code>).</code>" |</dd>
<dd>"<code>:- calls(</code>" protocol_identifiers "<code>).</code>" |</dd>
<dd>"<code>:- dynamic.</code>" |</dd>
<dd>"<code>:- info(</code>" info_list "<code>).</code>" |</dd>
<dd>predicate_directives</dd>
</dl>
</blockquote>
<h4>Protocol directives<a id="protocol_directives"></a></h4>
<blockquote>
<dl>
<dt>protocol_directives ::=</dt>
<dd>protocol_directive |</dd>
<dd>protocol_directive protocol_directives</dd>
</dl>
<dl>
<dt>protocol_directive ::=</dt>
<dd><i>initialization_directive</i> |</dd>
<dd>"<code>:- dynamic.</code>" |</dd>
<dd>"<code>:- info(</code>" info_list "<code>).</code>" |</dd>
<dd>predicate_directives</dd>
</dl>
</blockquote>
<h4>Predicate directives<a id="predicate_directives"></a></h4>
<blockquote>
<dl>
<dt>predicate_directives ::=</dt>
<dd>predicate_directive |</dd>
<dd>predicate_directive predicate_directives</dd>
</dl>
<dl>
<dt>predicate_directive ::=</dt>
<dd>alias_directive |</dd>
<dd>uses_directive |</dd>
<dd>scope_directive |</dd>
<dd>mode_directive |</dd>
<dd>metapredicate_directive |</dd>
<dd>info_directive |</dd>
<dd>dynamic_directive |</dd>
<dd>discontiguous_directive</dd>
<dd><i>operator_directive</i> |</dd>
</dl>
<dl>
<dt>alias_directive ::=</dt>
<dd>"<code>:- alias(</code>" entity_identifier "<code>,</code>" predicate_indicator "<code>,</code>" predicate_indicator "<code>).</code>" |</dd>
<dd>"<code>:- alias(</code>" entity_identifier "<code>,</code>" non_terminal_indicator "<code>,</code>" non_terminal_indicator "<code>).</code>"</dd>
</dl>
<dl>
<dt>uses_directive ::=</dt>
<dd>"<code>:- uses(</code>" object_identifier "<code>,</code>" predicate_indicator_alias_list "<code>).</code>"</dd>
</dl>
<dl>
<dt>scope_directive ::=</dt>
<dd>"<code>:- public(</code>" predicate_indicator_term | non_terminal_indicator_term "<code>).</code>" |</dd>
<dd>"<code>:- protected(</code>" predicate_indicator_term | non_terminal_indicator_term "<code>).</code>" |</dd>
<dd>"<code>:- private(</code>" predicate_indicator_term | non_terminal_indicator_term "<code>).</code>"</dd>
</dl>
<dl>
<dt>mode_directive ::=</dt>
<dd>"<code>:- mode(</code>" predicate_mode_term | non_terminal_mode_term "<code>,</code>" number_of_solutions "<code>).</code>"</dd>
</dl>
<dl>
<dt>metapredicate_directive ::=</dt>
<dd>"<code>:- metapredicate(</code>" metapredicate_mode_indicator "<code>).</code>"</dd>
</dl>
<dl>
<dt>info_directive ::=</dt>
<dd>"<code>:- info(</code>" predicate_indicator | non_terminal_indicator "<code>,</code>" info_list "<code>).</code>"</dd>
</dl>
<dl>
<dt>dynamic_directive ::=</dt>
<dd>"<code>:- dynamic(</code>" predicate_indicator_term | non_terminal_indicator_term "<code>).</code>" |</dd>
</dl>
<dl>
<dt>discontiguous_directive ::=</dt>
<dd>"<code>:- discontiguous(</code>" predicate_indicator_term | non_terminal_indicator_term "<code>).</code>" |</dd>
</dl>
<dl>
<dt>predicate_indicator_term ::=</dt>
<dd><i>predicate_indicator</i> |</dd>
<dd>predicate_indicator_sequence |</dd>
<dd>predicate_indicator_list</dd>
</dl>
<dl>
<dt>predicate_indicator_sequence ::=</dt>
<dd><i>predicate_indicator</i> |</dd>
<dd><i>predicate_indicator</i> "<code>,</code>" predicate_indicator_sequence</dd>
</dl>
<dl>
<dt>predicate_indicator_list ::=</dt>
<dd>"<code>[</code>" predicate_indicator_sequence "<code>]</code>"</dd>
</dl>
<dl>
<dt>predicate_indicator_alias ::=</dt>
<dd><i>predicate_indicator</i> |</dd>
<dd><i>predicate_indicator</i> "<code>::</code>" <i>predicate_indicator</i></dd>
</dl>
<dl>
<dt>predicate_indicator_alias_sequence ::=</dt>
<dd>predicate_indicator_alias |</dd>
<dd>predicate_indicator_alias "<code>,</code>" predicate_indicator_alias_sequence</dd>
</dl>
<dl>
<dt>predicate_indicator_alias_list ::=</dt>
<dd>"<code>[</code>" predicate_indicator_alias_sequence "<code>]</code>"</dd>
</dl>
<dl>
<dt>non_terminal_indicator_term ::=</dt>
<dd>non_terminal_indicator |</dd>
<dd>non_terminal_indicator_sequence |</dd>
<dd>non_terminal_indicator_list</dd>
</dl>
<dl>
<dt>non_terminal_indicator_sequence ::=</dt>
<dd>non_terminal_indicator |</dd>
<dd>non_terminal_indicator "<code>,</code>" non_terminal_indicator_sequence</dd>
</dl>
<dl>
<dt>non_terminal_indicator_list ::=</dt>
<dd>"<code>[</code>" non_terminal_indicator_sequence "<code>]</code>"</dd>
</dl>
<dl>
<dt>non_terminal_indicator ::=</dt>
<dd><i>functor</i> "<code>//</code>" <i>arity</i></dd>
</dl>
<dl>
<dt>predicate_mode_term ::=</dt>
<dd><i>atom</i> "<code>(</code>" mode_terms "<code>)</code>"</dd>
</dl>
<dl>
<dt>non_terminal_mode_term ::=</dt>
<dd><i>atom</i> "<code>(</code>" mode_terms "<code>)</code>"</dd>
</dl>
<dl>
<dt>mode_terms ::=</dt>
<dd>mode_term |</dd>
<dd>mode_term "<code>,</code>" mode_terms</dd>
</dl>
<dl>
<dt>mode_term ::=</dt>
<dd>"<code>@</code>" [type] | "<code>+</code>" [type] | "<code>-</code>" [type] | "<code>?</code>" [type]</dd>
</dl>
<dl>
<dt>metapredicate_mode_indicator ::=</dt>
<dd><i>atom</i> "<code>(</code>" metapredicate_terms "<code>)</code>"</dd>
</dl>
<dl>
<dt>metapredicate_terms ::=</dt>
<dd>metapredicate_term |</dd>
<dd>metapredicate_term "<code>,</code>" metapredicate_terms</dd>
</dl>
<dl>
<dt>metapredicate_term ::=</dt>
<dd>"<code>::</code>" | "<code>*</code>"</dd>
</dl>
<dl>
<dt>type ::=</dt>
<dd>prolog_type | logtalk_type | user_defined_type</dd>
</dl>
<dl>
<dt>prolog_type ::=</dt>
<dd>"<code>term</code>" | "<code>nonvar</code>" | "<code>var</code>" |</dd>
<dd>"<code>compound</code>" | "<code>ground</code>" | "<code>callable</code>" | "<code>list</code>" |</dd>
<dd>"<code>atomic</code>" | "<code>atom</code>" |</dd>
<dd>"<code>number</code>" | "<code>integer</code>" | "<code>float</code>"</dd>
</dl>
<dl>
<dt>logtalk_type ::=</dt>
<dd>"<code>object</code>" | "<code>category</code>" | "<code>protocol</code>" |</dd>
<dd>"<code>event</code>"</dd>
</dl>
<dl>
<dt>user_defined_type ::=</dt>
<dd><i>atom</i> |</dd>
<dd><i>compound</i></dd>
</dl>
<dl>
<dt>number_of_solutions ::=</dt>
<dd>"<code>zero</code>" | "<code>zero_or_one</code>" | "<code>zero_or_more</code>" | "<code>one</code>" | "<code>one_or_more</code>" | "<code>error</code>"</dd>
</dl>
<dl>
<dt>info_list ::=</dt>
<dd>"<code>[]</code>" |</dd>
<dd>"<code>[</code>" info_item "<code>is</code>" <i>nonvar</i> "<code>|</code>" info_list "<code>]</code>"</dd>
</dl>
<dl>
<dt>info_item ::=</dt>
<dd>"<code>comment</code>" | "<code>remarks</code>" | </dd>
<dd>"<code>author</code>" | "<code>version</code>" | "<code>date</code>" | </dd>
<dd>"<code>parameters</code>" | "<code>parnames</code>" | </dd>
<dd>"<code>arguments</code>" | "<code>argnames</code>" | </dd>
<dd>"<code>definition</code>" | "<code>redefinition</code>" | "<code>allocation</code>" |</dd>
<dd>"<code>examples</code>" | "<code>exceptions</code>" | </dd>
<dd><i>atom</i></dd>
</dl>
</blockquote>
</blockquote>
<h3>Clauses and goals<a id="clauses"></a></h3>
<blockquote>
<dl>
<dt>goal ::=</dt>
<dd><i>callable</i> |</dd>
<dd>message_call |</dd>
<dd>external_call |</dd>
</dl>
<dl>
<dt>message_call ::=</dt>
<dd>message_to_object |</dd>
<dd>message_to_self |</dd>
<dd>message_to_super</dd>
</dl>
<dl>
<dt>message_to_object ::=</dt>
<dd>receivers "<code>::</code>" messages</dd>
</dl>
<dl>
<dt>message_to_self ::=</dt>
<dd>"<code>::</code>" messages</dd>
</dl>
<dl>
<dt>message_to_super ::=</dt>
<dd>"<code>^^</code>" message</dd>
</dl>
<dl>
<dt>messages ::=</dt>
<dd>message |</dd>
<dd>"<code>(</code>" message "<code>,</code>" messages "<code>)</code>" |</dd>
<dd>"<code>(</code>" message "<code>;</code>" messages "<code>)</code>"</dd>
</dl>
<dl>
<dt>message ::=</dt>
<dd><i>callable</i> |</dd>
<dd><i>variable</i></dd>
</dl>
<dl>
<dt>receivers ::=</dt>
<dd>receiver |</dd>
<dd>"<code>(</code>" receiver "<code>,</code>" receivers "<code>)</code>" |</dd>
<dd>"<code>(</code>" receiver "<code>;</code>" receivers "<code>)</code>"</dd>
</dl>
<dl>
<dt>receiver ::=</dt>
<dd>object_identifier |</dd>
<dd><i>variable</i></dd>
</dl>
<dl>
<dt>external_call ::=</dt>
<dd>"<code>{</code>" <i>callable</i> "<code>}</code>"</dd>
</dl>
</blockquote>
<h3>Entity properties<a id="entity_properties"></a></h3>
<blockquote>
<dl>
<dt>category_property ::=</dt>
<dd>"<code>static</code>" |</dd>
<dd>"<code>dynamic</code>" |</dd>
<dd>"<code>built_in</code>"</dd>
</dl>
<dl>
<dt>object_property ::=</dt>
<dd>"<code>static</code>" |</dd>
<dd>"<code>dynamic</code>" |</dd>
<dd>"<code>built_in</code>"</dd>
</dl>
<dl>
<dt>protocol_property ::=</dt>
<dd>"<code>static</code>" |</dd>
<dd>"<code>dynamic</code>" |</dd>
<dd>"<code>built_in</code>"</dd>
</dl>
</blockquote>
<h3>Predicate properties<a id="predicate_properties"></a></h3>
<blockquote>
<dl>
<dt>predicate_property ::=</dt>
<dd>"<code>static</code>" |</dd>
<dd>"<code>dynamic</code>" |</dd>
<dd>"<code>private</code>" |</dd>
<dd>"<code>protected</code>" |</dd>
<dd>"<code>public</code>" |</dd>
<dd>"<code>built_in</code>" |</dd>
<dd>"<code>declared_in(</code>" entity_identifier "<code>)</code>" |</dd>
<dd>"<code>defined_in(</code>" object_identifier | category_identifier "<code>)</code>" |</dd>
<dd>"<code>metapredicate(</code>" metapredicate_mode_indicator "<code>)</code>" |</dd>
<dd>"<code>alias(</code>" callable "<code>)</code>" |</dd>
<dd>"<code>non_terminal(</code>" non_terminal_indicator "<code>)</code>"</dd>
</dl>
</blockquote>
<div class="navbottom">
<a href="index.html">previous</a> | <a href="../glossary.html">glossary</a> | <a href="index.html">next</a>
</div>
<div class="copyright">
Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a href="http://www.logtalk.org">Logtalk.org</a>
</div>
<div class="footer">
<p><span class="validators"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="date">Last updated on: January 29, 2006</span></p>
</div>
</body>
</html>