...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Copyright © 2015 Abel Sinkovics
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
Metaparse is a parser generator library for template metaprograms. The purpose
of this library is to support the creation of parsers that parse at compile
time. This library is intended to be used for embedded domain specific language
creation for C++. The input of the generated parser is a compile time string,
see string
.
The result of the parsing process is either an error or any other result the
writer of the parser specifies.
The library is similar to Boost.Spirit, however while parsers built with Spirit parse at run-time, parsers built with Metaparse parse at compile-time. Parsers built with Metaparse can output:
See section What can be built from a compile-time string? for further details.
Based on C++11 features the library can provide advanced utilities for defining
the input string, the rest of the library works on C++98-based compilers as
well. Note that if you build the tests and examples with Boost.Build using
GCC or Clang, the compiler will not have C++11 (or newer) enabled. To build
the tests and examples in C++11-mode, you need to run b2
cxxflags="-std=c++11"
.
An external tutorial can be found at https://github.com/sabel83/metaparse_tutorial#metaparse-tutorial
Last revised: August 04, 2022 at 02:55:31 GMT |