Skip to content
Redscript JISON compiler
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
examples
examples_out
lib
spec
LICENSE
README.md
redscript.jison
redscript.js

README.md

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.

You can’t perform that action at this time.