I have known that it is possible to get information like position_cache and error_handler at the same time by using multiple with directives refer to this doc: https://www.boost.org/doc/libs/1_75_0/libs/spirit/doc/x3/html/spirit_x3/tutorials/annotation.html
It can be configured like this when initializing the parser
with<tag1>(data1)
[
with<tag2>(data2)[p]
]
But I'm still not sure how to manipulate the parser's context configuration when using tag1 and tag2 simultaneously.
In the boost-spirit official example. I can only find code that demonstrate how to config context type when using just single with directive. like the code below
typedef x3::context<
error_handler_tag
, std::reference_wrapper<error_handler_type>
, phrase_context_type>
context_type;
So I want to know how to declare this context type for a parser that can with two different tag?