Code Monkey home page Code Monkey logo

vostok's Introduction

Проект "Восток" - русская версия введения.

Project "Vostok"

Oberon-07 translator.

The goal is to create the translator from several Oberon dialects into readable, error-resistant code for industrial programming languages. Also, a possible future target is machine code, probably through intermediaries as LLVM.

The translator is written in its own input language - Oberon. Generates code for:

  • A common subset of C and C++ compatible with gcc, clang, tcc and CompCert.
  • Java 1.7
  • JavaScript compatible with ECMAScript 5
  • Oberon-07, Active Oberon and Component Pascal
  • Plant UML Activity Diagrams

License is LGPL for translator's code and Apache for libraries, tests and examples.

Install in Ubuntu 18.04:

Add repository and execute command:

$ /usr/bin/sudo apt install vostok-bin

Building in POSIX:

Script init.sh build from pre-generated C-files the 0-version of the Oberon translator - result/bs-ost, which can serve the rest of the tasks: generating the executable code of the translator - result/ost from Oberon-source and testing.

$ ./init.sh

Short help about the main targets and variables of build script:

$ result/bs-ost run make.Help -infr . -m source

Build the translator:

$ result/bs-ost run make.Build -infr . -m source

Testing:

$ result/bs-ost run 'make.Test; make.Self; make.SelfFull' -infr . -m source

Building in Windows:

Build with direct using of tcc:

> init.cmd
> result\bs-ost run make.Build -infr . -m source -cc tcc

Of course, the directory with the tcc.exe must be specified in the PATH environment variable.

Testing. C-compiler(gcc, clang, tcc) searched automatically:

> result\bs-ost run 'make.Test; make.Self; make.SelfFull' -infr . -m source

Installing in POSIX:

Copying the executable to /usr/local/bin/ and libraries to /usr/local/share:

$ /usr/bin/sudo result/ost run make.Install -infr . -m source

Usage:

Help about translator usage:

$ ost help

Oberon-modules running example:

$ ost run 'Out.Int(999 * 555, 0); Out.Ln'

Same from project directory without installed ost:

$ result/ost run 'Out.Int(999 * 555, 0); Out.Ln' -infr .

The parameter '-infr .' indicates the path to the infrastructure, which also includes the path, where located library module Out.

Example of executable binary build:

$ result/ost to-bin ReadDir.Go result/Dir -infr . -m example
$ result/Dir

In addition to the command line parameters from the previous examples, here introduced the name of the final executable file - result/Dir, which is required for the "to-bin" command. Also indicated an additional path for searching modules - "-m example", because of ReadDir.mod located in directory "example". ReadDir module contains "Go" - exported procedure without parameters. It will be entry point for "result/Dir".

Launching a demo web server by 8080 port with the ability to edit and execute code in a browser:

$ cd demo-server
$ go build server.go
$ ./server

Questions:

Russian-speaking forums, but possible to ask in english: forum.oberoncore.ru, zx.oberon.org

News:

Russian blog through Google translate

vostok's People

Contributors

dmitrys99 avatar comdivbyzero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.