Machine readable specifications

Andreas Rossberg rossberg at
Fri Mar 22 05:33:28 PDT 2013

On 22 March 2013 12:51, gaz Heyes <gazheyes at> wrote:
> I'd like to discuss a radical change on how JS specifications and others are
> constructed. I suggest int based rules are used to define language
> behaviour. I know this works with last state and next state tracking and
> expected states too maybe other behaviour could be defined this way as well.
> The first part of the specification should define a list of ints that
> correspond to the state starting from 0 with 0 being a start state of
> Nothing. The initial states should be specified as follows:
> initalStates = {0:"Nothing",1:"FunctionExpression", 2:"FunctionStatement",
> 3:"FunctionStatementIdentifier" ...

Aren't you confusing "machine readable specification" with "machine
readable syntax specification"? Syntax is only a small part of a
language spec, and quite frankly, the least interesting one by far.
Also, I don't see the benefit of your format. The EcmaScript spec
actually goes to quite some length to give a grammar that is LR(1).
The whole point is to keep it de facto "machine readable". But unlike
yours, it also is human readable.

(FWIW, there are at least two serious efforts of actually formalising
and mechanising the JavaScript language, i.e. its _semantics_, which
is a much more interesting endeavor. Techniques for formalised
language specs have made a great leap over the last decade, and I
sincerely hope we'll see them becoming mainstream at some point. But
as usual, the mainstream is very conservative, probably for valid


More information about the es-discuss mailing list