|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56175 - in trunk/boost/spirit: home/lex home/lex/lexer home/lex/qi include
From: hartmut.kaiser_at_[hidden]
Date: 2009-09-13 12:10:44
Author: hkaiser
Date: 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
New Revision: 56175
URL: http://svn.boost.org/trac/boost/changeset/56175
Log:
Spirit: added missing files, minor fixes
Added:
trunk/boost/spirit/home/lex/primitives.hpp (contents, props changed)
trunk/boost/spirit/include/lex_char_token_def.hpp (contents, props changed)
trunk/boost/spirit/include/lex_primitives.hpp (contents, props changed)
Text files modified:
trunk/boost/spirit/home/lex/lexer/char_token_def.hpp | 2 ++
trunk/boost/spirit/home/lex/lexer/lexer.hpp | 5 +++--
trunk/boost/spirit/home/lex/qi/plain_token.hpp | 3 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
Modified: trunk/boost/spirit/home/lex/lexer/char_token_def.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/char_token_def.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/char_token_def.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -49,6 +49,8 @@
namespace boost { namespace spirit { namespace lex
{
+ using spirit::lit; // lit('x') is equivalent to 'x'
+
///////////////////////////////////////////////////////////////////////////
//
// char_token_def
Modified: trunk/boost/spirit/home/lex/lexer/lexer.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/lexer/lexer.hpp (original)
+++ trunk/boost/spirit/home/lex/lexer/lexer.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -319,9 +319,10 @@
typedef detail::lexer_def_<lexer> lexer_def;
typedef std::basic_string<char_type> string_type;
- lexer(unsigned int flags = match_flags::match_default)
+ lexer(unsigned int flags = match_flags::match_default
+ , id_type first_id = min_token_id)
: lexer_type(flags)
- , next_token_id(min_token_id)
+ , next_token_id(first_id)
, self(this_(), lexer_type::initial_state())
{}
Added: trunk/boost/spirit/home/lex/primitives.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/home/lex/primitives.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -0,0 +1,16 @@
+// Copyright (c) 2001-2009 Hartmut Kaiser
+//
+// 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)
+
+#if !defined(BOOST_SPIRIT_LEXER_PRIMITIVES_SEP_12_2009_0234PM)
+#define BOOST_SPIRIT_LEXER_PRIMITIVES_SEP_12_2009_0234PM
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/lex/lexer/char_token_def.hpp>
+#include <boost/spirit/home/lex/lexer/string_token_def.hpp>
+
+#endif
Modified: trunk/boost/spirit/home/lex/qi/plain_token.hpp
==============================================================================
--- trunk/boost/spirit/home/lex/qi/plain_token.hpp (original)
+++ trunk/boost/spirit/home/lex/qi/plain_token.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -51,7 +51,8 @@
///////////////////////////////////////////////////////////////////////////
template <typename TokenId>
- struct plain_token
+ struct plain_token
+ : primitive_parser<plain_token<TokenId> >
{
template <typename Context, typename Iterator>
struct attribute
Added: trunk/boost/spirit/include/lex_char_token_def.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/include/lex_char_token_def.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2001-2009 Hartmut Kaiser
+ http://spirit.sourceforge.net/
+
+ 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)
+=============================================================================*/
+#ifndef BOOST_SPIRIT_INCLUDE_LEX_CHAR_TOKEN_DEF
+#define BOOST_SPIRIT_INCLUDE_LEX_CHAR_TOKEN_DEF
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/lex/lexer/char_token_def.hpp>
+
+#endif
Added: trunk/boost/spirit/include/lex_primitives.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/spirit/include/lex_primitives.hpp 2009-09-13 12:10:43 EDT (Sun, 13 Sep 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2001-2009 Hartmut Kaiser
+ http://spirit.sourceforge.net/
+
+ 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)
+=============================================================================*/
+#ifndef BOOST_SPIRIT_INCLUDE_LEX_PRIMITIVES
+#define BOOST_SPIRIT_INCLUDE_LEX_PRIMITIVES
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/spirit/home/lex/primitives.hpp>
+
+#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk