Boost Spirit 2 - Symbol expansion and backtracking
问题 I am having some issues specifying and parsing a rather simple grammar. vertex = char+ edge = vertex " -> " vertex start = ((vertex | edge) eol)* input = "a\nb\na -> b\n" Spirit is doing the following: "a" -> vertex "\n" -> eol -> start "b" -> vertex "\n" -> eol -> start and "a" -> vertex terminate instead of identifying the edge in the end and parsing the entire input. That is, it could parse the entire input but it's not. Shouldn't it backtrack and attempt to parse using the alternate rule?