Doubts on class types on boost spirit x3

Hi, I'm relatively new to programming in modern C++ (have done some things in C using some newer C++ concepts but that's about it).

I'm trying to use boost's spirit x3 to parse filenames from my computer to reorder sort the corresponding files in new folders. For this, my initial intention was to create a class containing a parser and a string. If a filename parsed correctly then that a link would be created to that file in the path contained in the string.

It may be wrong from a design point of view but more importantly I have no clue as to what a parser is in spirit x3. The slides that are supposed to be a starting point always use auto in variables but in this case I want to make it a member so I need to know what it is.

They also use the expression:
auto parser = rule<class parser_name, optional_attribute>() = int_ >> ...
And Visual Studio tells me the last part is a rule_definition<...> so I can't just replace auto for that because the <...> is an error.

I'd be happy to get any guidance at all. Thanks!
Last edited on
Topic archived. No new replies allowed.