
17 Apr
2009
17 Apr
'09
6:47 a.m.
2009/4/17 Michael P Mossey
I want to write a parser that can read a file with this format: the file has sections which are demarcated by keywords. Keywords always begin with two forward slashes and consist of letters, digits, and underscore. The text can be anything, including special characters. For instance:
//keyword some text and more text //another_keyword and) some { more text //ya_keyword $$ -- text
I'm not sure how to write a parser that considers anything but a double slash to be a valid part of the text.
Maybe you can use a combination of 'many', 'noneOf' or 'manyTill' ? Cheers, Thu