11 Oct 17:45
[Proto] Strange behavior with semantic action and custom tag function
From: Joel Falcou <joel.falcou <at> u-psud.fr>
Subject: [Proto] Strange behavior with semantic action and custom tag function
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-10-11 15:49:16 GMT
Subject: [Proto] Strange behavior with semantic action and custom tag function
Newsgroups: gmane.comp.lib.boost.user
Date: 2008-10-11 15:49:16 GMT
I'm stuck on some problem that may en dup silly.
I have a DSL defined by the following grammar :
struct dimen_grammar : bp::or_<
//////////////////////////////////////////////////////////////////////////
// Terminals are dimensional values or integral values
//////////////////////////////////////////////////////////////////////////
bp::or_< bp::terminal< dimensions<bp::_,bp::_> >
, integer_grammar
>
//////////////////////////////////////////////////////////////////////////
// dimen can be added together or scaled by an integer
// or shifted left or right by an integer
//////////////////////////////////////////////////////////////////////////
,bp::or_< bp::plus<dimen_grammar,dimen_grammar>
,bp::multiplies<dimen_grammar,integer_grammar>
,bp::multiplies<integer_grammar,dimen_grammar>
,bp::shift_left<dimen_grammar,integer_grammar>
,bp::shift_right<dimen_grammar,integer_grammar>
>
> {};
I've defined a proper callable_context that take care of my special
terminals and built
a terminal class. At this point, everythign works perfect : i can build
(Continue reading)
RSS Feed