使用 Boost.Spirit 时无法正确解析

Failing to parse correctly when using Boost.Spirit

我正在研究一种编程语言 (full project here) implemented using Boost.Spirit, and I am struggling with the following problem. I have the following declaration for a function (line 77 in this file):

function_body_rule %=
  identifier_rule
  >> lit(L":=")
  >> lit(L"(")
  >> -parameter_declaration_rule % ','
  >> lit(L")")
  //>> lit(L"->") // epic fail if you uncomment this
  >> type_specification_rule
  >> lit(L"{")
  >> *(assignment_statement_rule)
  >> lit(L"}");

在某些时候,它只是一个接一个地有两个令牌。如果我取消注释第二个标记,当我输入正确的序列时,我的函数将不再被正确解析。如果我评论令牌,一切都很好(虽然我显然不能包括 ->)。

你能帮我弄清楚这是怎么回事吗?

找到答案 - 键盘输入将破折号重写为 -(减号)。