Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.49 KB

README.md

File metadata and controls

64 lines (45 loc) · 1.49 KB

RedScript JISON Compiler

Redscript Compatible

Description

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.

Compiling

jison redscript.jison

Usage

As Command

node redscript.js input.rds > output.js

As Module

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);

As Website Widget

<script src="./redscript.js"></script>
<script>
parser.parse(input);
</script>

Bibliography

License

This repository is open-sourced software licensed under the MIT license.