LES, aka Loyc Expression Syntax, is a grammar language created in 2012 by David Piepgrass.
#2270on PLDB | 12Years Old |
LES is an interchange format for syntax trees, comparable to s-expressions but designed for languages in the Algol family such as C, C++, C#, Java, EcmaScript, Rust and Python. It can be described as “JSON for code”: just as XML/YAML/JSON are tree structures that assign no particular meaning to the data inside, likewise LES represents syntax trees without assigning any particular meaning to them.
@[#static]
fn factorial(x::int)::int {
var result = 1;
for (; x > 1; x--) {
result *= x;
};
return result;
};