RedScript was created to provide a first class functional experience in the browser. This repository contains a compiler for it written in JISON, which is essentially a clone of the parser generator Bison (thus Yacc,) but in JavaScript.
jison redscript.jison
node redscript.js input.rds > output.js
var parser = require("./redscript").parser;
function exec (input) {
return parser.parse(input);
}
// input is String variable with RedScript code, output is translated code to JavaScript
var output = exec(input);
<script src="./redscript.js"></script>
<script>
parser.parse(input);
</script>
This repository is open-sourced software licensed under the MIT license.