
Hi: I'm working on a project and have a file with lines of the following form: :function AddBrailleColors :Synopsis Provides a method for the user to assign custom colors to be marked in Braille. :Description Brings up a dialog for the user to assign the colors on the screen to Braille marking. :Param String/strForeground Enter the variable containing the RGB string for the foreground color. :Param String/strBackground Enter the RGB string for the background color. :Param String/sApp Enter the value for the app file name to be used. :Category Colors What boost library do people feel is the best one to use to parse this form of input, boost.Regex, boost.proto or boost.spirit? And given the input, what would be the best way of going about doing this? I need the function, Synopsis, Description, and then the parameters ideally placed in separate variables. Any help appreciated. Cheers Sean.

Hi: I'm working on a project and have a file with lines of the following form: :function AddBrailleColors :Synopsis Provides a method for the user to assign custom colors to be marked in Braille. :Description Brings up a dialog for the user to assign the colors on the screen to Braille marking. :Param String/strForeground Enter the variable containing the RGB string for the foreground color. :Param String/strBackground Enter the RGB string for the background color. :Param String/sApp Enter the value for the app file name to be used. :Category Colors What boost library do people feel is the best one to use to parse this form of input, boost.Regex, boost.proto or boost.spirit? And given the input, what would be the best way of going about doing this? I need the function, Synopsis, Description, and then the parameters ideally placed in separate variables. Any help appreciated. Cheers Sean.
If you don't need regexp, what's wrong with sscanf/istream?

On Thu, Jul 14, 2011 at 7:18 AM, Sean Farrow
Hi:
I’m working on a project and have a file with lines of the following form: <snip> What boost library do people feel is the best one to use to parse this form of input, boost.Regex, boost.proto or boost.spirit?
boost.proto is _not_ about parsing, it's about creating EDSLs based on Expression Templates. boost.spirit is implemented with proto, and a EDSL for describing grammars in a EBNF-style. Another example of an EDSL built on proto is boost.xpressive which is a regular expression EDSL. boost.regex, as the name says is also about regexes.
And given the input, what would be the best way of going about doing this?
I'd personally go for spirit.
I need the function, Synopsis, Description, and then the parameters ideally placed in separate variables.
Any help appreciated.
Cheers
Sean.
HTH, Thomas
participants (3)
-
Sean Farrow
-
Thomas Heller
-
Viatcheslav.Sysoltsev@h-d-gmbh.de