mirror of
https://github.com/boostorg/phoenix.git
synced 2026-02-13 12:42:11 +00:00
230 lines
9.6 KiB
HTML
230 lines
9.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Chapter 1. Phoenix 3.0</title>
|
|
<link rel="stylesheet" href="../../../../doc/html/boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
|
|
<link rel="start" href="index.html" title="Chapter 1. Phoenix 3.0">
|
|
<link rel="next" href="phoenix/introduction.html" title="Introduction">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
|
|
<hr>
|
|
<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="images/next.png" alt="Next"></a></div>
|
|
<div class="chapter" lang="en">
|
|
<div class="titlepage"><div>
|
|
<div><h2 class="title">
|
|
<a name="phoenix"></a>Chapter 1. Phoenix 3.0</h2></div>
|
|
<div><div class="author"><h3 class="author">
|
|
<span class="firstname">Joel</span> <span class="surname">de Guzman</span>
|
|
</h3></div></div>
|
|
<div><div class="author"><h3 class="author">
|
|
<span class="firstname">Dan</span> <span class="surname">Marsden</span>
|
|
</h3></div></div>
|
|
<div><div class="author"><h3 class="author">
|
|
<span class="firstname">Thomas</span> <span class="surname">Heller</span>
|
|
</h3></div></div>
|
|
<div><p class="copyright">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller</p></div>
|
|
<div><div class="legalnotice">
|
|
<a name="id2813809"></a><p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
|
</p>
|
|
</div></div>
|
|
</div></div>
|
|
<div class="toc">
|
|
<p><b>Table of Contents</b></p>
|
|
<dl>
|
|
<dt><span class="section"><a href="phoenix/introduction.html">Introduction</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit.html">Starter Kit</a></span></dt>
|
|
<dd><dl>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/primitives.html">Primitives</a></span></dt>
|
|
<dd><dl>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/primitives/values.html">Values</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/primitives/references.html">References</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/primitives/arguments.html">Arguments</a></span></dt>
|
|
</dl></dd>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites.html">Composites</a></span></dt>
|
|
<dd><dl>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_operators.html">Lazy
|
|
Operators</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_statements.html">Lazy
|
|
Statements</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites/construct__new__delete__casts.html">Construct,
|
|
New, Delete, Casts</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_functions.html">Lazy
|
|
Functions</a></span></dt>
|
|
<dt><span class="section"><a href="phoenix/starter_kit/composites/more.html">More</a></span></dt>
|
|
</dl></dd>
|
|
</dl></dd>
|
|
<dt><span class="section"><a href="phoenix/reference.html">Reference</a></span></dt>
|
|
<dd><dl>
|
|
<dt><span class="section"><a href="phoenix/reference/phoenix_expressions.html">Phoenix Expressions</a></span></dt>
|
|
<dd><dl><dt><span class="section"><a href="phoenix/reference/phoenix_expressions/phoenix_ast.html">Language
|
|
Definition - The Pheonix AST</a></span></dt></dl></dd>
|
|
</dl></dd>
|
|
</dl>
|
|
</div>
|
|
<a name="phoenix.preface"></a><h2>
|
|
<a name="id2813832"></a>
|
|
<a class="link" href="index.html#phoenix.preface">Preface</a>
|
|
</h2>
|
|
<div class="blockquote"><blockquote class="blockquote"><p>
|
|
<span class="emphasis"><em>Functional programming is so called because a program consists entirely
|
|
of functions. The main program itself is written as a function which receives
|
|
the program's input as its argument and delivers the program's output as its
|
|
result. Typically the main function is defined in terms of other functions,
|
|
which in turn are defined in terms of still more functions until at the bottom
|
|
level the functions are language primitives.</em></span>
|
|
</p></blockquote></div>
|
|
<div class="blockquote"><blockquote class="blockquote"><p>
|
|
<span class="bold"><strong>John Hughes</strong></span>-- <span class="emphasis"><em>Why Functional Programming
|
|
Matters</em></span>
|
|
</p></blockquote></div>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="images/lambda_cpp.png" alt="lambda_cpp"></span>
|
|
</p>
|
|
<a name="phoenix.description"></a><h3>
|
|
<a name="id2774111"></a>
|
|
<a class="link" href="index.html#phoenix.description">Description</a>
|
|
</h3>
|
|
<p>
|
|
Phoenix enables Functional Programming (FP) in C++. The design and implementation
|
|
of Phoenix is highly influenced by <a href="http://www.cc.gatech.edu/~yannis/fc++/" target="_top">FC++</a>
|
|
by Yannis Smaragdakis and Brian McNamara and the <a href="http://www.boost.org/libs/lambda/doc/index.html" target="_top">BLL</a>
|
|
(Boost Lambda Library) by Jaakko Jaarvi and Gary Powell. Phoenix is a blend of
|
|
FC++ and BLL using the implementation techniques used in the <a href="http://spirit.sourceforge.net" target="_top">Spirit</a>
|
|
inline parser.
|
|
</p>
|
|
<p>
|
|
Phoenix is a header only library. It is extremely modular by design. One can
|
|
extract and use only a small subset of the full library, literally tearing the
|
|
library into small pieces, without fear that the pieces won't work anymore. The
|
|
library is organized in highly independent modules and layers.
|
|
</p>
|
|
<a name="phoenix.how_to_use_this_manual"></a><h3>
|
|
<a name="id2774163"></a>
|
|
<a class="link" href="index.html#phoenix.how_to_use_this_manual">How to use this manual</a>
|
|
</h3>
|
|
<p>
|
|
The Phoenix library is organized in logical modules. This documentation provides
|
|
a user's guide and reference for each module in the library. A simple and clear
|
|
code example is worth a hundred lines of documentation; therefore, the user's
|
|
guide is presented with abundant examples annotated and explained in step-wise
|
|
manner. The user's guide is based on examples: lots of them.
|
|
</p>
|
|
<p>
|
|
As much as possible, forward information (i.e. citing a specific piece of information
|
|
that has not yet been discussed) is avoided in the user's manual portion of each
|
|
module. In many cases, though, it is unavoidable that advanced but related topics
|
|
not be interspersed with the normal flow of discussion. To alleviate this problem,
|
|
topics categorized as "advanced" may be skipped at first reading.
|
|
</p>
|
|
<p>
|
|
Some icons are used to mark certain topics indicative of their relevance. These
|
|
icons precede some text to indicate:
|
|
</p>
|
|
<div class="table">
|
|
<a name="id2774208"></a><p class="title"><b>Table 1.1. Icons</b></p>
|
|
<div class="table-contents"><table class="table" summary="Icons">
|
|
<colgroup>
|
|
<col>
|
|
<col>
|
|
<col>
|
|
</colgroup>
|
|
<thead><tr>
|
|
<th>
|
|
<p>
|
|
Icon
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Name
|
|
</p>
|
|
</th>
|
|
<th>
|
|
<p>
|
|
Meaning
|
|
</p>
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="images/note.png" alt="note"></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Note
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Information provided is auxiliary but will give the reader a deeper
|
|
insight into a specific topic. May be skipped.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="images/alert.png" alt="alert"></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Alert
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Information provided is of utmost importance.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="images/tip.png" alt="tip"></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Tip
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
A potentially useful and helpful piece of information.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<br class="table-break"><div class="sidebar">
|
|
<p class="title"><b></b></p>
|
|
<p>
|
|
<span class="inlinemediaobject"><img src="images/note.png" alt="note"></span> Unless otherwise noted <code class="computeroutput"><span class="keyword">using</span>
|
|
<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">;</span></code>
|
|
is assumed
|
|
</p>
|
|
</div>
|
|
<a name="phoenix._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"></a><h3>
|
|
<a name="id2773163"></a>
|
|
<a class="link" href="index.html#phoenix._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"><span class="bold"><strong><span class="emphasis"><em>...To my dear daughter, Phoenix</em></span></strong></span></a>
|
|
</h3>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"><p><small>Last revised: January 12, 2011 at 14:05:18 GMT</small></p></td>
|
|
<td align="right"><div class="copyright-footer"></div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="images/next.png" alt="Next"></a></div>
|
|
</body>
|
|
</html>
|