
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  This file is part of Logtalk <https://logtalk.org/>
%  Copyright 1998-2021 Paulo Moura <pmoura@logtalk.org>
%  SPDX-License-Identifier: Apache-2.0
%
%  Licensed under the Apache License, Version 2.0 (the "License");
%  you may not use this file except in compliance with the License.
%  You may obtain a copy of the License at
%
%      http://www.apache.org/licenses/LICENSE-2.0
%
%  Unless required by applicable law or agreed to in writing, software
%  distributed under the License is distributed on an "AS IS" BASIS,
%  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%  See the License for the specific language governing permissions and
%  limitations under the License.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->


<!ELEMENT logtalk (entity, relations, predicates, operators, remarks, see_also)>


<!ELEMENT entity (name, functor, file, type, compilation, comment?, (parnames|parameters)?, author?, version?, date?, copyright?, license?, info*)>

<!ELEMENT name (#PCDATA)>

<!ELEMENT functor (#PCDATA)>

<!ELEMENT type (#PCDATA)>

<!ELEMENT compilation (#PCDATA)>

<!ELEMENT comment (#PCDATA)>

<!ELEMENT parnames (#PCDATA)>

<!ELEMENT parameters (parameter*)>

<!ELEMENT parameter (name, description)>

<!ELEMENT description (#PCDATA)>

<!ELEMENT author (#PCDATA)>

<!ELEMENT version (#PCDATA)>

<!ELEMENT date (#PCDATA)>

<!ELEMENT copyright (#PCDATA)>

<!ELEMENT license (#PCDATA)>

<!ELEMENT info (key, value)>

<!ELEMENT key (#PCDATA)>

<!ELEMENT value (#PCDATA)>

<!ELEMENT see_also (reference*)>

<!ELEMENT reference (name, file)>


<!ELEMENT relations (implements*, imports*, extends*, instantiates*, specializes*, complements*, provides*, uses*, alias*)>

<!ELEMENT implements (name, functor, scope, file)>

<!ELEMENT imports (name, functor, scope, file)>

<!ELEMENT extends (name, functor, scope, file)>

<!ELEMENT instantiates (name, functor, scope, file)>

<!ELEMENT specializes (name, functor, scope, file)>

<!ELEMENT complements (name, functor, file)>

<!ELEMENT provides (to, functor, resource, file)>

<!ELEMENT uses (name, functor, file)>

<!ELEMENT alias (name, original, alternative)>

<!ELEMENT scope (#PCDATA)>

<!ELEMENT to (#PCDATA)>

<!ELEMENT resource (#PCDATA)>

<!ELEMENT file (#PCDATA)>

<!ELEMENT original (#PCDATA)>

<!ELEMENT alternative (#PCDATA)>

<!ELEMENT predicates (inherited, public, protected, private)>

<!ELEMENT inherited (inherited_predicate*)>

<!ELEMENT public (predicate*)>

<!ELEMENT protected (predicate*)>

<!ELEMENT private (predicate*)>


<!ELEMENT inherited_predicate (name, entity, functor, file)>

<!ELEMENT predicate (name, scope, compilation, meta?, coinductive?, mode*, comment?, template?, (argnames|arguments)?, exceptions?, remarks?, info*, examples?)>

<!ELEMENT meta (#PCDATA)>

<!ELEMENT mode (template, proofs)>

<!ELEMENT template (#PCDATA)>

<!ELEMENT proofs (#PCDATA)>

<!ELEMENT argnames (#PCDATA)>

<!ELEMENT arguments (argument*)>

<!ELEMENT argument (name, description)>

<!ELEMENT exceptions (exception*)>

<!ELEMENT exception (condition, term)>

<!ELEMENT condition (#PCDATA)>

<!ELEMENT term (#PCDATA)>

<!ELEMENT examples (example*)>

<!ELEMENT example (description, call, bindings)>

<!ELEMENT call (#PCDATA)>

<!ELEMENT bindings (#PCDATA)>

<!ELEMENT operators (operator*)>

<!ELEMENT operator (term, scope)>

<!ELEMENT remarks (remark*)>

<!ELEMENT remark (topic, text)>

<!ELEMENT topic (#PCDATA)>

<!ELEMENT text (#PCDATA)>


<!ENTITY % custom SYSTEM "custom.ent">

%custom;
