spizkapa
08-27-2002, 06:35 AM
Hi,
in my software I need to get a number of processes to read a file with various options. On each line there is an option and a setting for it, for example:
experiment_no: 12
If the line above was read, I expect a variable in my code to be set to 12. Now, I can do this using scanf and friends (as has been going on for over a year now) but now that the file format is changing and becoming more complicated, I think I ought to use a text scanner like flex.
Has anyone used flex and is willing to give me a hand? Any help massively appreciated, getting this should bring my software almost up to release 1. Thanks.
in my software I need to get a number of processes to read a file with various options. On each line there is an option and a setting for it, for example:
experiment_no: 12
If the line above was read, I expect a variable in my code to be set to 12. Now, I can do this using scanf and friends (as has been going on for over a year now) but now that the file format is changing and becoming more complicated, I think I ought to use a text scanner like flex.
Has anyone used flex and is willing to give me a hand? Any help massively appreciated, getting this should bring my software almost up to release 1. Thanks.