But now you have introduced order dependency and content limitations. Parsing syntax in this kind of format is an unnecessary headache, because it's inherently very fragile.
Most structured languages have solved this problem. Look to XML for inspiration, not LDraw. If you want key-value pairs, then you either need to force keys and values, or you need a symbol to indicate a key with no value, e.g. <tag/>. You also need an escape sequence for including the delimiter(s) themselves in values, e.g. <tag><</tag>. Frankly, it's a lot easier to write parsing code for something like that than the alternative.
Allen
Most structured languages have solved this problem. Look to XML for inspiration, not LDraw. If you want key-value pairs, then you either need to force keys and values, or you need a symbol to indicate a key with no value, e.g. <tag/>. You also need an escape sequence for including the delimiter(s) themselves in values, e.g. <tag><</tag>. Frankly, it's a lot easier to write parsing code for something like that than the alternative.
Allen