Boost logo

Boost Users :

From: Andreas Sæbjørnsen (andreas.saebjoernsen_at_[hidden])
Date: 2005-11-18 13:36:56


When preprocessing the code
#define $jack int test;
$jack
using any preprocessor using the wave library, in this case the
samples/lexed_tokens/lexed_tokens preprocessor , gives the following error:

PP_DEFINE (#369) at test.C ( 1/ 1): >#define<
SPACE (#393) at test.C ( 1/ 8): > <
lexed_tokens:
/home/saebjornsen1/projects/boost/boost/wave/token_ids.hpp:497:
boost::wave::util::flex_string<char, std::char_traits<char>,
std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> >
boost::wave::get_token_name(boost::wave::token_id): Assertion `id <
T_LAST_TOKEN-T_FIRST_TOKEN' failed.
Aborted

using the preprocesor cpp (from the gcc team) I get (as cpp test.C):
# 1 "test.C"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.C"

int test;

I believe the problem lies in that the lexer does not recognize the '$' as a
valid character within the name of macro definition.

Thanks
Andreas Saebjoernsen



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net