Sketch.systems language syntax


#1

Hi,

I’m interested in whether or not the Sketch.systems language syntax is standardized/prior art, or specific to this program. Either way I’d love to be able to use the specification of a UI in it elsewhere, like in my code (I’m specifically thinking of writing a quick and dirty spec -> TypeScript model of the current state of a UI, so that I can ensure without introducing more tools, that my UI abides by my spec). As it doesn’t seem that this is open-source, I’ll probably just write such a tool myself esp since the spec syntax seems super simple, but if this is actually specified somewhere that would be nice to know :slight_smile:

Thanks!


#2

Sketch.Systems is based on Statecharts, for which there is a formal specification called SCXML: https://w3.org/TR/scxml/

If you want to write a tool yourself for this, best of luck - the spec is quite a beast!


#3

The sketch.systems syntax, however, is far simpler and probably can be modeled with much lower fidelity than the full statecharts implementation, no?

It seems not bad to write a parser for this, but given that it’s already being done on the sketch.systems website, it would be pretty cool if I didn’t have to do duplicate work like that, or at a minimum, if the syntax is formalized somewhere. If not I’ll just put together the lexer/parser stuff myself assuming that doesn’t infringe on IP somehow.


#4

Emailed the sketch.systems guys, and they shot back the EBNF grammar for this! Perfect, time to get cranking on it.

If someone else is interested in the grammar, probably should ping them directly to get that grammar, as I’m unsure if they want it to be published here/elsewhere.