G
Gert Van den Eynde
Hi all,
Could you give me some pointers on how to parse a text input file in C++?
Most will be config-file style input (keyword = data), but some maybe
'structures' like material{ name = n, position = x,y,z}.
Things that I have in my mind now are: 1) simply reading in strings,
analysing the strings myself, 2) writing a lexer/parser, 3) xml parsing, 4)
line by line and RegExp.
1) may be too much work and too much re-work when the input file syntax
changes
2) may be too much work to begin with, no experience there. Any good
tutorials?
3) no experience there. Any good tutorials?
4) is there a good regexp library for c++?
thanks for any tips,
gert
Could you give me some pointers on how to parse a text input file in C++?
Most will be config-file style input (keyword = data), but some maybe
'structures' like material{ name = n, position = x,y,z}.
Things that I have in my mind now are: 1) simply reading in strings,
analysing the strings myself, 2) writing a lexer/parser, 3) xml parsing, 4)
line by line and RegExp.
1) may be too much work and too much re-work when the input file syntax
changes
2) may be too much work to begin with, no experience there. Any good
tutorials?
3) no experience there. Any good tutorials?
4) is there a good regexp library for c++?
thanks for any tips,
gert