Ahh, great feedback! Let's write up some answers, shall we?
As much as I like the idea of using : as an OR separator, unfortunately this is perhaps a little too unconventional; I wouldn't want to stray too far from convention on this sort of subject, as too many people will become confused. I like it because it seems visually more sensible to me. (But then again I'm a little strange)
Or, alternatively have the syntax of param = value instead of param: value as this is more traditional. This also brings the "name" value under the definitions part more consistent with traditionally defined forms of regular expression, which is what this will end up being.
I am not familiar with this "too unconventional" of which you speek...
Well, I do see your point actually. I don't like using = though since I think that belongs inside the logic and is ugly, even though it actually is the most correct symbol to use. I could settle for switching the : and the | if people want me to, but the taller glyph of the bar made more sense to be used as a barrier between name and logic to me.
The only thing that I am wary of (and this is just down to my natural cynicism) is the license. I have to mention this, because I know others may make an issue of this. As the SDD is a metaformat (and thus not just locked to EE), you are of course perfectly free to copyright and request accreditation.
There are three major reasons for me releasing this under my own license. First, this is not a program and neither the Creative Commons nor the GPL are very good for it.
Second, I want this syntax to be available for implementation in any program. This means that I don't want people to alter it in any way they want since that would make different versions of SDD:s uncompatible with eachother. My dream is that every program that supports SDD will be able to load any SDD. I want a standard format, not a proprietory.
Third, I know I'll get credit in this project if the SDD is included, but I want to make sure that people who I'm not working actively with and still include my SDD will credit me as well.
Already there have been hints at license purism (when there was the whole GPL/LGPL/BSD debate first mentioned), and adding this in may seem contrary to this.
What happens if EE uses it (correctly) but the code forks and someone else uses it incorrectly (e.g. removes the accreditation)?
Then the people responsible for the development of the fork will be license breakers. As simple as that.
The SDD specification sort of intimates that it could handle any file; in theory it would be able to parse and highlight anything, however for binary files the SDD does become sort of redundant. It might be worth adding a line or two to suggest that it applies to text-based (or 'human readable') formats, rather than any file.
What exactly are "logical" places for a space to mean AND, and why is it not logical for a space to mean AND when adjacent to grouping brackets? The example of
cola | "bubbly" ["too sweet" : "too sour"]
> "The bubbly soap is too sour, and quite ugly too sweet Henry."
looks like it really should be written
cola | "bubbly" : "too sweet" : "too sour"
Sorry, I wrote that example wrong. The space indicates an AND whenever another operator isn't specified at that location. "[foo] [bar]" is indeed "foobar" and "[foo] : [bar]" is "foo" or "bar".
It would be nice to be able to say
cola | "bubbly but very " ["sweet" : "sour"]
> "The bubbly but very sweet soap may be bubbly but very sour, but soap may be only bubbly or only sweet or only sour."
The stuff inside brackets should appear to the neighboring syntax as a single object, just as if it had been written
cola | "bubbly but very " taste
taste | "sweet" : "sour"
True. This is what I intended, but the example was written wrong. I'll fix it.
I personally think AND should bind tighter than OR, whereas the spec indicates they are equal and bind left to right. Regardless, the spec document should note the order of precedence explicitly.
I will think a bit about this. I think you may be right, but I'm not sure yet.
Also, I think it would be helpful to mention that the '*' is nongreedy. Many people who use regular expressions will expect it to be greedy by default.
author=John Yeung link=topic=272.msg1833#msg1833 date=1170905073The '~' operator, as shown, would be more accurately called "contains" rather than "part of" (the description of it even uses the word "contains").
I guess that's it for now. Maybe I will have more to say later.
I think we're getting places with the syntax highlighting now. What would be nice is if you check through the SDD definition and try to find a language that can't be written using an SDD. I have already made it compatible with RPG IV (now there's an ugly language) and Inform 7 (now there's a pretty language), but surely there must be something I've missed?