Skip to content

RBAP (Regressive Business Application Programming) programming language

License

Notifications You must be signed in to change notification settings

taizu-jin/rbap-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBAP lang

RBAP (Regressive Business Application Programming) is a high-level ( ͡~ ͜ʖ ͡°) programming language based on ABAP programming language by SAP.

Project is written in Rust and contains bytecode compiler & bytecode virtual machine for the language.

DATA: lv_string TYPE string,
      lv_template_string TYPE string,
      lv_int TYPE i.

lv_string = '(ツ)'.
WRITE lv_string.

lv_template_string = |\_{ lv_string }_/|.
WRITE: / ' ', lv_template_string, ' '.

WRITE: / lv_int.
lv_int = 5 + 10.
WRITE: / lv_int.
WRITE: / 'answer to life:', / (lv_int - 2 * 5) * (16 - 32 / 4) + 2.

IF lv_int == 15 AND 5 < 10 OR 15 > 5 OR 5 <> 10 OR NOT (5 <> 5) OR NOT rbap_false AND rbap_true.
    WRITE: 'TRUE'.
ENDIF.

METHOD sum IMPORTING iv_x TYPE i
                     iv_y TYPE i 
           RETURNING rv_sum TYPE i.
  rv_sum = iv_x + iv_y.
ENDMETHOD.

METHOD sub IMPORTING iv_x TYPE i
                     iv_y TYPE i 
           RETURNING rv_sub TYPE i.
  rv_sub = iv_x - iv_y.
ENDMETHOD.

DATA: lv_sum TYPE i,
      lv_sub TYPE i.

lv_sum = sum(2, 1).
lv_sub = sub(lv_sum, 2).

WRITE:/ lv_sum, / lv_sub.

CLI tool

CLI tool has the following functions.

  1. Run source file
rbap-lang run <source.rbap>
  1. Compile source file
rbap-lang compile <source.rbap> [dest]
  1. Execute compiled file
rbap-lang execute <compiled>
  1. Enter REPL
rbap-lang 
  1. Help
rbap-lang  --help

About

RBAP (Regressive Business Application Programming) programming language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages