Yabasic - A simple Basic interpreter for Unix and Windows.
HTML Shell C Makefile Yacc Ruby Other
Clone or download
Latest commit db1beaf May 13, 2018
Failed to load latest commit information.
unix just to get tagging right again May 13, 2018
web building under windows May 13, 2018
windows better diagnostic Apr 1, 2018
.gitignore using iexpress for setup package Nov 6, 2016
README.org typo Aug 17, 2017


Yabasic - A simple Basic interpreter for Unix and Windows.

Yabasic implements the most common and simple elements of the basic language. It comes with goto/gosub, with various loops, with user defined subroutines and Libraries. Yabasic does simple graphics and printing. Yabasic runs under Unix and Windows, it is small, open source and free.

If you want to write programs for yabasic, see http://www.yabasic.de for documentation.

If you want to modify yabasic itself and participate in its development, read below.

Table of Content

The three top-level directories

Read below for an overview; some directories may contain their own README.org with more details.

An additional top-level directory ‘products’ is created for the installable artifacts, which are created during the various build steps.

Directory ‘unix’

Here are most of the c-sources of yabasic as well as the input files for flex and bison, which describe yabasics grammer.

Also find the documentation, which is written in docbook-xml and transfromed into html or man.

Directory ‘windows’

The build process uses the c-sources from the unix-directory, so here you will only find the sources for the windows-specific setup-program.

Directory ‘web’

The html-Files and erb-templates for www.yabasic.de.

Building a new version of the website (by typing ‘rake’) is tested under windows, but should be workable under unix too.

Building Yabasic

Building with rake

Yabasic’s build process relies on rake. Rake is similar to make, but its Rakefiles (and the tool itself) are written in ruby. Therefore you need to install ruby and rake to build yabasic.

Each of the three top-level directories (see above) has its own Rakefile, and just typing ‘rake’ should be enough to build the respective components.

A Note on .erb-Files

In some directories you will find files with the ending ‘.erb’ (e.g. the documentation ‘yabasic.xml.erb’); these files contain tiny snippets of ruby code (‘erb’ stands for ‘embedded ruby’) and are processed by one of the Rakefiles to generate the matching file without ‘.erb’ (‘yabasic.xml’ is generated this way).

So if you intend to edit any of those files, make sure, that you rather edit the corresponding ‘.erb’ file; because otherwise your changes will be overwritten by the next Rakefile-processing.

Building under Unix

Yabasic can be build on any system with these tools: autoconf, bison, flex, gcc, ruby.

All steps are automated with rake (ruby make); so typically you just need to invoke rake, which e.g. invokes autoconf and make in turn.

The last step of the building process moves the artefacts into the folder /work/yabasic/prodcts . If you have a machine with both linux and windows, this folder can be usedully shared between both operating systems.

Building under Windows

Yabasic is be compiled with Visual Studio 2015, which can be installed free of charge.

The project files assume ‘C:\work\yabasic’ as the git checkout directory.

The rest of the windows-toolchain relies on the presence of a fairly complete cygwin-installation, including ruby. The git-directory should be symlinked to /work/yabasic.

All steps are automated with rake (ruby make); so typically you just need to invoke rake, which e.g. invokes the Visual Studio C-Compiler in turn.

A typical building sequence

To build yabasic, go through the stages in this sequence:

  • Build under Unix in directory unix
  • Build under Windows in directory windows
  • Build under Windows in directory web

Depending on your changes and desired products, you do not need to build on all stages however.

The tern “build” in the above list refers to these subtasks:

  • “git pull/add/commit/push” as all changes between the platforms unix and windows are only propagated by git
  • “rake” as (almost) all tasks are automated within the Rakefile