I saw that our favourite library makes huge steps towards v2 so I tried the new interface. I didn't find any hints about the preferred channel for comments so - here are my first findings :
In file settings_parser method parse_settings never returns in case the given stream is invalid :
I added an additional test for the other stream flags :
while ( !(strm.fail() || strm.eof()) )
which breaks the endless loop.
Unfortunately even after correcting this parsing the typical configuration files fails as soon the spirit parser hits the first line with substantial information (''). The same happens with the next line in case I comment the section identifier. I tried the standard example (libs/log/example/settings_file) - same result. I was unable to deduce the origin for this failure until now …
Regards
Volker
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I poked a little bit in the parser and IMHO the expression parsing the section_name is malformed (the graph also eats the closing square bracket). I replaced the rule as follows :
I have thought about the endless loop a bit more and I think the suggested change is not correct. The failbit may get set in the stream before the end of stream occurs (and it does get set in my tests), so stopping the loop on it is not right. OTOH providing an invalid stream as an argument is an error on the user's side, and such errors are typically not checked for. But I guess I can add the check and an exception for just this case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
v2 is stable, it's undergoing the fast track review in Boost ML now. If everything goes as planned it should move to Boost trunk in a few weeks. Chances are it gets released with Boost 1.54 or 1.55.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(revision 814)
I saw that our favourite library makes huge steps towards v2 so I tried the new interface. I didn't find any hints about the preferred channel for comments so - here are my first findings :
In file settings_parser method parse_settings never returns in case the given stream is invalid :
I added an additional test for the other stream flags :
which breaks the endless loop.
Unfortunately even after correcting this parsing the typical configuration files fails as soon the spirit parser hits the first line with substantial information (''). The same happens with the next line in case I comment the section identifier. I tried the standard example (libs/log/example/settings_file) - same result. I was unable to deduce the origin for this failure until now …
Regards
Volker
Thanks for the feedback, I'll correct the loop condition. Could you specify your platform, compiler and Boost version?
Sure.
Platform : Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-36-generic x86_64)
Compiler : gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
boost version : 1.52.0
I poked a little bit in the parser and IMHO the expression parsing the section_name is malformed (the graph also eats the closing square bracket). I replaced the rule as follows :
I have thought about the endless loop a bit more and I think the suggested change is not correct. The failbit may get set in the stream before the end of stream occurs (and it does get set in my tests), so stopping the loop on it is not right. OTOH providing an invalid stream as an argument is an error on the user's side, and such errors are typically not checked for. But I guess I can add the check and an exception for just this case.
The updated code is in trunk.
Hi Andrey,
Very glad to see this project alive and moving forward to become a part of boost.
Could you please advise a status of v2? Do you have any date in mind for a stable release?
Many thanks in advance,
Volodya
v2 is stable, it's undergoing the fast track review in Boost ML now. If everything goes as planned it should move to Boost trunk in a few weeks. Chances are it gets released with Boost 1.54 or 1.55.
Woohoo! That's awesome news! I can finally ditch my dusty old download of (boost log) trunk and move forward with vanilla boost. High five.