delorie.com/archives/browse.cgi | search |
> On 7 Feb 2015, at 10:24, gedau AT igor2 DOT repo DOT hu wrote: > > Would I write my own XML parser? In some extreme situation absolutely yes^1. In other situations, no. Would I like if some "interchange format" was designed from ground up assuming one way or the other, effectively making the decision instead of me? Absolutely no. And this is where our views differ, you prefer to use a lib and you are willing to make decisions that would make it harder for other developers to do their part in a non-lib way. > > Writing a full xml parser is hard, because the language is large. I believe a full lua parser would not be too easy either. To me it seems lua syntax is much more complex (and powerful) than what I would think is needed for describing a schematics or a footprint or a PCB. The more extra features it has over the minimum, the more effort it is to implement a correct parser. I would like to say more on this, but lack the time right now. For the moment I will just say that you are mistaken: our views are actually the same. The Lua syntax is very simple and easy to parse without the Lua library. As I said in another email one of the primary use cases for Lua is configuration and data files, so it is intentionally easy to parse - it even has a few syntactic niceties to /help/ parsing, such as allowing a list to end with a dangling comma, e.g list = { 1, 2, 3, }. Chris
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |