2006-02-10 17:44:05 +00:00
<?xml version="1.0" encoding="utf-8"?>
2005-12-24 18:00:21 +00:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2001-06-06 20:40:57 +01:00
2005-12-24 18:00:21 +00:00
< html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" >
2002-08-01 00:34:42 +01:00
2005-12-24 18:00:21 +00:00
< head >
2006-02-10 17:44:05 +00:00
< meta http-equiv = "content-type" content = "application/xml+xhtml; charset=utf-8" / >
2005-12-24 18:00:21 +00:00
< 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 >
2001-06-06 20:40:57 +01:00
< body >
2005-12-24 18:00:21 +00:00
< 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 > > < a href = "index.html" > reference manual< / a > < / div >
2003-12-30 13:33:51 +00:00
2006-11-07 17:11:47 +00:00
< h1 > Grammar< span id = "grammar_grammar" / > < / h1 >
2001-06-06 20:40:57 +01:00
< p >
2005-12-24 18:00:21 +00:00
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 "".
2001-06-06 20:40:57 +01:00
< / p >
2006-11-07 17:11:47 +00:00
< h2 > Compilation units< span id = "grammar_compilation_units" / > < / h2 >
2001-06-06 20:40:57 +01:00
< dl >
< dt > entity ::=< / dt >
< dd > object |< / dd >
< dd > category |< / dd >
< dd > protocol< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
< h2 > Object definition< span id = "grammar_object_definition" / > < / h2 >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h2 > Category definition< span id = "grammar_category_definition" / > < / h2 >
2001-06-06 20:40:57 +01:00
< dl >
< dt > category ::=< / dt >
< dd > begin_category_directive [category_directives] [clauses] end_category_directive.< / dd >
< / dl >
< dl >
< dt > begin_category_directive ::=< / dt >
2005-08-08 13:13:45 +01:00
< dd > "< code > :- category(< / code > " category_identifier [ "< code > ,< / code > " category_relations] "< code > ).< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
< dt > end_category_directive ::=< / dt >
< dd > "< code > :- end_category.< / code > "< / dd >
< / dl >
2005-08-08 13:13:45 +01:00
< 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 >
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h2 > Protocol definition< span id = "grammar_protocol_definition" / > < / h2 >
2001-06-06 20:40:57 +01:00
< 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 >
2002-08-26 17:45:50 +01:00
< dd > "< code > :- end_protocol.< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
2006-11-07 17:11:47 +00:00
< h2 > Entity relations< span id = "grammar_entity_relations" / > < / h2 >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h3 > Implemented protocols< span id = "grammar_implemented_protocols" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " protocol_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Extended protocols< span id = "grammar_extended_protocols" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " protocol_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Imported categories< span id = "grammar_imported_categories" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " category_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Extended objects< span id = "grammar_extended_objects" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " object_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Instantiated objects< span id = "grammar_instantiated_objects" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " object_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Specialized objects< span id = "grammar_specialized_objects" / > < / h3 >
2001-06-06 20:40:57 +01:00
< 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 >
2001-12-05 23:57:48 +00:00
< dd > scope "< code > ::< / code > " object_identifier< / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h3 > Entity scope< span id = "grammar_scope" / > < / h3 >
2001-06-06 20:40:57 +01:00
< dl >
2001-12-05 23:57:48 +00:00
< dt > scope ::=< / dt >
2001-06-06 20:40:57 +01:00
< dd > "< code > public< / code > " |< / dd >
< dd > "< code > protected< / code > " |< / dd >
< dd > "< code > private< / code > "< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h2 > Entity identifiers< span id = "grammar_entity_identifiers" / > < / h2 >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h3 > Object identifiers< span id = "grammar_object_identifiers" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h3 > Category identifiers< span id = "grammar_category_identifiers" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h3 > Protocol identifiers< span id = "grammar_protocol_identifiers" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h2 > Source file names< span id = "grammar_source_file_names" / > < / h2 >
2001-06-06 20:40:57 +01:00
2004-11-29 20:36:31 +00:00
< dl >
2005-05-24 00:33:41 +01:00
< dt > source_file_names ::=< / dt >
< dd > source_file_name |< / dd >
< dd > source_file_name_list< / dd >
2004-11-29 20:36:31 +00:00
< / dl >
< dl >
2005-05-24 00:33:41 +01:00
< dt > source_file_name ::=< / dt >
2004-11-29 20:36:31 +00:00
< dd > < em > atom< / em > |< / dd >
2005-05-24 00:33:41 +01:00
< dd > library_source_file_name< / dd >
2004-11-29 20:36:31 +00:00
< / dl >
< dl >
2005-05-24 00:33:41 +01:00
< dt > library_source_file_name ::=< / dt >
2004-11-29 20:36:31 +00:00
< dd > library_name "< code > (< / code > " < em > atom< / em > "< code > )< / code > "< / dd >
< / dl >
< dl >
< dt > library_name ::=< / dt >
< dd > < em > atom< / em > < / dd >
< / dl >
< dl >
2005-05-24 00:33:41 +01:00
< dt > source_file_name_sequence ::=< / dt >
< dd > source_file_name |< / dd >
< dd > source_file_name "< code > ,< / code > " source_file_name_sequence< / dd >
2004-11-29 20:36:31 +00:00
< / dl >
< dl >
2005-05-24 00:33:41 +01:00
< dt > source_file_name_list ::=< / dt >
< dd > "< code > [< / code > " source_file_name_sequence "< code > ]< / code > "< / dd >
2004-11-29 20:36:31 +00:00
< / dl >
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h2 > Directives< span id = "grammar_directives" / > < / h2 >
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h3 > Source file directives< span id = "grammar_source_file_directives" / > < / h3 >
< dl >
2005-05-24 00:33:41 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< h3 > Object directives< span id = "grammar_object_directives" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< dt > object_directives ::=< / dt >
< dd > object_directive |< / dd >
< dd > object_directive object_directives< / dd >
< / dl >
< dl >
< dt > object_directive ::=< / dt >
2005-05-24 00:33:41 +01:00
< dd > < i > initialization_directive< / i > |< / dd >
2006-11-07 17:11:47 +00:00
< dd > "< code > :- threaded.< / code > " |< / dd >
2006-12-28 13:03:34 +00:00
< dd > "< code > :- synchronized.< / code > " |< / dd >
2006-11-07 17:11:47 +00:00
< dd > "< code > :- dynamic.< / code > " |< / dd >
2004-08-16 17:41:11 +01:00
< dd > "< code > :- uses(< / code > " object_identifier "< code > ).< / code > " |< / dd >
2001-06-06 20:40:57 +01:00
< dd > "< code > :- calls(< / code > " protocol_identifiers "< code > ).< / code > " |< / dd >
< dd > "< code > :- info(< / code > " info_list "< code > ).< / code > " |< / dd >
< dd > predicate_directives< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
< h3 > Category directives< span id = "grammar_category_directives" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< dt > category_directives ::=< / dt >
< dd > category_directive |< / dd >
< dd > category_directive category_directives< / dd >
< / dl >
< dl >
< dt > category_directive ::=< / dt >
2005-05-24 00:33:41 +01:00
< dd > < i > initialization_directive< / i > |< / dd >
2006-12-28 13:03:34 +00:00
< dd > "< code > :- synchronized.< / code > " |< / dd >
< dd > "< code > :- dynamic.< / code > " |< / dd >
2004-08-16 17:41:11 +01:00
< dd > "< code > :- uses(< / code > " object_identifier "< code > ).< / code > " |< / dd >
2001-06-06 20:40:57 +01:00
< dd > "< code > :- calls(< / code > " protocol_identifiers "< code > ).< / code > " |< / dd >
< dd > "< code > :- info(< / code > " info_list "< code > ).< / code > " |< / dd >
< dd > predicate_directives< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
< h3 > Protocol directives< span id = "grammar_protocol_directives" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< dt > protocol_directives ::=< / dt >
< dd > protocol_directive |< / dd >
< dd > protocol_directive protocol_directives< / dd >
< / dl >
< dl >
< dt > protocol_directive ::=< / dt >
2005-05-24 00:33:41 +01:00
< dd > < i > initialization_directive< / i > |< / dd >
2001-06-06 20:40:57 +01:00
< dd > "< code > :- dynamic.< / code > " |< / dd >
< dd > "< code > :- info(< / code > " info_list "< code > ).< / code > " |< / dd >
< dd > predicate_directives< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
< h3 > Predicate directives< span id = "grammar_predicate_directives" / > < / h3 >
< dl >
2001-06-06 20:40:57 +01:00
< dt > predicate_directives ::=< / dt >
< dd > predicate_directive |< / dd >
< dd > predicate_directive predicate_directives< / dd >
< / dl >
< dl >
< dt > predicate_directive ::=< / dt >
2004-09-15 00:11:12 +01:00
< dd > alias_directive |< / dd >
2006-12-28 13:03:34 +00:00
< dd > synchronized_directive |< / dd >
2004-09-15 00:11:12 +01:00
< dd > uses_directive |< / dd >
2001-06-06 20:40:57 +01:00
< dd > scope_directive |< / dd >
< dd > mode_directive |< / dd >
2006-11-07 17:11:47 +00:00
< dd > meta_predicate_directive |< / dd >
2001-06-06 20:40:57 +01:00
< dd > info_directive |< / dd >
2004-10-17 23:37:16 +01:00
< dd > dynamic_directive |< / dd >
2006-11-07 17:11:47 +00:00
< dd > discontiguous_directive |< / dd >
< dd > < i > operator_directive< / i > < / dd >
2001-06-06 20:40:57 +01:00
< / dl >
2004-09-15 00:11:12 +01:00
< dl >
< dt > alias_directive ::=< / dt >
2006-02-10 17:44:05 +00:00
< 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 >
2004-09-15 00:11:12 +01:00
< / dl >
2006-11-07 17:11:47 +00:00
< dl >
2006-12-28 13:03:34 +00:00
< dt > synchronized_directive ::=< / dt >
< dd > "< code > :- synchronized(< / code > " predicate_indicator "< code > ).< / code > " |< / dd >
< dd > "< code > :- synchronized(< / code > " non_terminal_indicator "< code > ).< / code > "< / dd >
2006-11-07 17:11:47 +00:00
< / dl >
2004-09-15 00:11:12 +01:00
< dl >
< dt > uses_directive ::=< / dt >
2005-12-24 18:00:21 +00:00
< dd > "< code > :- uses(< / code > " object_identifier "< code > ,< / code > " predicate_indicator_alias_list "< code > ).< / code > "< / dd >
2004-09-15 00:11:12 +01:00
< / dl >
2001-06-06 20:40:57 +01:00
< dl >
< dt > scope_directive ::=< / dt >
2004-10-17 23:37:16 +01:00
< 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 >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
< dt > mode_directive ::=< / dt >
2005-08-08 13:13:45 +01:00
< dd > "< code > :- mode(< / code > " predicate_mode_term | non_terminal_mode_term "< code > ,< / code > " number_of_solutions "< code > ).< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
2006-11-07 17:11:47 +00:00
< dt > meta_predicate_directive ::=< / dt >
< dd > "< code > :- meta_predicate(< / code > " meta_predicate_mode_indicator "< code > ).< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
< dt > info_directive ::=< / dt >
2006-02-10 17:44:05 +00:00
< dd > "< code > :- info(< / code > " predicate_indicator | non_terminal_indicator "< code > ,< / code > " info_list "< code > ).< / code > "< / dd >
2004-10-17 23:37:16 +01:00
< / 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 >
2001-06-06 20:40:57 +01:00
< / dl >
2006-11-07 17:11:47 +00:00
< dl >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< dl >
2005-12-24 18:00:21 +00:00
< 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 >
2006-11-07 17:11:47 +00:00
< dl >
2004-10-17 23:37:16 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< dl >
2001-06-06 20:40:57 +01:00
< dt > predicate_mode_term ::=< / dt >
< dd > < i > atom< / i > "< code > (< / code > " mode_terms "< code > )< / code > "< / dd >
< / dl >
2005-08-08 13:13:45 +01:00
< dl >
< dt > non_terminal_mode_term ::=< / dt >
< dd > < i > atom< / i > "< code > (< / code > " mode_terms "< code > )< / code > "< / dd >
< / dl >
2001-06-06 20:40:57 +01:00
< 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 > 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 >
2006-11-07 17:11:47 +00:00
< / dl >
< dl >
< dt > meta_predicate_mode_indicator ::=< span id = "grammar_meta_predicate_mode_indicator" / > < / dt >
< dd > < i > atom< / i > "< code > (< / code > " meta_predicate_terms "< code > )< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
2006-11-07 17:11:47 +00:00
< dt > meta_predicate_terms ::=< span id = "grammar_meta_predicate_terms" / > < / dt >
< dd > meta_predicate_term |< / dd >
< dd > meta_predicate_term "< code > ,< / code > " meta_predicate_terms< / dd >
< / dl >
< dl >
< dt > meta_predicate_term ::=< / dt >
< dd > "< code > ::< / code > " | "< code > *< / code > " | < i > integer< / i > < / dd >
< / dl >
< dl >
2001-06-06 20:40:57 +01:00
< 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 >
2005-12-24 18:00:21 +00:00
< dd > "< code > comment< / code > " | "< code > remarks< / code > " | < / dd >
< dd > "< code > author< / code > " | "< code > version< / code > " | "< code > date< / code > " | < / dd >
2006-11-07 17:11:47 +00:00
< dd > "< code > copyright< / code > " | "< code > license< / code > " | < / dd >
2005-12-24 18:00:21 +00:00
< dd > "< code > parameters< / code > " | "< code > parnames< / code > " | < / dd >
< dd > "< code > arguments< / code > " | "< code > argnames< / code > " | < / dd >
2004-06-13 19:04:28 +01:00
< dd > "< code > definition< / code > " | "< code > redefinition< / code > " | "< code > allocation< / code > " |< / dd >
2005-12-24 18:00:21 +00:00
< dd > "< code > examples< / code > " | "< code > exceptions< / code > " | < / dd >
2001-06-06 20:40:57 +01:00
< dd > < i > atom< / i > < / dd >
< / dl >
2006-11-07 17:11:47 +00:00
2001-06-06 20:40:57 +01:00
2006-11-07 17:11:47 +00:00
< h2 > Clauses and goals< span id = "grammar_clauses" / > < / h2 >
2001-06-06 20:40:57 +01:00
< dl >
< dt > goal ::=< / dt >
< dd > message_call |< / dd >
< dd > external_call |< / dd >
2006-11-07 17:11:47 +00:00
< dd > < i > callable< / i > < / dd >
2001-06-06 20:40:57 +01:00
< / 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 >
2006-11-07 17:11:47 +00:00
< h2 > Entity properties< span id = "grammar_entity_properties" / > < / h2 >
2001-06-06 20:40:57 +01:00
< dl >
2006-11-07 17:11:47 +00:00
< dt > category_property ::=< span id = "grammar_category_property" / > < / dt >
2001-06-06 20:40:57 +01:00
< dd > "< code > static< / code > " |< / dd >
< dd > "< code > dynamic< / code > " |< / dd >
2006-12-28 13:03:34 +00:00
< dd > "< code > built_in< / code > " |< / dd >
< dd > "< code > synchronized< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
2006-11-07 17:11:47 +00:00
< dt > object_property ::=< span id = "grammar_object_property" / > < / dt >
2001-06-06 20:40:57 +01:00
< dd > "< code > static< / code > " |< / dd >
< dd > "< code > dynamic< / code > " |< / dd >
2006-12-28 13:03:34 +00:00
< dd > "< code > built_in< / code > " |< / dd >
< dd > "< code > synchronized< / code > " |< / dd >
< dd > "< code > threaded< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
< dl >
2006-11-07 17:11:47 +00:00
< dt > protocol_property ::=< span id = "grammar_protocol_property" / > < / dt >
2001-06-06 20:40:57 +01:00
< dd > "< code > static< / code > " |< / dd >
< dd > "< code > dynamic< / code > " |< / dd >
< dd > "< code > built_in< / code > "< / dd >
< / dl >
2006-11-07 17:11:47 +00:00
< h2 > Predicate properties< span id = "grammar_predicate_properties" / > < / h2 >
2001-06-06 20:40:57 +01:00
< 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 >
2006-12-28 13:03:34 +00:00
< dd > "< code > synchronized< / code > " |< / dd >
2001-06-06 20:40:57 +01:00
< 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 >
2006-11-07 17:11:47 +00:00
< dd > "< code > meta_predicate(< / code > " meta_predicate_mode_indicator "< code > )< / code > " |< / dd >
2006-02-10 17:44:05 +00:00
< dd > "< code > alias(< / code > " callable "< code > )< / code > " |< / dd >
< dd > "< code > non_terminal(< / code > " non_terminal_indicator "< code > )< / code > "< / dd >
2001-06-06 20:40:57 +01:00
< / dl >
2003-12-30 13:33:51 +00:00
< div class = "footer" >
2006-11-07 17:11:47 +00:00
< div class = "copyright" >
< span > Copyright © < a href = "mailto:pmoura@logtalk.org" > Paulo Moura< / a > — < a href = "http://logtalk.org" > Logtalk.org< / a > < / span > < br / >
2006-12-28 13:03:34 +00:00
< span > Last updated on: December 14, 2006< / span >
2006-11-07 17:11:47 +00:00
< / div >
< div class = "navbottom" >
< span > < a href = "index.html" > previous< / a > | < a href = "../glossary.html" > glossary< / a > | < a href = "index.html" > next< / a > < / span > < br / >
< span > < a href = "http://validator.w3.org/check/referer" > XHTML< / a > + < a href = "http://jigsaw.w3.org/css-validator/check/referer" > CSS< / a > < / span >
< / div >
2003-12-30 13:33:51 +00:00
< / div >
2006-11-07 17:11:47 +00:00
2003-12-30 13:33:51 +00:00
< / body >
2006-11-07 17:11:47 +00:00
2001-06-06 20:40:57 +01:00
< / html >