Michael Heidemann Wrote:That is a good approach. Maybe I'll use it in the future if needed.
I have mainly to deal with files that might be somewhat correct and I have to found out what is missing to be conform to official specs. :-)
This is a quite different task.
Oh, there's a lot more going on in my parser than just that :-) It looks at as much information as is available to try and determine the correct 'type' for the file, and recognises all the outdated and 3rd-party values that can turn up in places of the !LDRAW_ORG line. It's not foolproof - that would be impossible - but it does detect and fix every single known error in the official library, plus some nasties I found in .mpd files I've downloaded from various sources.