This is the Linux app named cppsp whose latest release can be downloaded as cppspv1.4.5-@custom_Likec_c++Macros,butSaferandNamespaced!sourcecode.tar.gz. It can be run online in the free hosting provider OnWorks for workstations.
Download and run online this app named cppsp with OnWorks for free.
Follow these instructions in order to run this app:
- 1. Downloaded this application in your PC.
- 2. Enter in our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 3. Upload this application in such filemanager.
- 4. Start the OnWorks Linux online or Windows online emulator or MACOS online emulator from this website.
- 5. From the OnWorks Linux OS you have just started, goto our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 6. Download the application, install it and run it.
cppsp
Ad
DESCRIPTION
cppsp is a transpiled script-like language. Its compiler:cppsp_compiler is a kind of source-to-source compiler.
Download the cppsp_compiler.exe or compiler the sourcecode by yourself.
Requirement:prepare your own c++ compiler and set it's folder to environment path.
Optional: put the folder path of exe to environment.
Use cmd or other console to compiler .cppsp file: cppsp_compiler(if not in environment path:.\cppsp_compiler.exe or c:...\cppsp_compiler.exe) script.cppsp.
Setting c++ include/lib folder by .ini file include.ini:C:...\include1,c:...\include2 lib.ini:C:...\lib1,c:...\lib2.
You can rename cppsp_compiler.exe(or cppsp_compiler) to any name you like to change compile command like:cppsp、abcdef....
Official repo on github:
https://github.com/user19870/cppsp
r/cppsp:
https://www.reddit.com/r/cppsp/
Features
- #useclang or #usegcc : use clang++ or g++ compile command
- @command("..."): add command when compile like:-Os、-m64
- #overwrite:make @command() overwrite g++ .... or clang++ compile command like @command("g++ -Os -m64 -nostdlib -shared -o dll.dll dll.cpp") and add "*/" after int main(){..} also add "/*" in front of int main(){..}
- #skipcompile : skip g++/clang++ compile and directly run output
- import :import header in c++ and accept import iostream,x,y,.....
- @function<<...>>: inject everything(void()、int()、bool()、even #define and using namespace) in <<...>> to the space under #include above int main().Better not put any word, symbol or blanks but enalbe "enter" or nothing after ">>" to make difference between operation like a>>b and <<....>>
- @inject(...) :inject everything in (...) to int main(){...} ----@inject(....)and @inject("....") are both legal. @inject(....) belonging to line ast and @inject("....") belonging to token ast but @inject(....) will be transpiled before @inject("....") and any keyword belonging to token ast.)
- print(): print content to console like print("12\n"," ",1," ",2.1,true,false," ")
- input(): input data to variables
- //:comment
- var.....type: declare variables with/without values. Support multi variables and type can be written as int/float/char/string/bool. <{1+1}> is a value but 1+1 not(it's expression)
- if/else/else if(...){...}:similar to "if/else/else if" in c++ but enable syntax: if(input(x)>1). Can write cppsp keywords and operation( =,+,-,*,/,++....) in {...}
- for(...){...}:similae to "for" in c++ like for( type i=0,i<10,i++), for(type i=0,j=10;i<10&&j>0;i++,j++) or for(type i:x) . Can write cppsp keywords and operation( =,+,-,*,/,++....) in {...}
- function f()...:function f() type {...return...} will define a function with type, function f(){...} will define a void function,function f() will declare a void function, function f(){...return...} will define a function with auto in c++.
- struct S{...} : define a structure and the name of structure will become a type ,so can use something like var....S
- @custom xxx("...",<{...}>,...) : @custom can let users write own syntaxs. it is a transpile-time pattern-driven code generator with nested templates, namespace-scoped features "..." can generate code, <{...}> is similar to it but will become a placeholder and replaced by parameter when the custom syntax is called. Code will generate in global and the inner of some cppsp keywords. namespace only accept one level like: namespace n{ @custom.... }
This is an application that can also be fetched from https://sourceforge.net/projects/cppsp-user19870/. It has been hosted in OnWorks in order to be run online in an easiest way from one of our free Operative Systems.