Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit] Semantic actions (binary parser) - user error or bug?
From: TONGARI (tongari95_at_[hidden])
Date: 2011-05-01 12:22:51


2011/5/1 Hartmut Kaiser <hartmut.kaiser_at_[hidden]>

> Semantic actions in Karma are supposed to _supply_ the attribute value to
> generate output from. Therefore your start rule needs to be written as:
>
> start = big_dword >> big_dword[_1 = ref(temp)];
>

I believe it was the Qi part (use %= instead):

    start %= big_dword >> big_dword [ref(temp) = _1];

Then the 2nd assertion fails at runtime, however:

      start %= big_dword >> big_dword;

works fine...really strange to me... how can the action affect the
attribute?



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