Click here to Skip to main content
15,891,704 members
Articles / Programming Languages / C++

Wave: a Standard conformant C++ preprocessor library

Rate me:
Please Sign up or sign in to vote.
4.96/5 (58 votes)
10 Jan 200413 min read 399.5K   4.4K   81  
Describes a free and fully Standard conformant C++ preprocessor library
/*=============================================================================
    Wave: A Standard compliant C++ preprocessor

    SLex (Spirit Lex) based C++ lexer
    
    Copyright (c) 2001-2004 Hartmut Kaiser
    http://spirit.sourceforge.net/

    Use, modification and distribution is subject to 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)

    See Copyright.txt for full acknowledgements.
=============================================================================*/

#if !defined(SLEX_FUNCTOR_HPP_557F0176_1340_4DC0_8E5A_1297F6AF9D46_INCLUDED)
#define SLEX_FUNCTOR_HPP_557F0176_1340_4DC0_8E5A_1297F6AF9D46_INCLUDED

#include "wave/cpplexer/slex/cpp_slex_lexer.hpp"

///////////////////////////////////////////////////////////////////////////////
namespace wave {
namespace cpplexer {

///////////////////////////////////////////////////////////////////////////////
//
//  slex_functor class
//
//      The slex_functor template class is provided for simplicity reasons. It 
//      imports the unified slex::lex_functor lexer interface template under 
//      a new name into the cpplexer namespace. 
//
//      As an alternative the lex_functor is to be explicitely decorated with
//      it's namespace (or imported by an using directive). This way it is 
//      possible by simply switching the used namespace to get different lexer 
//      implementations.
//
///////////////////////////////////////////////////////////////////////////////

template <typename IteratorT>
struct slex_functor 
:   public slex::lex_functor<IteratorT>
{
};

///////////////////////////////////////////////////////////////////////////////
}   // namespace cpplexer
}   // namespace wave

#endif // !defined(SLEX_FUNCTOR_HPP_557F0176_1340_4DC0_8E5A_1297F6AF9D46_INCLUDED)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
Actively involved in Boost and the development of the Spirit parser construction framework.

Comments and Discussions