1.17.9 • Published 7 years ago

ribosomejs v1.17.9

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

RIBOSOMEJS Build Status

A simple generic code generation tool.

Forked from here This repository include only the javascript binary, javascript tests and javascript examples. The main goal of this fork is to add a javascript only npm package.

Installation

$ npm install -g ribosomejs

Usage

$ ribosomejs examples/errors.dna

Example

This example uses JavaScript as the control language:

readysteady.js.dna:

.#include <stdio.h>
.
.int main() {
var i;
for (i=3; i>0; i--) {
.    printf("@{i}!\n");
}
.    printf("Go!\n");
.    return 0;
.}

To generate the code do the following:

$ ribosome.js readysteady.js.dna

The script produces the following output (which happens to be a C program):

#include <stdio.h>

int main() {
    printf("3!\n");
    printf("2!\n");
    printf("1!\n");
    printf("Go!\n");
    return 0;
}

Original documentation.

1.17.9

7 years ago

1.17.8

7 years ago

1.17.6

7 years ago

1.17.5

7 years ago

1.17.4

7 years ago

1.17.2

7 years ago

1.17.0

7 years ago