dlang-community / SDLang-D

An SDLang (Simple Declarative Language) library for D
http://sdlang.org
Other
121 stars 21 forks source link

[docs] SDL format needs to be described #32

Open thedeemon opened 9 years ago

thedeemon commented 9 years ago

Neither official SDL site nor its mirror are working anymore, so SDL format itself is a mystery now.

marler8997 commented 9 years ago

SDL was already a mystery:)

Abscissa commented 9 years ago

I've now mirrored the site here (luckily grabbed from when web.archive.org was still serving a mirror): http://semitwist.com/sdl-mirror/Home.html

The main language description is on this page: http://semitwist.com/sdl-mirror/Language+Guide.html

I'm leaving this ticket open because SDLang-D should still provide a documented spec on it's own.

Abscissa commented 8 years ago

There's also now a description here: http://sdlang.org/

But again, a more formal spec is still needed.

trikko commented 8 years ago

Aren't parentesys on blank line accepted? Why? I put them wrong every single time.

Abscissa commented 8 years ago

On 06/08/2016 11:58 AM, Andrea Fontana wrote:

Aren't parentesys on blank line accepted? Why? I put them wrong every single time.

Despite what the use of curly braces may suggest, SDLang is a newline-terminated language, not a semicolon-terminated one. So the newline ends the tag. Additionally SDLang supports anonymous tags, with no name. Therefore, this:

foo { bar }

Is two tags:

  1. "foo" tag with no children.
  2. An unnamed anonymous tag with one child, "bar".

As with most newline-terminated languages, there IS a line-continuation operator:

foo \ { bar }

That makes the parser ignore the newline and treat it as:

foo { bar }

Abscissa commented 8 years ago

Come to think of it, that's something that would be important to include in an SDLang FAQ or something (note to self).