.. index:: edcg
.. _edcg/0:

.. rst-class:: right

**object**

``edcg``
========

Multiple hidden parameters: an extension to Prolog's DCG notation. Ported to Logtalk as a hook object.

| **Author:** Peter Van Roy; adapted to Logtalk by Paulo Moura.
| **Version:** 1:4:2
| **Date:** 2020-04-08

| **Copyright:** Copyright (C) 1992 Peter Van Roy
| **License:** MIT

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`expanding <expanding/0>`
| **Provides:**
|    :ref:`logtalk::message_tokens//2 <logtalk/0::message_tokens//2>`
| **Uses:**
|    :ref:`list <list/0>`
|    :ref:`logtalk <logtalk/0>`

| **Remarks:**

   - Usage: Compile source files with objects (or categories) defining EDCGs using the compiler option ``hook(edcg)``.

| **Inherited public predicates:**
|     :ref:`expanding/0::goal_expansion/2`  :ref:`expanding/0::term_expansion/2`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

.. raw:: html

   <div id="pred_info/3"> </div>

.. index:: pred_info/3
.. _edcg/0::pred_info/3:

``pred_info/3``
^^^^^^^^^^^^^^^

Declares predicates that have the listed hidden parameters.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``pred_info(Name,Arity,HiddenParameters)``
| **Mode and number of proofs:**
|    ``pred_info(?atom,?integer,?list(atom))`` - ``zero_or_more``


------------

.. raw:: html

   <div id="acc_info/7"> </div>

.. index:: acc_info/7
.. _edcg/0::acc_info/7:

``acc_info/7``
^^^^^^^^^^^^^^

Long form for declaring accumulators.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``acc_info(Accumulator,Term,Left,Right,Joiner,LStart,RStart)``
| **Mode and number of proofs:**
|    ``acc_info(?atom,?term,?term,?term,?callable,?term,?term)`` - ``zero_or_more``


------------

.. raw:: html

   <div id="acc_info/5"> </div>

.. index:: acc_info/5
.. _edcg/0::acc_info/5:

``acc_info/5``
^^^^^^^^^^^^^^

Short form for declaring accumulators.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``acc_info(Accumulator,Term,Left,Right,Joiner)``
| **Mode and number of proofs:**
|    ``acc_info(?atom,?term,?term,?term,?callable)`` - ``zero_or_more``


------------

.. raw:: html

   <div id="pass_info/2"> </div>

.. index:: pass_info/2
.. _edcg/0::pass_info/2:

``pass_info/2``
^^^^^^^^^^^^^^^

Long form for declaring passed arguments. Passed arguments are conceptually the same as accumulators with ``=/2`` as the joiner function.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``pass_info(Argument,PStart)``
| **Mode and number of proofs:**
|    ``pass_info(?atom,?term)`` - ``zero_or_more``


------------

.. raw:: html

   <div id="pass_info/1"> </div>

.. index:: pass_info/1
.. _edcg/0::pass_info/1:

``pass_info/1``
^^^^^^^^^^^^^^^

Short form for declaring passed arguments. Passed arguments are conceptually the same as accumulators with ``=/2`` as the joiner function.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``pass_info(Argument)``
| **Mode and number of proofs:**
|    ``pass_info(?atom)`` - ``zero_or_more``


------------

Operators
---------

``op(1200,xfx,-->>)``
^^^^^^^^^^^^^^^^^^^^^

| **Scope:**
|    ``public``



