Angel \”Java\” Lopez on Blog

December 22, 2012

CobolScript (1) COBOL compiler to JavaScript/Node.js

Filed under: COBOL, JavaScript, NodeJs, Open Source Projects, Programming Languages — ajlopez @ 5:38 pm

Next Post

Today, I started a new project at my Github account:

https://github.com/ajlopez/CobolScript

It’s a compiler from COBOL to JavaScript. It’s work in progress, but the Hello, world is running:

https://github.com/ajlopez/CobolScript/blob/master/samples/hello/hello.cobs

DISPLAY "HELLO, WORLD".

You can run it, executing:

node run hello.cobs

A more complete code:

https://github.com/ajlopez/CobolScript/blob/master/samples/hellopgm/hello.cob

IDENTIFICATION DIVISION.
    PROGRAM-ID. HELLO.
    AUTHOR. A.J.LOPEZ.
    INSTALLATION. TEST.
    DATE-WRITTEN. 2012-12-22.
    DATE-COMPILED. 2012-12-22.
ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
        SOURCE-COMPUTER. NODE.
        OBJECT-COMPUTER. NODE.
DATA DIVISION.
PROCEDURE DIVISION.
    DISPLAY "HELLO, WORLD".

Let’s run it executing:

node run hello.cob

My work was written using TDD (Test-Driven Development). I shoudl add a lot of things: picture support, working storage section, file section, and maybe, SQL execute commands. But it’s a good starting point. It can run on browser and on Node.js.

Keep tuned!

Angel “Java” Lopez

http://www.ajlopez.com

http://twitter.com/ajlopez

2 Comments »

  1. Cool! Your rock @ajlopez! 🙂

    Comment by garduino (@garduino) — December 22, 2012 @ 9:52 pm

  2. […] Previous Post […]

    Pingback by CobolScript (2) First Factorial Function « Angel ”Java” Lopez on Blog — December 24, 2012 @ 5:03 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: