Skip to content
/ yabasic Public
forked from marcIhm/yabasic

Yabasic - A simple Basic interpreter for Unix and Windows

License

Notifications You must be signed in to change notification settings

yann64/yabasic

 
 

Repository files navigation

Yabasic - A simple Basic interpreter for Unix and Windows.

Yabasic is a traditional basic-interpreter. It comes with goto and various loops and allows to define subroutines and libraries. It does simple graphics and printing. Yabasic can call out to libraries written in C and allows to create standalone programs. Yabasic runs under Unix and Windows and has a comprehensive documentation; it is small, simple, 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. The various files README.org in subdirectories may contain some hints to.

A short overview on changing yabasic can be found at http://www.yabasic.de/changing.html.

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

To build yabasic just under Unix, please read the matching section further down below. In a nutshell it is just the usual make.

This (hopefully) applies to linux, bsd and commercial variants of unix, including MacOS.

The rest of this section gives some hints on the full building process of yabasic including windows, linux and the pages of the website.

For this everything runs on windows, but is started from within wsl (windows subsystem for linux); this even applies to building the windows binaries with visual studio. As a result, you will need to install both before starting.

The repository contains a directory named ansible, with the information to install the necessary prerequisites.

If you build both for Windows and linux, you should check out the repository into c:\work\yabasic. Your should use the same repo from within wsl too.

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 (windows, unix and web) 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 2019, which can be installed free of charge.

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 steps below. The process is mostly automated, only asking for confirmation at certain key-points. Depending on your changes and desired products, you may be able to skip certain steps.

(Type “rake h” to read this text again from within any directory)

All steps are done from within wsl (windows subsystem for linux), only the directory changes.

  • Implement some features, fix some bugs, write tests, improve the docu; the files for nearly all of the features of yabasic can be found in directory unix/lang.
  • In directory unix/lang:
    • Edit configure.ac to increment the version of yabasic
    • Document changes in NEWS
    • do rake; this does:
      • Run tests
      • Create tar, rpm and deb
  • In directory windows:
    • do rake; this does:
      • Build windows executable
      • Create setup.exe and zip-files (which will ask for admin priveleges)
  • In directory web:
    • do rake; this does:
      • Create new git tag and use the content of NEWS as the message
      • Upload everything to www.yabasic.de
  • Maybe submit new version to symantec and microsoft virus detection

About

Yabasic - A simple Basic interpreter for Unix and Windows

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 43.3%
  • C 23.6%
  • Shell 21.6%
  • Roff 7.1%
  • Makefile 1.5%
  • Yacc 1.1%
  • Other 1.8%