1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
|
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on May, 22 2008 by texi2html 1.64-gnat-1 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>ASIS-for-GNAT Reference Manual: ASIS Extensions</TITLE>
<META NAME="description" CONTENT="ASIS-for-GNAT Reference Manual: ASIS Extensions">
<META NAME="keywords" CONTENT="ASIS-for-GNAT Reference Manual: ASIS Extensions">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64-gnat-1">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC6"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_2.html#SEC5"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC7"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 2. ASIS Extensions </H1>
<!--docid::SEC6::-->
<P>
ASIS-for-GNAT provides some additional types and queries as ASIS extensions.
All these queries are defined and documented in the hierarchy headed by
package <CODE>Asis.Extensions</CODE>. They are referred as "ASIS extensions" or
"ASIS extension queries" below.
<A NAME="IDX6"></A>
</P><P>
All the ASIS extensions obey the general ASIS rules:
</P><P>
<UL>
<LI>
When using ASIS
extensions, you have to follow the required sequencing of calls
<P>
<LI>
Only ASIS-defined exceptions propagate outside ASIS extension
queries
</UL>
<P>
If the documentation of an ASIS extension query contains a list of
"appropriate" <CODE>Element</CODE> kinds, then the query can be applied only to
<CODE>Element</CODE>s from this list, and it raises
<CODE>ASIS_Inappropriate_Element</CODE>
<A NAME="IDX7"></A>
with <CODE>Value_Error</CODE>
<A NAME="IDX8"></A>
status otherwise. If the documentation of an ASIS extension
query contains a list of "expected" element kinds, then the query can be
applied to an <CODE>Element</CODE> having any kind, but it returns a meaningful
result only for <CODE>Element</CODE>s from this list.
</P><P>
The current set of ASIS extensions originated from the ASIS implementation
needs and from the development of some ASIS tools inside the ASIS-for-GNAT
team. The <CODE>Asis.Extensions</CODE> hierarchy is not necessarily
frozen: some further extension queries may be added,
and suggestions from ASIS application developers are welcome.
</P><P>
Note that some of the ASIS extensions are implemented as ASIS <EM>secondary
queries</EM> -- that is, the implementation of such a query is a sequence of
primary ASIS queries. Some other extensions are <EM>pure extensions</EM>;
that is, their implementation is based on direct access to GNAT's internal
data structures.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_3.html#SEC7">2.1 <CODE>Asis.Extensions</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_3.html#SEC8">2.2 <CODE>Asis.Extensions.Flat_Kinds</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="asis_rm_3.html#SEC9">2.3 <CODE>Asis.Extensions.Iterator</CODE></A></TD><TD> </TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Asis.Extensions"></A>
<HR SIZE="6">
<A NAME="SEC7"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC8"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.1 <CODE>Asis.Extensions</CODE> </H2>
<!--docid::SEC7::-->
<P>
This package, whose spec is located in the file
<TT>`asis-extensions.ads'</TT>,
contains the declarations of various ASIS extensions, including
dynamic <CODE>Element</CODE> and <CODE>Compilation_Unit</CODE> list types, placeholder
actual parameters for <CODE>Asis.Iterator.Traverse_Element</CODE>,
additional <CODE>Element</CODE> structural and
semantic queries, queries that return information about the status of the
source file for a <CODE>Compilation_Unit</CODE>, queries returning the (images
of the) values of static expressions, etc.
</P><P>
<A NAME="Asis.Extensions.Flat_Kinds"></A>
<HR SIZE="6">
<A NAME="SEC8"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC7"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC9"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC9"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.2 <CODE>Asis.Extensions.Flat_Kinds</CODE> </H2>
<!--docid::SEC8::-->
<P>
The ASIS <CODE>Element</CODE> classification hierarchy
is based on a set of Ada enumeration types,
each corresponding to a "level" in the hierarchy.
The package <CODE>Asis.Extensions.Flat_Kinds</CODE>, whose spec is located in the
file <TT>`asis-extensions-flat_kinds.ads'</TT>,
defines the enumeration type <CODE>Flat_Element_Kinds</CODE>;
<A NAME="IDX9"></A>
this type combines the values of all these types and thus provides
a "flat" view onto the syntactic <CODE>Element</CODE> classification.
</P><P>
<A NAME="Asis.Extensions.Iterator"></A>
<HR SIZE="6">
<A NAME="SEC9"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC8"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.3 <CODE>Asis.Extensions.Iterator</CODE> </H2>
<!--docid::SEC9::-->
<P>
This package, whose spec is located in the file
<TT>`asis-extensions-iterator.ads'</TT>,
contains the declarations of <CODE>Traverse_Unit</CODE> generic procedure that
is a generalization of the standard ASIS <CODE>Asis.Iterator.Traverse_Element</CODE>
iterator. <CODE>Traverse_Unit</CODE> provides the depth-first traversal of the
whole syntactical structure of the ASIS Compilation Unit.
</P><P>
<A NAME="Implementation-Specific Features and Implementation Permissions"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_3.html#SEC6"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_4.html#SEC10"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_6.html#SEC34">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="asis_rm_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Mail Server</I> on <I>May, 22 2008</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html/"><I>texi2html</I></A>
</BODY>
</HTML>
|