Raumkraut wrote:... Do you really want to sentence GRF creators to the same hell as web developers have been living for the past 10 years?

Hell? I don't feel I live in a hell (yes, I'm a web developer too). The problem in webdeveloping is that browsers are incompliant.
In general: if the parser is compliant, but also accepts incompliant stuff, you don't have to go through hell as a developer as long as you stick to the rules.
Raumkraut wrote:From a programming perspective, the issue in question - extraneous sprites - should probably raise a warning (during compilation and/or interpretation), rather than an error or being ignored altogether.
I'd prefer a warning over an error any time, if processing of the code doesn't result in an immediate crash of the program. And yes, a warning is better than ignoring stuff, but I don't see why a program should terminate with an error message if it already knows how to ignore certain things (in this case bare real sprites).
DaleStan wrote:What happens to this too-intelligent parser when it hits a recolor sprite and parses it as an action 0?
If that recolour sprite is in a place where a recolour sprite could be expected, it should recognise it as a recolour sprite and parse it as such. If the recolour sprite is in an invalid location, it could as well try to parse it as an action 0, coming to the conclusion that it's invalid.
DaleStan wrote:What happens when a bare real-sprite grows a defined meaning?
If that happens, the parser needs to be changed in order to understand that new meaning. This means that the code fragment from my previous post can't be parsed properly. Which isn't a problem, because that fragment was invalid in the first place. The author just got lucky that it was accepted by some older parser.
DaleStan wrote:There is great safety in by-the-book parsing.
Oh yes indeed. Everyting that's not in the book is invalid by default.
DaleStan wrote:why encourage or reward anything other than strict conformance?
I don't consider that as a reward or encouragement, but just as getting lucky.
DaleStan wrote:And it is also fine for the Intel 386 to skip instructions it doesn't understand (such as CMOVxx) in an attempt to find instructions that it does understand?
What else should it do? Explode? I don't think a processor can generate error messages all by itself. Maybe it could return an error code or something to the program from which it received the instructions. Then it's up to the program to handle that error, either by issueing a warning, but it could as well just ignore it if it's programmed to do so.
DaleStan wrote:And it is also fine for the Intel 386 to skip instructions it doesn't understand (such as CMOVxx) in an attempt to find instructions that it does understand?
Invalid example. The Intel 386 is a piece of hardware while NFO is a software programming language.
DaleStan wrote:Invalid example...something else.
Those parsers (probably) all parse by the book. If they were smarter than the book alone, they could as well attempt to understand what the programmer was trying to accomplish. If the results are unexpected, the programmer knows he (or she for that matter) made a mistake. It would be nice if the parser has some kind of debugging mode which then includes hints for the programmer on where to look to fix his code.
Also, please note that I don't have to be right. I'm just explaining my logic. I'm fine with things going by the book, but I also would appreciate a little user friendlyness. Let's say I need to develop a parser that can parse a date in yyyy/mm/dd format. I decide to make it user friendly to also accept dd/mm/yyyy dates. If I now feed a dd/mm/yyyy date to my parser, that date is in fact invalid according to the book, but it still gets accepted.
Now the openttd parser encounters some real sprites which shouldn't be there. It recognises the lines a real sprites, but knows those shouldn't be there. Now I really don't care if it skips those or marks the grf as invalid. The ones who do care should visit
http://bugs.openttd.org/ and file a proper bugreport. I don't see it as a bug, but as a feature; others apparently think otherwise, which is perfectly fine, but that doesn't render my logic invalid. It's just my logic which differs from someone else's logic. The same way the TTDPatch parser differs from the OpenTTD parser.
Also I would like to apologise to all users who have seen the 'new post flag' raised on this topic the past few days just to discover something completely different. I'd appreciate if some moderator could split this discussion into a new topic.