[proto] need explanation in implementing distributive law

Hi all,
i would like to implement a grammar that transform a*(b+c) to a*b+a*c
where a,b and c are terminals. The implementation of this grammar is
straightforward and should compile. However i got errors that i dont
understand.
Below is the code that reproduces the errors.
Thanks for any help,
Kim
# include

Kim Kuen Tang wrote:
Hi all,
i would like to implement a grammar that transform a*(b+c) to a*b+a*c where a,b and c are terminals. The implementation of this grammar is straightforward and should compile. However i got errors that i dont understand. Below is the code that reproduces the errors.
It compiles on g++ 4.3 with boost 1.42 -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35

Hi joel, the code doesnt compile on msvc 9.0 with boost 1.42. I will try the latest boost trunk version. joel falcou schrieb:
Kim Kuen Tang wrote:
Hi all,
i would like to implement a grammar that transform a*(b+c) to a*b+a*c where a,b and c are terminals. The implementation of this grammar is straightforward and should compile. However i got errors that i dont understand. Below is the code that reproduces the errors.
It compiles on g++ 4.3 with boost 1.42

Hi Kim, I added the following lines necessary for my compiler (MSVC2005): #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #define _left callproto::_left #define _right callproto::_right #endif But received "fatal error C1004: unexpected end-of-file found" which I don't recognize. andrew

As a follow-up, the attached code seems to compile and yield the expected result. andrew
participants (3)
-
Andrew Durward
-
joel falcou
-
Kim Kuen Tang