Sophie

Sophie

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

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               - parser_util (library)</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_221.html">previous</A>, <A HREF="ciao_223.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="SEC865" HREF="ciao_toc.html#TOC865">parser_util (library)</A></H1>
<P>
<A NAME="IDX9432"></A>


<P>
<STRONG>Author(s):</STRONG> G&ouml;ran Smedb&auml;ck.



<UL>
<LI><A HREF="ciao_222.html#SEC866">Usage and interface (parser_util)</A>
<LI><A HREF="ciao_222.html#SEC867">Documentation on exports (parser_util)</A>
</UL>



<H2><A NAME="SEC866" HREF="ciao_toc.html#TOC866">Usage and interface (<CODE>parser_util</CODE>)</A></H2>

<div class="cartouche">

<UL>

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

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

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


<UL>

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

<A NAME="IDX9433"></A>
<CODE>at_least_one/4</CODE>, 
<A NAME="IDX9434"></A>
<CODE>at_least_one/5</CODE>, 
<A NAME="IDX9435"></A>
<CODE>fillout/4</CODE>, 
<A NAME="IDX9436"></A>
<CODE>fillout/5</CODE>, 
<A NAME="IDX9437"></A>
<CODE>create_node/3</CODE>, 
<A NAME="IDX9438"></A>
<CODE>create_field/3</CODE>, 
<A NAME="IDX9439"></A>
<CODE>create_field/4</CODE>, 
<A NAME="IDX9440"></A>
<CODE>create_field/5</CODE>, 
<A NAME="IDX9441"></A>
<CODE>create_directed_field/5</CODE>, 
<A NAME="IDX9442"></A>
<CODE>correct_commenting/4</CODE>, 
<A NAME="IDX9443"></A>
<CODE>create_parse_structure/1</CODE>, 
<A NAME="IDX9444"></A>
<CODE>create_parse_structure/2</CODE>, 
<A NAME="IDX9445"></A>
<CODE>create_parse_structure/3</CODE>, 
<A NAME="IDX9446"></A>
<CODE>create_environment/4</CODE>, 
<A NAME="IDX9447"></A>
<CODE>insert_comments_in_beginning/3</CODE>, 
<A NAME="IDX9448"></A>
<CODE>get_environment_name/2</CODE>, 
<A NAME="IDX9449"></A>
<CODE>get_environment_type/2</CODE>, 
<A NAME="IDX9450"></A>
<CODE>get_row_number/2</CODE>, 
<A NAME="IDX9451"></A>
<CODE>add_environment_whitespace/3</CODE>, 
<A NAME="IDX9452"></A>
<CODE>get_indentation/2</CODE>, 
<A NAME="IDX9453"></A>
<CODE>inc_indentation/2</CODE>, 
<A NAME="IDX9454"></A>
<CODE>dec_indentation/2</CODE>, 
<A NAME="IDX9455"></A>
<CODE>add_indentation/3</CODE>, 
<A NAME="IDX9456"></A>
<CODE>reduce_indentation/3</CODE>, 
<A NAME="IDX9457"></A>
<CODE>push_whitespace/3</CODE>, 
<A NAME="IDX9458"></A>
<CODE>push_dictionaries/3</CODE>, 
<A NAME="IDX9459"></A>
<CODE>get_parsed/2</CODE>, 
<A NAME="IDX9460"></A>
<CODE>get_environment/2</CODE>, 
<A NAME="IDX9461"></A>
<CODE>inside_proto/1</CODE>, 
<A NAME="IDX9462"></A>
<CODE>get_dictionaries/2</CODE>, 
<A NAME="IDX9463"></A>
<CODE>strip_from_list/2</CODE>, 
<A NAME="IDX9464"></A>
<CODE>strip_from_term/2</CODE>, 
<A NAME="IDX9465"></A>
<CODE>strip_clean/2</CODE>, 
<A NAME="IDX9466"></A>
<CODE>strip_exposed/2</CODE>, 
<A NAME="IDX9467"></A>
<CODE>strip_restricted/2</CODE>, 
<A NAME="IDX9468"></A>
<CODE>strip_interface/2</CODE>, 
<A NAME="IDX9469"></A>
<CODE>set_parsed/3</CODE>, 
<A NAME="IDX9470"></A>
<CODE>set_environment/3</CODE>, 
<A NAME="IDX9471"></A>
<CODE>insert_parsed/3</CODE>, 
<A NAME="IDX9472"></A>
<CODE>reverse_parsed/2</CODE>, 
<A NAME="IDX9473"></A>
<CODE>stop_parse/2</CODE>, 
<A NAME="IDX9474"></A>
<CODE>look_first_parsed/2</CODE>, 
<A NAME="IDX9475"></A>
<CODE>get_first_parsed/3</CODE>, 
<A NAME="IDX9476"></A>
<CODE>remove_code/3</CODE>, 
<A NAME="IDX9477"></A>
<CODE>look_ahead/3</CODE>.

