.. index:: ip_grammars(Format)
.. _ip_grammars/1:

.. rst-class:: right

**object**

``ip_grammars(Format)``
=======================

IP address grammars.

| **Availability:** 
|    ``logtalk_load(grammars(loader))``

| **Author:** Paulo Moura
| **Version:** 0:1:1
| **Date:** 2022-10-08

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


| **Uses:**
|    :ref:`number_grammars(Format) <number_grammars/1>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|    (none)

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

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

.. index:: ipv4//1
.. _ip_grammars/1::ipv4//1:

``ipv4//1``
^^^^^^^^^^^

Parses an IPv4 network address in the format XXX.XXX.XXX.XXX where each XXX is an octet (i.e., an integer between 0 and 255).

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``ipv4(Octets)``
| **Mode and number of proofs:**
|    ``ipv4(?list(integer))`` - ``zero_or_one``


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

.. index:: ipv6//1
.. _ip_grammars/1::ipv6//1:

``ipv6//1``
^^^^^^^^^^^

Parses an IPv6 network address in the format XXXX.XXXX.XXXX.XXXX.XXXX.XXXX.XXXX.XXXX where each X is a hexadecimal digit.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``ipv6(HexDigits)``
| **Mode and number of proofs:**
|    ``ipv6(?list(integer))`` - ``one``


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

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

(no local declarations; see entity ancestors if any)

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

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

