Parsing lines in a file
Sean Farrow <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <HE1PR0501MB257025AA31AC5674869CC4FEC6430@HE1PR0501MB2570.eurprd05.prod.outlook.com> |
Hi all,
I have a file that has two kinds of lines:
:function GetTextInRect
:script InsertEmoticon
I have the following structure in which I'd like to parse the information:
struct JawsFunction
{
wstring Name; //function/script name.
FunctionType Type;
};
The FunctionType enum is defined as follows:
enum FunctionType
{
ID_TYPE_FUNCTION, //function.
ID_TYPE_SCRIPT //script.
};
Using spirit, how do I translate the :script and :function to their enum equivalents, what is the best way of reading any number of these lines in any order from a file? Finally, how do I parse to the end of the line, excluding the line feed?
Any help appreciated.
Kind regards
Sean.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general