% This Source Code Form is subject to the terms of the Mozilla Public % License, v. 2.0. If a copy of the MPL was not distributed with this % file, You can obtain one at http://mozilla.org/MPL/2.0/. % USAGE: % attach_operator_map(A->SymbResult, B->SymbSource) % attach_operator_fold(A->SymbResult, B->SymbSource, C-> SymbAcc) % attach_operator_list_range(A -> SymbResult) % attach_operator_list(A -> SymbResult) % attach_operator_index(A -> SymbResult) % OPERATOR MAP bind(SymbResult, A):- attach_operator_map(A, _); ast_op_map(SymbResult, _, _); A<>none. bind(SymbSource, B):- attach_operator_map(_, B); ast_op_map(_, SymbSource, _); B<>none. % OPERATOR LIST_RANGE bind(SymbResult, A):- ast_op_list_range(SymbResult); attach_operator_list_range(A). % OPERATOR LIST bind(SymbResult, A):- ast_op_list(SymbResult, _); attach_operator_list(A). % OPERATOR FOLD bind(SymbResult, A):- attach_operator_fold(A, _, _); ast_op_fold(SymbResult, _, _, _); A<>none. bind(SymbSource, B):- attach_operator_fold(_, B, _); ast_op_fold(_, SymbSource, _, _); B<>none. bind(SymbAcc, C):- attach_operator_fold(_, _, C); ast_op_fold(_, _, SymbAcc, _); C<>none. % OPERATOR INDEX bind(SymbSource, A):- attach_operator_index(A); ast_op_index(_, SymbSource, _).