</UL>

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


<UL>

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

<A NAME="IDX9478"></A>
<CODE>aggregates</CODE>, 
<A NAME="IDX9479"></A>
<CODE>dynamic</CODE>, 
<A NAME="IDX9480"></A>
<CODE>iso_misc</CODE>, 
<A NAME="IDX9481"></A>
<CODE>iso_byte_char</CODE>, 
<A NAME="IDX9482"></A>
<CODE>iso_incomplete</CODE>, 
<A NAME="IDX9483"></A>
<CODE>operators</CODE>, 
<A NAME="IDX9484"></A>
<CODE>read</CODE>, 
<A NAME="IDX9485"></A>
<CODE>write</CODE>, 
<A NAME="IDX9486"></A>
<CODE>lists</CODE>, 
<A NAME="IDX9487"></A>
<CODE>provrml/dictionary_tree</CODE>, 
<A NAME="IDX9488"></A>
<CODE>provrml/internal_types</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC867" HREF="ciao_toc.html#TOC867">Documentation on exports (<CODE>parser_util</CODE>)</A></H2>
<P>
<A NAME="IDX9489"></A>
<A NAME="IDX9490"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>at_least_one/4:</B>
<DD><A NAME="IDX9491"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9492"></A>
<A NAME="IDX9493"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>at_least_one/5:</B>
<DD><A NAME="IDX9494"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9495"></A>
<A NAME="IDX9496"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>fillout/4:</B>
<DD><A NAME="IDX9497"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9498"></A>
<A NAME="IDX9499"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>fillout/5:</B>
<DD><A NAME="IDX9500"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9501"></A>
<A NAME="IDX9502"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_node/3:</B>
<DD><A NAME="IDX9503"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_node(+NodeTypeId, +Parse, -Node)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a node term with the read guts which is inside the parse structure. A node consists of its name and one argument, a list of its fields.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+NodeTypeId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-Node</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9504"></A>
<A NAME="IDX9505"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_field/3:</B>
<DD><A NAME="IDX9506"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_field(+FieldNameId, +Arguments, -Field)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a field with the Id as the fieldname and the arguments as they are, in a double list, which results in a single list or a single list which will result in free arguments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+FieldNameId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Arguments</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Field</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9507"></A>
<A NAME="IDX9508"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_field/4:</B>
<DD><A NAME="IDX9509"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_field(+FieldAccess, +FieldType, +FieldId, -Field)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a field with its access type as the name with type and id as arguments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+FieldAccess</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldType</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>-Field</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9510"></A>
<A NAME="IDX9511"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_field/5:</B>
<DD><A NAME="IDX9512"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_field(+FieldAccess, +FieldType, +FieldId, +Fieldvalue, -Field)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a field with its access type as the name with type, id and value as arguments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+FieldAccess</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldType</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Fieldvalue</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Field</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9513"></A>
<A NAME="IDX9514"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_directed_field/5:</B>
<DD><A NAME="IDX9515"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_directed_field(+Access, +Type, +Id0, +Id1, -Field)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a directed field with the key word IS in the middle. Its access type as the name with type, from id0 and to id1 as arguments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Access</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Type</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Id0</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Id1</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>-Field</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9516"></A>
<A NAME="IDX9517"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>correct_commenting/4:</B>
<DD><A NAME="IDX9518"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>correct_commenting(+Place, +Comment, +ParsedIn, -ParsedOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate places the comment 'before' or 'after' the parsed term. This results in a list with the term and the comment or in just returning the term.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Place</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Comment</CODE> is a compound term.
 (<CODE>basic_props:struct/1</CODE>)

<CODE>+ParsedIn</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-ParsedOut</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9519"></A>
<A NAME="IDX9520"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_parse_structure/1:</B>
<DD><A NAME="IDX9521"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_parse_structure(-Parse)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct the parse structure with its three fields: the parsing list, the environment structure, and the dictionaries.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>-Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9522"></A>
<A NAME="IDX9523"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_parse_structure/2:</B>
<DD><A NAME="IDX9524"></A>


<P>
<STRONG>Usage 1:</STRONG> <CODE>create_parse_structure(+ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a parse structure with its three fields: the parsing list, the environment structure, and the dictionaries. It will reuse the environment and the dictionaries from the input.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

<P>
<STRONG>Usage 2:</STRONG> <CODE>create_parse_structure(+ParsedList, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a parse structure with its three fields: the parsing list, the environment structure, and the dictionaries. It will use the list of parsed items in its structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParsedList</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9525"></A>
<A NAME="IDX9526"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_parse_structure/3:</B>
<DD><A NAME="IDX9527"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_parse_structure(+ParsedList, +ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a parse structure with its three fields: the parsing list, the environment structure, and the dictionaries. It will use the list of parsed items in its structure and the environment and the dictionary from the parse structure given.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParsedList</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9528"></A>
<A NAME="IDX9529"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_environment/4:</B>
<DD><A NAME="IDX9530"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_environment(+Parse, +EnvType, +Name, -EnvStruct)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct an environment structure based on the information in the parse structure. Well only the white- space information will be reused. The are three types of environments 'PROTO', 'EXTERNPROTO', and 'DEF'.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>+EnvType</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>-EnvStruct</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9531"></A>
<A NAME="IDX9532"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>insert_comments_in_beginning/3:</B>
<DD><A NAME="IDX9533"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>insert_comments_in_beginning(+Comment, +ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> We add the comment in the beginneing of the parsed, to get the proper look.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Comment</CODE> is a compound term.
 (<CODE>basic_props:struct/1</CODE>)

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9534"></A>
<A NAME="IDX9535"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_environment_name/2:</B>
<DD><A NAME="IDX9536"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_environment_name(+Environment, -Name)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the enviroment name.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Environment</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)

<CODE>-Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9537"></A>
<A NAME="IDX9538"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_environment_type/2:</B>
<DD><A NAME="IDX9539"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_environment_type(+Environment, -Type)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the enviroment type, one of the three: 'PROTO', 'EXTERNPROTO', and 'DEF'.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Environment</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)

<CODE>-Type</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9540"></A>
<A NAME="IDX9541"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_row_number/2:</B>
<DD><A NAME="IDX9542"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_row_number(+Parse, -Row)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the row number from the parse structure. The row number is not fully implemented.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-Row</CODE> is a number.
 (<CODE>basic_props:num/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9543"></A>
<A NAME="IDX9544"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>add_environment_whitespace/3:</B>
<DD><A NAME="IDX9545"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>add_environment_whitespace(+EnvIn, +WhiteSpaceList, -EnvOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will add the new whitespace that is collected in a list of whitespaces to the environment.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+EnvIn</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)

<CODE>+WhiteSpaceList</CODE> is a list of <CODE>atm</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-EnvOut</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9546"></A>
<A NAME="IDX9547"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_indentation/2:</B>
<DD><A NAME="IDX9548"></A>


<P>
<STRONG>Usage 1:</STRONG> <CODE>get_indentation(+Whitespace, -Indentation)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the indentation depth from a whitespace structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Whitespace</CODE> is a whitespace structure.
 (<CODE>internal_types:whitespace/1</CODE>)

<CODE>-Indentation</CODE> is a number.
 (<CODE>basic_props:num/1</CODE>)
</UL>

<P>
<STRONG>Usage 2:</STRONG> <CODE>get_indentation(+Parse, -Indentation)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the indentation depth from a parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-Indentation</CODE> is a number.
 (<CODE>basic_props:num/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9549"></A>
<A NAME="IDX9550"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>inc_indentation/2:</B>
<DD><A NAME="IDX9551"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>inc_indentation(+ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> Will increase the indentation with one step to a parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9552"></A>
<A NAME="IDX9553"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>dec_indentation/2:</B>
<DD><A NAME="IDX9554"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>dec_indentation(+ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> Will decrease the indentation with one step to a parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9555"></A>
<A NAME="IDX9556"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>add_indentation/3:</B>
<DD><A NAME="IDX9557"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9558"></A>
<A NAME="IDX9559"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>reduce_indentation/3:</B>
<DD><A NAME="IDX9560"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9561"></A>
<A NAME="IDX9562"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>push_whitespace/3:</B>
<DD><A NAME="IDX9563"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>push_whitespace(+ParseWithWhitespace, +ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will add the whitespace values from one parse structure to another one, resultin in the output, with the values from the second parse structure with the whitespace from the first added.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseWithWhitespace</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9564"></A>
<A NAME="IDX9565"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>push_dictionaries/3:</B>
<DD><A NAME="IDX9566"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>push_dictionaries(+Parse, +Parse, -Parse)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will set the first parse structure's directory to the second parsing structure argument. The resulting parsing structure will be returned.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9567"></A>
<A NAME="IDX9568"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_parsed/2:</B>
<DD><A NAME="IDX9569"></A>


<P>
<STRONG>Usage 1:</STRONG> <CODE>get_parsed(+ParseStructure, -ListOfParsed)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return a list of the parsed terms that is inside the parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseStructure</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ListOfParsed</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

<P>
<STRONG>Usage 2:</STRONG> <CODE>get_parsed(+ParseStructure, -EnvironmentStructure)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the environment of the parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseStructure</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-EnvironmentStructure</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)
</UL>

<P>
<STRONG>Usage 3:</STRONG> <CODE>get_parsed(+ParseStructure, -Dictionaries)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return dictionary used within the parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseStructure</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-Dictionaries</CODE> is a dictionary.
 (<CODE>internal_types:dictionary/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9570"></A>
<A NAME="IDX9571"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_environment/2:</B>
<DD><A NAME="IDX9572"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9573"></A>
<A NAME="IDX9574"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>inside_proto/1:</B>
<DD><A NAME="IDX9575"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>inside_proto(+Parse)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will answer to the question: are we parsing inside a PROTO/EXTERNPROTO.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9576"></A>
<A NAME="IDX9577"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_dictionaries/2:</B>
<DD><A NAME="IDX9578"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9579"></A>
<A NAME="IDX9580"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_from_list/2:</B>
<DD><A NAME="IDX9581"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>strip_from_list(+ListWithComments, -CleanList)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will strip the list from comments and return a list without any comments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ListWithComments</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-CleanList</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9582"></A>
<A NAME="IDX9583"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_from_term/2:</B>
<DD><A NAME="IDX9584"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>strip_from_term(+Term, -Stripped)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will remove comments from a term, it will reduce its arguments if there are comments as arguments.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Term</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Stripped</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9585"></A>
<A NAME="IDX9586"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_clean/2:</B>
<DD><A NAME="IDX9587"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>strip_clean(+ParsedIn, -ParsedOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return a striped list or a single atom if there was no comments and no more items in the list. It will also return a atom if there is comments and only one other element.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParsedIn</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-ParsedOut</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9588"></A>
<A NAME="IDX9589"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_exposed/2:</B>
<DD><A NAME="IDX9590"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9591"></A>
<A NAME="IDX9592"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_restricted/2:</B>
<DD><A NAME="IDX9593"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9594"></A>
<A NAME="IDX9595"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>strip_interface/2:</B>
<DD><A NAME="IDX9596"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>strip_interface(+Interface, -StrippedInterface)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will remove comments from the interface that we read for the PROTOtype. This will help us when setting the properties.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Interface</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-StrippedInterface</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9597"></A>
<A NAME="IDX9598"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>set_parsed/3:</B>
<DD><A NAME="IDX9599"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>set_parsed(+ParseIn, +NewParseList, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will create a new parse structure from the first parse structure with the parse list from the second argument.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>+NewParseList</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9600"></A>
<A NAME="IDX9601"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>set_environment/3:</B>
<DD><A NAME="IDX9602"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>set_environment(+Environment, +ParseIn, -ParseOut)</CODE>

<UL>
<LI><EM>Description:</EM> The modificator will return a parse structure with the environment given with the other properties from the first parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Environment</CODE> is an environment structure.
 (<CODE>internal_types:environment/1</CODE>)

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9603"></A>
<A NAME="IDX9604"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>insert_parsed/3:</B>
<DD><A NAME="IDX9605"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9606"></A>
<A NAME="IDX9607"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>reverse_parsed/2:</B>
<DD><A NAME="IDX9608"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9609"></A>
<A NAME="IDX9610"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>stop_parse/2:</B>
<DD><A NAME="IDX9611"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>stop_parse(+TermIn, -TermOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will bind the invalue to the outvalue, used to terminate a parsing.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+TermIn</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-TermOut</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9612"></A>
<A NAME="IDX9613"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>look_first_parsed/2:</B>
<DD><A NAME="IDX9614"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>look_first_parsed(+Parse, -First)</CODE>

<UL>
<LI><EM>Description:</EM> Look at the first item in the parse structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Parse</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-First</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9615"></A>
<A NAME="IDX9616"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_first_parsed/3:</B>
<DD><A NAME="IDX9617"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_first_parsed(+ParseIn, -ParseOut, -First)</CODE>

<UL>
<LI><EM>Description:</EM> Get the first item in the parse structure and return the parse structure with the item removed.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ParseIn</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-ParseOut</CODE> is a parse structure.
 (<CODE>internal_types:parse/1</CODE>)

<CODE>-First</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9618"></A>
<A NAME="IDX9619"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>remove_code/3:</B>
<DD><A NAME="IDX9620"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9621"></A>
<A NAME="IDX9622"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>look_ahead/3:</B>
<DD><A NAME="IDX9623"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>look_ahead(+Name, +Parsed, -Parsed)</CODE>

<UL>
<LI><EM>Description:</EM> This predicate is used normally by the CDG and the two last arguments will therefore be the same because we don't remove the parsed. The name is the name inside a term, the first argument.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Parsed</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)

<CODE>-Parsed</CODE> is a list of <CODE>term</CODE>s.
 (<CODE>basic_props:list/2</CODE>)
</UL>

</DL>

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