Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2004-03-30 01:51:27

Stephen Torri wrote:
> I am having problems with compiling a simple parsing example that I created.
> I have read over half of the spirit guide and took one of the examples a
> guide for creating my program. Here is the full error message that I hinted
> above. What is wrong with my code? I am using boot-1.31.0 with gcc-3.3.2
> (gentoo).

I see a couple of errors.

> RE_Parser reg_rdr;

I think you mean:

     RE_Grammar reg_rdr;

> void process_Kleene (char const*, char const*){ cout << "Kleene star" <<
> endl;};

This should be static:

     static void process_Kleene (char const*, char const*)...

If you really want it to be a non-static member function, use bind or

> void process_Or (char const*, char const*, char* const*){ cout << "Or"
> << endl;};

This won't work. The expected signature is:

     (char const*, char const*)

> void process_Char (char const*){ cout << "Char" << endl;};

Neither will this. It should be

     static void process_Char (char const*, char const*)...

<<< see attached >>>


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at