title: boost spirit expectation failure
body: <p>I want to parse a vector of the following struct:</p>
  
  <pre><code>BOOST_FUSION_ADAPT_STRUCT(
      event_model::OTNDescriptor,
      (int32_t, qualifier)
      (int32_t, ordinal)
      (std::string, name)
      (int32_t, type)
  )
  </code></pre>
  
  <p>My grammer looks as follows:</p>
  
  <pre><code>struct swat_types_ : qi::symbols&lt;char, unsigned&gt;
  {
      swat_types_()
      {
          using namespace event_model;
  
          add
              ("int", SWAT_INT4)
              ("int4", SWAT_INT4)
              ("int8", SWAT_INT8)
              ("bigint", SWAT_INT8)
              ("string", SWAT_STRING)
          ;
      } 
  } swat_types;
  
  template&lt;typename Iterator&gt;
  struct Rules
  {
      qi::rule&lt;Iterator, event_model::OTNDescriptor(), ascii::space_type&gt;
          data_member_line;
      qi::rule&lt;Iterator, std::string()&gt; data_name;
      qi::rule&lt;Iterator, void(int&amp;, std::string&amp;)&gt; data_identifier_pair;
      qi::rule&lt;   Iterator,
                  std::vector&lt; event_model::OTNDescriptor&gt;(),
                  ascii::space_type&gt; dm_lines;
  
      Rules() {
          data_name =
              + (char_("a","z") | char_("A","Z") | char_('_'));
  
          data_identifier_pair =
              lexeme[int_ [ _r1 = _1] &gt; ':' &gt; data_name [ _r2 = _1]];
  
          data_member_line =
              eps [ at_c&lt;0&gt;(_val) = event_model::OTN_REQUIRED ]
              &gt;&gt;  -( no_case[lit("optional")]
                          [at_c&lt;0&gt;(_val) = event_model::OTN_OPTIONAL]
                  |   no_case[lit("required")]
                          [at_c&lt;0&gt;(_val) = event_model::OTN_REQUIRED])
              &gt; data_identifier_pair( at_c&lt;1&gt;(_val), at_c&lt;2&gt;(_val) )
              &gt; no_case[swat_types [at_c&lt;3&gt;(_val) = _1]]
  
              &gt; ';'
          ;
          //dm_lines = data_member_line &gt;&gt; data_member_line;
          dm_lines = data_member_line &gt;&gt; *(data_member_line);
      }
  };
  </code></pre>
  
  <p>My Harnass looks like this:</p>
  
  <pre><code>std::string str4("REquireD 0:lala int4; REquireD 1:googoo int4; ");
  
  std::string::const_iterator iter4=str4.begin();
  std::string::const_iterator end4=str4.end();
  
  std::vector&lt;event_model::OTNDescriptor&gt; res4;
  
  r = phrase_parse(iter4, end4, rules.dm_lines, boost::spirit::ascii::space, res4);
  
  for(std::vector&lt;event_model::OTNDescriptor&gt;::iterator it = res4.begin(); it &lt; ires4.end(); it++)
  {
      std::cout &lt;&lt; it-&gt;name &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>If I switch the rule specification from a kleene star specification to a sequence match no errors.</p>
  
  <pre><code>//dm_lines = data_member_line &gt;&gt; data_member_line;
  dm_lines = data_member_line &gt;&gt; *(data_member_line);
  </code></pre>
  
  <p>otherwise I get an expectation error when trying to parse my example sentence (shown in harnass).</p>
  
  <pre><code>terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::spirit::qi::expectation_failure&lt;__gnu_cxx::__normal_iterator&lt;char const*, std::string&gt; &gt; &gt; &gt;'
    what():  boost::spirit::qi::expectation_failure
  Aborted
  </code></pre>
  
  <p><strong>Ideally I want to write the rule like this <code>dm_lines = +(data_member_line)</code> (this doesn't work either). What is going on that causes the expectation failure when using '*' and '+' operators ? but NOT when matching a sequence ?. And how do I fix it.</strong></p>