Parsable Meta-Data for High-detail vs. Low-detail parts and primitives


Re: Parsable Meta-Data for High-detail vs. Low-detail parts and primitives
#48
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>&lt;</tag>. Frankly, it's a lot easier to write parsing code for something like that than the alternative.

Allen
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Parsable Meta-Data for High-detail vs. Low-detail parts and primitives - by Allen Smith - 2013-08-21, 20:39

Forum Jump:


Users browsing this thread: 1 Guest(s)