Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73412 - in trunk/libs/spirit/example/qi/compiler_tutorial: conjure2 conjure3
From: hartmut.kaiser_at_[hidden]
Date: 2011-07-28 11:45:17


Author: hkaiser
Date: 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
New Revision: 73412
URL: http://svn.boost.org/trac/boost/changeset/73412

Log:
Spirit: Fixing ambiguity of name 'token' in the lexer definition (as reported by gcc)
Text files modified:
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ast.hpp | 8 +++---
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.cpp | 40 ++++++++++++++++++------------------
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.hpp | 2
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/expression_def.hpp | 4 +-
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ids.hpp | 2
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer.hpp | 10 ++++----
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer_def.hpp | 38 +++++++++++++++++-----------------
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ast.hpp | 8 +++---
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.cpp | 44 ++++++++++++++++++++--------------------
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.hpp | 2
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/expression_def.hpp | 4 +-
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ids.hpp | 2
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer.hpp | 10 ++++----
   trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer_def.hpp | 38 +++++++++++++++++-----------------
   14 files changed, 106 insertions(+), 106 deletions(-)

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ast.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ast.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ast.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -53,13 +53,13 @@
 
     struct unary
     {
- token::type operator_;
+ token_ids::type operator_;
         operand operand_;
     };
 
     struct operation
     {
- token::type operator_;
+ token_ids::type operator_;
         operand operand_;
     };
 
@@ -146,13 +146,13 @@
 
 BOOST_FUSION_ADAPT_STRUCT(
     client::ast::unary,
- (client::token::type, operator_)
+ (client::token_ids::type, operator_)
     (client::ast::operand, operand_)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
     client::ast::operation,
- (client::token::type, operator_)
+ (client::token_ids::type, operator_)
     (client::ast::operand, operand_)
 )
 

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.cpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -245,25 +245,25 @@
         return true;
     }
 
- bool compiler::operator()(token::type const& x)
+ bool compiler::operator()(token_ids::type const& x)
     {
         BOOST_ASSERT(current != 0);
         switch (x)
         {
- case token::plus: current->op(op_add); break;
- case token::minus: current->op(op_sub); break;
- case token::times: current->op(op_mul); break;
- case token::divide: current->op(op_div); break;
-
- case token::equal: current->op(op_eq); break;
- case token::not_equal: current->op(op_neq); break;
- case token::less: current->op(op_lt); break;
- case token::less_equal: current->op(op_lte); break;
- case token::greater: current->op(op_gt); break;
- case token::greater_equal: current->op(op_gte); break;
+ case token_ids::plus: current->op(op_add); break;
+ case token_ids::minus: current->op(op_sub); break;
+ case token_ids::times: current->op(op_mul); break;
+ case token_ids::divide: current->op(op_div); break;
+
+ case token_ids::equal: current->op(op_eq); break;
+ case token_ids::not_equal: current->op(op_neq); break;
+ case token_ids::less: current->op(op_lt); break;
+ case token_ids::less_equal: current->op(op_lte); break;
+ case token_ids::greater: current->op(op_gt); break;
+ case token_ids::greater_equal: current->op(op_gte); break;
 
- case token::logical_or: current->op(op_or); break;
- case token::logical_and: current->op(op_and); break;
+ case token_ids::logical_or: current->op(op_or); break;
+ case token_ids::logical_and: current->op(op_and); break;
             default: BOOST_ASSERT(0); return false;
         }
         return true;
@@ -276,9 +276,9 @@
             return false;
         switch (x.operator_)
         {
- case token::minus: current->op(op_neg); break;
- case token::not_: current->op(op_not); break;
- case token::plus: break;
+ case token_ids::minus: current->op(op_neg); break;
+ case token_ids::not_: current->op(op_not); break;
+ case token_ids::plus: break;
             default: BOOST_ASSERT(0); return false;
         }
         return true;
@@ -376,7 +376,7 @@
         };
     }
 
- inline int precedence_of(token::type op)
+ inline int precedence_of(token_ids::type op)
     {
         return precedence[op & 0xFF];
     }
@@ -389,14 +389,14 @@
     {
         while ((rbegin != rend) && (precedence_of(rbegin->operator_) >= min_precedence))
         {
- token::type op = rbegin->operator_;
+ token_ids::type op = rbegin->operator_;
             if (!boost::apply_visitor(*this, rbegin->operand_))
                 return false;
             ++rbegin;
 
             while ((rbegin != rend) && (precedence_of(rbegin->operator_) > precedence_of(op)))
             {
- token::type next_op = rbegin->operator_;
+ token_ids::type next_op = rbegin->operator_;
                 compile_expression(precedence_of(next_op), rbegin, rend);
             }
             (*this)(op);

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/compiler.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -77,7 +77,7 @@
         bool operator()(unsigned int x);
         bool operator()(bool x);
         bool operator()(ast::identifier const& x);
- bool operator()(token::type const& x);
+ bool operator()(token_ids::type const& x);
         bool operator()(ast::unary const& x);
         bool operator()(ast::function_call const& x);
         bool operator()(ast::expression const& x);

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/expression_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/expression_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/expression_def.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -41,12 +41,12 @@
         // Main expression grammar
         expr =
                 unary_expr
- >> *(tokenid_mask(token::op_binary) > unary_expr)
+ >> *(tokenid_mask(token_ids::op_binary) > unary_expr)
             ;
 
         unary_expr =
                 primary_expr
- | (tokenid_mask(token::op_unary) > primary_expr)
+ | (tokenid_mask(token_ids::op_unary) > primary_expr)
             ;
 
         primary_expr =

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ids.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ids.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/ids.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -85,7 +85,7 @@
     struct binary_or_unary_op
         : make_op<op_type::unary | op_type::binary, op> {};
 
- struct token
+ struct token_ids
     {
         enum type
         {

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -76,14 +76,14 @@
     private:
         // get the type of any qi::raw_token(...) and qi::token(...) constructs
         typedef typename boost::spirit::result_of::terminal<
- boost::spirit::tag::raw_token(token::type)
+ boost::spirit::tag::raw_token(token_ids::type)
>::type raw_token_spec;
 
         typedef typename boost::spirit::result_of::terminal<
- boost::spirit::tag::token(token::type)
+ boost::spirit::tag::token(token_ids::type)
>::type token_spec;
 
- typedef std::map<std::string, token::type> keyword_map_type;
+ typedef std::map<std::string, token_ids::type> keyword_map_type;
 
     protected:
         // add a keyword to the mapping table
@@ -102,7 +102,7 @@
 
             typename keyword_map_type::const_iterator it = keywords_.find(kwd);
             BOOST_ASSERT(it != keywords_.end());
- return qi::raw_token((it != keywords_.end()) ? (*it).second : token::invalid);
+ return qi::raw_token((it != keywords_.end()) ? (*it).second : token_ids::invalid);
         }
 
         // extract a token(id) for the given registered keyword
@@ -113,7 +113,7 @@
 
             typename keyword_map_type::const_iterator it = keywords_.find(kwd);
             BOOST_ASSERT(it != keywords_.end());
- return qi::token((it != keywords_.end()) ? (*it).second : token::invalid);
+ return qi::token((it != keywords_.end()) ? (*it).second : token_ids::invalid);
         }
 
         lex::token_def<std::string> identifier;

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure2/lexer_def.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -11,9 +11,9 @@
 {
     template <typename BaseIterator>
     conjure_tokens<BaseIterator>::conjure_tokens()
- : identifier("[a-zA-Z_][a-zA-Z_0-9]*", token::identifier)
- , lit_uint("[0-9]+", token::lit_uint)
- , true_or_false("true|false", token::true_or_false)
+ : identifier("[a-zA-Z_][a-zA-Z_0-9]*", token_ids::identifier)
+ , lit_uint("[0-9]+", token_ids::lit_uint)
+ , true_or_false("true|false", token_ids::true_or_false)
     {
         lex::_pass_type _pass;
 
@@ -27,30 +27,30 @@
         add_keyword("return");
 
         this->self.add
- ("\\|\\|", token::logical_or)
- ("&&", token::logical_and)
- ("==", token::equal)
- ("!=", token::not_equal)
- ("<", token::less)
- ("<=", token::less_equal)
- (">", token::greater)
- (">=", token::greater_equal)
- ("\\+", token::plus)
- ("\\-", token::minus)
- ("\\*", token::times)
- ("\\/", token::divide)
- ("!", token::not_)
+ ("\\|\\|", token_ids::logical_or)
+ ("&&", token_ids::logical_and)
+ ("==", token_ids::equal)
+ ("!=", token_ids::not_equal)
+ ("<", token_ids::less)
+ ("<=", token_ids::less_equal)
+ (">", token_ids::greater)
+ (">=", token_ids::greater_equal)
+ ("\\+", token_ids::plus)
+ ("\\-", token_ids::minus)
+ ("\\*", token_ids::times)
+ ("\\/", token_ids::divide)
+ ("!", token_ids::not_)
             ;
 
         this->self += lex::char_('(') | ')' | '{' | '}' | ',' | '=' | ';';
 
         this->self +=
                 identifier
- | lex::string("\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/", token::comment)
+ | lex::string("\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/", token_ids::comment)
                 [
                     lex::_pass = lex::pass_flags::pass_ignore
                 ]
- | lex::string("[ \t\n\r]+", token::whitespace)
+ | lex::string("[ \t\n\r]+", token_ids::whitespace)
                 [
                     lex::_pass = lex::pass_flags::pass_ignore
                 ]
@@ -61,7 +61,7 @@
     bool conjure_tokens<BaseIterator>::add_keyword(std::string const& keyword)
     {
         // add the token to the lexer
- token::type id = token::type(this->get_next_id());
+ token_ids::type id = token_ids::type(this->get_next_id());
         this->self.add(keyword, id);
 
         // store the mapping for later retrieval

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ast.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ast.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ast.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -73,13 +73,13 @@
 
     struct unary : tagged
     {
- token::type operator_;
+ token_ids::type operator_;
         operand operand_;
     };
 
     struct operation
     {
- token::type operator_;
+ token_ids::type operator_;
         operand operand_;
     };
 
@@ -166,13 +166,13 @@
 
 BOOST_FUSION_ADAPT_STRUCT(
     client::ast::unary,
- (client::token::type, operator_)
+ (client::token_ids::type, operator_)
     (client::ast::operand, operand_)
 )
 
 BOOST_FUSION_ADAPT_STRUCT(
     client::ast::operation,
- (client::token::type, operator_)
+ (client::token_ids::type, operator_)
     (client::ast::operand, operand_)
 )
 

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.cpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -75,9 +75,9 @@
 
         switch (x.operator_)
         {
- case token::minus: return builder.CreateNeg(operand, "negtmp");
- case token::not_: return builder.CreateNot(operand, "nottmp");
- case token::plus: return operand;
+ case token_ids::minus: return builder.CreateNeg(operand, "negtmp");
+ case token_ids::not_: return builder.CreateNot(operand, "nottmp");
+ case token_ids::plus: return operand;
             default: BOOST_ASSERT(0); return 0;
         }
     }
@@ -167,36 +167,36 @@
         };
     }
 
- inline int precedence_of(token::type op)
+ inline int precedence_of(token_ids::type op)
     {
         return precedence[op & 0xFF];
     }
 
- inline bool is_left_assoc(token::type op)
+ inline bool is_left_assoc(token_ids::type op)
     {
         // only the assignment operators are right to left
- return (op & token::op_assign) == 0;
+ return (op & token_ids::op_assign) == 0;
     }
 
     llvm::Value* compiler::compile_binary_expression(
- llvm::Value* lhs, llvm::Value* rhs, token::type op)
+ llvm::Value* lhs, llvm::Value* rhs, token_ids::type op)
     {
         switch (op)
         {
- case token::plus: return builder.CreateAdd(lhs, rhs, "addtmp");
- case token::minus: return builder.CreateSub(lhs, rhs, "subtmp");
- case token::times: return builder.CreateMul(lhs, rhs, "multmp");
- case token::divide: return builder.CreateSDiv(lhs, rhs, "divtmp");
-
- case token::equal: return builder.CreateICmpEQ(lhs, rhs, "eqtmp");
- case token::not_equal: return builder.CreateICmpNE(lhs, rhs, "netmp");
- case token::less: return builder.CreateICmpSLT(lhs, rhs, "slttmp");
- case token::less_equal: return builder.CreateICmpSLE(lhs, rhs, "sletmp");
- case token::greater: return builder.CreateICmpSGT(lhs, rhs, "sgttmp");
- case token::greater_equal: return builder.CreateICmpSGE(lhs, rhs, "sgetmp");
+ case token_ids::plus: return builder.CreateAdd(lhs, rhs, "addtmp");
+ case token_ids::minus: return builder.CreateSub(lhs, rhs, "subtmp");
+ case token_ids::times: return builder.CreateMul(lhs, rhs, "multmp");
+ case token_ids::divide: return builder.CreateSDiv(lhs, rhs, "divtmp");
+
+ case token_ids::equal: return builder.CreateICmpEQ(lhs, rhs, "eqtmp");
+ case token_ids::not_equal: return builder.CreateICmpNE(lhs, rhs, "netmp");
+ case token_ids::less: return builder.CreateICmpSLT(lhs, rhs, "slttmp");
+ case token_ids::less_equal: return builder.CreateICmpSLE(lhs, rhs, "sletmp");
+ case token_ids::greater: return builder.CreateICmpSGT(lhs, rhs, "sgttmp");
+ case token_ids::greater_equal: return builder.CreateICmpSGE(lhs, rhs, "sgetmp");
 
- case token::logical_or: return builder.CreateOr(lhs, rhs, "ortmp");
- case token::logical_and: return builder.CreateAnd(lhs, rhs, "andtmp");
+ case token_ids::logical_or: return builder.CreateOr(lhs, rhs, "ortmp");
+ case token_ids::logical_and: return builder.CreateAnd(lhs, rhs, "andtmp");
             default: BOOST_ASSERT(0); return 0;
         }
     }
@@ -211,7 +211,7 @@
         while ((rest_begin != rest_end) &&
             (precedence_of(rest_begin->operator_) >= min_precedence))
         {
- token::type op = rest_begin->operator_;
+ token_ids::type op = rest_begin->operator_;
             llvm::Value* rhs = boost::apply_visitor(*this, rest_begin->operand_);
             if (rhs == 0)
                 return 0;
@@ -220,7 +220,7 @@
             while ((rest_begin != rest_end) &&
                 (precedence_of(rest_begin->operator_) > precedence_of(op)))
             {
- token::type next_op = rest_begin->operator_;
+ token_ids::type next_op = rest_begin->operator_;
                 rhs = compile_expression(
                     precedence_of(next_op), rhs, rest_begin, rest_end);
             }

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/compiler.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -97,7 +97,7 @@
         void init_fpm();
 
         llvm::Value* compile_binary_expression(
- llvm::Value* lhs, llvm::Value* rhs, token::type op);
+ llvm::Value* lhs, llvm::Value* rhs, token_ids::type op);
 
         llvm::Value* compile_expression(
             int min_precedence,

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/expression_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/expression_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/expression_def.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -41,12 +41,12 @@
         // Main expression grammar
         expr =
                 unary_expr
- >> *(tokenid_mask(token::op_binary) > unary_expr)
+ >> *(tokenid_mask(token_ids::op_binary) > unary_expr)
             ;
 
         unary_expr =
                 primary_expr
- | (tokenid_mask(token::op_unary) > primary_expr)
+ | (tokenid_mask(token_ids::op_unary) > primary_expr)
             ;
 
         primary_expr =

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ids.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ids.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/ids.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -85,7 +85,7 @@
     struct binary_or_unary_op
         : make_op<op_type::unary | op_type::binary, op> {};
 
- struct token
+ struct token_ids
     {
         enum type
         {

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -76,14 +76,14 @@
     private:
         // get the type of any qi::raw_token(...) and qi::token(...) constructs
         typedef typename boost::spirit::result_of::terminal<
- boost::spirit::tag::raw_token(token::type)
+ boost::spirit::tag::raw_token(token_ids::type)
>::type raw_token_spec;
 
         typedef typename boost::spirit::result_of::terminal<
- boost::spirit::tag::token(token::type)
+ boost::spirit::tag::token(token_ids::type)
>::type token_spec;
 
- typedef std::map<std::string, token::type> keyword_map_type;
+ typedef std::map<std::string, token_ids::type> keyword_map_type;
 
     protected:
         // add a keyword to the mapping table
@@ -102,7 +102,7 @@
 
             typename keyword_map_type::const_iterator it = keywords_.find(kwd);
             BOOST_ASSERT(it != keywords_.end());
- return qi::raw_token((it != keywords_.end()) ? (*it).second : token::invalid);
+ return qi::raw_token((it != keywords_.end()) ? (*it).second : token_ids::invalid);
         }
 
         // extract a token(id) for the given registered keyword
@@ -113,7 +113,7 @@
 
             typename keyword_map_type::const_iterator it = keywords_.find(kwd);
             BOOST_ASSERT(it != keywords_.end());
- return qi::token((it != keywords_.end()) ? (*it).second : token::invalid);
+ return qi::token((it != keywords_.end()) ? (*it).second : token_ids::invalid);
         }
 
         lex::token_def<std::string> identifier;

Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer_def.hpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer_def.hpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure3/lexer_def.hpp 2011-07-28 11:45:15 EDT (Thu, 28 Jul 2011)
@@ -11,9 +11,9 @@
 {
     template <typename BaseIterator>
     conjure_tokens<BaseIterator>::conjure_tokens()
- : identifier("[a-zA-Z_][a-zA-Z_0-9]*", token::identifier)
- , lit_uint("[0-9]+", token::lit_uint)
- , true_or_false("true|false", token::true_or_false)
+ : identifier("[a-zA-Z_][a-zA-Z_0-9]*", token_ids::identifier)
+ , lit_uint("[0-9]+", token_ids::lit_uint)
+ , true_or_false("true|false", token_ids::true_or_false)
     {
         lex::_pass_type _pass;
 
@@ -27,30 +27,30 @@
         add_keyword("return");
 
         this->self.add
- ("\\|\\|", token::logical_or)
- ("&&", token::logical_and)
- ("==", token::equal)
- ("!=", token::not_equal)
- ("<", token::less)
- ("<=", token::less_equal)
- (">", token::greater)
- (">=", token::greater_equal)
- ("\\+", token::plus)
- ("\\-", token::minus)
- ("\\*", token::times)
- ("\\/", token::divide)
- ("!", token::not_)
+ ("\\|\\|", token_ids::logical_or)
+ ("&&", token_ids::logical_and)
+ ("==", token_ids::equal)
+ ("!=", token_ids::not_equal)
+ ("<", token_ids::less)
+ ("<=", token_ids::less_equal)
+ (">", token_ids::greater)
+ (">=", token_ids::greater_equal)
+ ("\\+", token_ids::plus)
+ ("\\-", token_ids::minus)
+ ("\\*", token_ids::times)
+ ("\\/", token_ids::divide)
+ ("!", token_ids::not_)
             ;
 
         this->self += lex::char_('(') | ')' | '{' | '}' | ',' | '=' | ';';
 
         this->self +=
                 identifier
- | lex::string("\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/", token::comment)
+ | lex::string("\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/", token_ids::comment)
                 [
                     lex::_pass = lex::pass_flags::pass_ignore
                 ]
- | lex::string("[ \t\n\r]+", token::whitespace)
+ | lex::string("[ \t\n\r]+", token_ids::whitespace)
                 [
                     lex::_pass = lex::pass_flags::pass_ignore
                 ]
@@ -61,7 +61,7 @@
     bool conjure_tokens<BaseIterator>::add_keyword(std::string const& keyword)
     {
         // add the token to the lexer
- token::type id = token::type(this->get_next_id());
+ token_ids::type id = token_ids::type(this->get_next_id());
         this->self.add(keyword, id);
 
         // store the mapping for later retrieval


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