www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - SDLang-D v0.10.0 - Big convenience improvements

reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
https://github.com/Abscissa/SDLang-D

New in v0.10.0:
Big convenience enhancements to DOM interface and an improved pull 
parser interface. Plus documentation improvements and a couple bugfixes.

Full changelog:
https://github.com/Abscissa/SDLang-D/blob/master/CHANGELOG.md

===================================================

SDLang-D is a D library to read and write SDLang. Both a DOM and a Pull 
Parser are provided.

SDLang <http://sdlang.org> is similar to XML/JSON/YAML, but much simpler 
and less verbose. It look like this:

-----------------------------
// A few basic values
first "Joe"
last "Coder"
ip "127.0.0.1" port=80

// Supports child tags
folder "myFiles" color="yellow" protection=on {
     folder "my documents" {
         document "resume.pdf"
     }
}
-----------------------------
Language Guide: https://github.com/Abscissa/SDLang-D/wiki/Language-Guide
Sep 25 2016
next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 09/25/2016 06:12 PM, Nick Sabalausky wrote:
 -----------------------------
 // A few basic values
 first "Joe"
 last "Coder"
 ip "127.0.0.1" port=80

 // Supports child tags
 folder "myFiles" color="yellow" protection=on {
      folder "my documents" {
          document "resume.pdf"
      }
 }
 -----------------------------
Example of using some of the new API features: --------------------------------------------- import sdlang; Tag root = parseFile("the-above.sdl"); string first = root.expectTagValue!string("first"); // Required string last = root.getTagValue!string("last"); // Optional // Custom default values (if omitted, default value is T.init): string ip = root.getTagValue!string("ip", "192.168.1.1"); int port = root.getTagAttribute!int("ip", "port", 8080); Tag folder = root.expectTag("folder"); string folderName = folder.expectValue!string(); assert(folderName == "myFiles"); bool folderProtection = folder.getAttribute!bool("protection"); string subfolderName = folder.getTagValue!string("folder"); assert(subfolderName == "my documents"); ---------------------------------------------
Sep 26 2016
prev sibling next sibling parent reply Chris <wendlec tcd.ie> writes:
On Sunday, 25 September 2016 at 22:12:21 UTC, Nick Sabalausky 
wrote:
 https://github.com/Abscissa/SDLang-D

 New in v0.10.0:
 Big convenience enhancements to DOM interface and an improved 
 pull parser interface. Plus documentation improvements and a 
 couple bugfixes.

 Full changelog:
 https://github.com/Abscissa/SDLang-D/blob/master/CHANGELOG.md

 ===================================================

 SDLang-D is a D library to read and write SDLang. Both a DOM 
 and a Pull Parser are provided.

 SDLang <http://sdlang.org> is similar to XML/JSON/YAML, but 
 much simpler and less verbose. It look like this:

 -----------------------------
 // A few basic values
 first "Joe"
 last "Coder"
 ip "127.0.0.1" port=80

 // Supports child tags
 folder "myFiles" color="yellow" protection=on {
     folder "my documents" {
         document "resume.pdf"
     }
 }
 -----------------------------
 Language Guide: 
 https://github.com/Abscissa/SDLang-D/wiki/Language-Guide
I was actually thinking of using SDL for pseudo code non-programmers could write, e.g. to create rule files that a program could execute. It could work nicely with `if` and `else` tags + attributes.
Sep 27 2016
parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 09/27/2016 04:55 AM, Chris wrote:
 I was actually thinking of using SDL for pseudo code non-programmers
 could write, e.g. to create rule files that a program could execute. It
 could work nicely with `if` and `else` tags + attributes.
A simple programming language that's SDLang-compliant would definitely be interesting!
Sep 27 2016
parent Chris <wendlec tcd.ie> writes:
On Tuesday, 27 September 2016 at 15:26:04 UTC, Nick Sabalausky 
wrote:
 On 09/27/2016 04:55 AM, Chris wrote:
 I was actually thinking of using SDL for pseudo code 
 non-programmers
 could write, e.g. to create rule files that a program could 
 execute. It
 could work nicely with `if` and `else` tags + attributes.
A simple programming language that's SDLang-compliant would definitely be interesting!
I think SDLang is underrated and I hope it will find more adopters in the future. JSON is useful and used all over the place. But it has shortcomings that are probably due to the fact that it was never meant to be used as widely as it is today (i.e. outside JS). The lack of comments is a big minus.
Sep 30 2016
prev sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On 09/25/2016 06:12 PM, Nick Sabalausky wrote:
 https://github.com/Abscissa/SDLang-D

 New in v0.10.0:
 Big convenience enhancements to DOM interface and an improved pull
 parser interface. Plus documentation improvements and a couple bugfixes.

 Full changelog:
 https://github.com/Abscissa/SDLang-D/blob/master/CHANGELOG.md
Small bugfix update, v0.10.1, fixing one issue: scientific notation. https://github.com/Abscissa/SDLang-D/issues/50
Oct 04 2016