Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2222

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - Definite clause grammars (expansion)</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_45.html">previous</A>, <A HREF="ciao_47.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC225" HREF="ciao_toc.html#TOC225">Definite clause grammars (expansion)</A></H1>
<P>
<A NAME="IDX3055"></A>


<P>
<STRONG>Author(s):</STRONG> Daniel Cabeza.


<P>
<STRONG>Version:</STRONG> 1.9#302 (2004/2/16, 18:48:1 CET)


<P>
This module implements the Definite clause grammars (expansion).



<UL>
<LI><A HREF="ciao_46.html#SEC226">Usage and interface (dcg_expansion)</A>
<LI><A HREF="ciao_46.html#SEC227">Documentation on exports (dcg_expansion)</A>
</UL>



<H2><A NAME="SEC226" HREF="ciao_toc.html#TOC226">Usage and interface (<CODE>dcg_expansion</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(dcg_expansion)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX3056"></A>
<CODE>phrase/2</CODE>, 
<A NAME="IDX3057"></A>
<CODE>phrase/3</CODE>, 
<A NAME="IDX3058"></A>
<CODE>dcg_translation/2</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX3059"></A>
<CODE>terms</CODE>, 
<A NAME="IDX3060"></A>
<CODE>assertions/doc_props</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC227" HREF="ciao_toc.html#TOC227">Documentation on exports (<CODE>dcg_expansion</CODE>)</A></H2>
<P>
<A NAME="IDX3061"></A>
<A NAME="IDX3062"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>phrase/2:</B>
<DD><A NAME="IDX3063"></A>


<P>
<CODE>phrase(Phrase, List)</CODE>


<P>
Like <CODE>phrase(Phrase,List,[])</CODE>.


<P>
<EM>Meta-predicate</EM> with arguments: <CODE>phrase(goal,?)</CODE>.


</DL>

<P>
<A NAME="IDX3064"></A>
<A NAME="IDX3065"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>phrase/3:</B>
<DD><A NAME="IDX3066"></A>


<P>
<EM>Meta-predicate</EM> with arguments: <CODE>phrase(goal,?,?)</CODE>.


<P>
<STRONG>Usage:</STRONG> <CODE>phrase(+Phrase, ?List, ?Remainder)</CODE>

<UL>
<LI><EM>Description:</EM> The list <CODE>List</CODE> is a phrase of type <CODE>Phrase</CODE> (according to the current grammar rules), where <CODE>Phrase</CODE> is either a non-terminal or more generally a grammar rule body. <CODE>Remainder</CODE> is what remains of the list after a phrase has been found.

<LI><EM>The following properties should hold globally:</EM>

Documentation is still incomplete: <CODE>phrase(+Phrase,?List,?Remainder)</CODE> may not conform the functionality documented.
 (<CODE>doc_props:doc_incomplete/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX3067"></A>
<A NAME="IDX3068"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>dcg_translation/2:</B>
<DD><A NAME="IDX3069"></A>


<P>
Performs the code expansion of source clauses that use DCGs.


</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_45.html">previous</A>, <A HREF="ciao_47.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>