1
0
Fork 0
cl-sites/asdf.common-lisp.dev/asdf/Parsing-system-definitions.html

150 lines
7.1 KiB
HTML
Raw Normal View History

2023-11-12 11:34:18 +01:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual describes ASDF, a system definition facility
for Common Lisp programs and libraries.
You can find the latest version of this manual at
https://common-lisp.net/project/asdf/asdf.html.
ASDF Copyright (C) 2001-2019 Daniel Barlow and contributors.
This manual Copyright (C) 2001-2019 Daniel Barlow and contributors.
This manual revised (C) 2009-2019 Robert P. Goldman and Francois-Rene Rideau.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<title>Parsing system definitions (ASDF Manual)</title>
<meta name="description" content="Parsing system definitions (ASDF Manual)">
<meta name="keywords" content="Parsing system definitions (ASDF Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="The-object-model-of-ASDF.html" rel="up" title="The object model of ASDF">
<link href="Functions.html" rel="prev" title="Functions">
<style type="text/css">
<!--
a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
span:hover a.copiable-anchor {visibility: visible}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<div class="section" id="Parsing-system-definitions">
<div class="header">
<p>
Previous: <a href="Functions.html" accesskey="p" rel="prev">Functions</a>, Up: <a href="The-object-model-of-ASDF.html" accesskey="u" rel="up">The Object model of ASDF</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<span id="Parsing-system-definitions-1"></span><h3 class="section">7.5 Parsing system definitions</h3>
<span id="index-Parsing-system-definitions"></span>
<span id="index-Extending-ASDF_0027s-defsystem-parser"></span>
<p>Thanks to Eric Timmons, ASDF now provides hooks to extend how it parses
<code>defsystem</code> forms.
</p>
<p><strong>Warning!</strong> These interfaces are experimental, and as such are not
exported from the ASDF package yet. We plan to export them in ASDF
3.4.0. If you use them before they are exported, please subscribe to
<a href="https://gitlab.common-lisp.net/asdf/asdf/-/issues/76">https://gitlab.common-lisp.net/asdf/asdf/-/issues/76</a> so you are
made aware of any changes.
</p>
<dl class="def">
<dt id="index-parse_002dcomponent_002dform"><span class="category">Function: </span><span><strong>parse-component-form</strong> <em><var>parent</var> <var>options</var> &amp;key <var>previous-serial-components</var></em><a href='Parsing-system-definitions.html#index-parse_002dcomponent_002dform' class='copiable-anchor'> &para;</a></span></dt>
<dd>
<p>This is the core function for parsing a system definition. At the
moment, we do not expect ASDF extenders to modify this function.
</p>
<p>When being called on a <code>component</code> of type <code>system</code> (i.e.,
inside the <code>defsystem</code> macro), <var>parent</var> will be <code>NIL</code>.
</p></dd></dl>
<dl class="def">
<dt id="index-compute_002dcomponent_002dchildren"><span class="category">Generic function: </span><span><strong>compute-component-children</strong> <em><var>component</var> <var>components</var> <var>serial-p</var></em><a href='Parsing-system-definitions.html#index-compute_002dcomponent_002dchildren' class='copiable-anchor'> &para;</a></span></dt>
<dd>
<p>This generic function provides standard means for computing component
children, but can be extended with additional methods by a programmer.
</p>
<p>Returns a list of children (of type <code>component</code>) for <var>component</var>.
<var>components</var> is a list of the explicitly defined children descriptions.
<var>serial-p</var> is non-<code>NIL</code> if each child in <var>components</var> should depend on the previous
children.
</p>
</dd></dl>
<dl class="def">
<dt id="index-class_002dfor_002dtype"><span class="category">Generic function: </span><span><strong>class-for-type</strong> <em><var>parent</var> <var>type-designator</var></em><a href='Parsing-system-definitions.html#index-class_002dfor_002dtype' class='copiable-anchor'> &para;</a></span></dt>
<dd>
<p>Return a <code>class</code> designator to be used to instantiate a component
whose type is specified by <var>type-designator</var> in the context of
<var>parent</var>, which should be either a <code>parent-component</code> &ndash; or subclass
thereof &ndash; or <code>nil</code> (if the type designator is some class of system).
</p>
<p>This generic function provides a means for changing how ASDF translates
type-designators (like <code>:file</code>) into CLOS classes. It is intended
for programmers to extend by adding new methods.
</p>
<p><strong>Warning!</strong> Adding new methods for <code>class-for-type</code> is
typically <em>not</em> necessary: much can already be done by using
<code>:default-component-class</code> and defining (and explicitly calling
for) new component types.
</p>
</dd></dl>
</div>
<hr>
<div class="header">
<p>
Previous: <a href="Functions.html">Functions</a>, Up: <a href="The-object-model-of-ASDF.html">The Object model of ASDF</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>