Copyright ? 2008 Eric Niebler Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Table of Contents
DescriptionProto is a framework for building Domain Specific Embedded Languages in C++. It provides tools for constructing, type-checking, transforming and executing expression templates [2] . More specifically, Proto provides:
MotivationExpression Templates are an advanced technique that C++ library developers use to define embedded mini-languages that target specific problem domains. The technique has been used to create efficient and easy-to-use libraries for linear algebra as well as to define C++ parser generators with a readable syntax. But developing such a library involves writing an inordinate amount of unreadable and unmaintainable template mumbo-jumbo. Boost.Proto eases the development of domain-specific embedded languages (DSELs). Use Proto to define the primitives of your mini-language and let Proto handle the operator overloading and the construction of the expression parse tree. Immediately evaluate the expression tree by passing it a function object. Or transform the expression tree by defining the grammar of your mini-language, decorated with an assortment of tree transforms provided by Proto or defined by you. Then use the grammar to give your users short and readable syntax errors for invalid expressions! No more mumbo-jumbo -- an expression template library developed with Proto is declarative and readable. In short, Proto is a DSEL for defining DSELs. How to Use This DocumentationThis documentation makes use of the following naming and formatting conventions.
Finally, you can mentally add the following to any code fragments in this document: // Include all of Proto #include <boost/proto/proto.hpp> // Create some namespace aliases namespace mpl = boost::mpl; namespace fusion = boost::fusion; namespace proto = boost::proto; // Allow unqualified use of Proto's wildcard pattern using proto::_;
|