Coder Social home page Coder Social logo

b-xiang / covscript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from covscript/covscript

0.0 1.0 0.0 2.54 MB

Covariant Script Programming Language: The Interpreter

Home Page: http://covscript.org/

License: Apache License 2.0

CMake 0.11% Batchfile 0.21% Shell 0.27% C++ 92.86% C 6.55%

covscript's Introduction

Covariant Script Programming Language: The Interpreter

Build Status
Welcome to the Covariant Script programming language!
Covariant Script is an open source, cross-platform programming language
This project is an officially maintained Covariant Script interpreter

Switch language

Features

  • Cross-platform, supporting most mainstream operating systems
  • The extension system is powerful and easy to use
  • Written in C++ 11, which compatibility is better
  • Independent and efficient compiler front end
  • The compilation results can be exported
  • Efficient memory management system
  • Support compile-time optimization
  • Reference count garbage collector
  • C/C++ Native Interface(CNI)

Extensions

Documentations

CovScript Online Documents

Installation

Windows

Download the precompiled executable on the Latest Release.
You can also use other tools (like MinGW) to compile. If you already have a G++ compiler installed, you can use make.bat. Make sure the compiler supports C++11.
Note: The Covariant Script interpreter supports the MSVC compiler, but due to the restrictions imposed by the Windows system on DLL export symbols, the current Covariant Script extension mechanism is almost completely paradoxical on MSVC. Although we provide make_msvc.bat, it is not recommended and is for reference only. Windows developers who need to embed Covariant Script please compile the source code directly, but all extension libraries are temporarily unavailable.

Linux

First, download source from CovScript Github Page.
Then you have two choices:

  • With G++ and makefile
$ sh ./make.sh
  • With CMake toolchain
    We've provided a CMakeLists.txt.

Note: Some distributions' G++ are too old to support C++11, make sure you G++ compiler is up to date.

Mac OS

All the steps are the same as Linux, tested under macOS Sierra 10.12.5.

Run

Interpreter

cs [arguments..] <file> <args...>

Arguments

  • --compile-only Only compile
  • --dump-ast Export abstract syntax tree
  • --wait-before-exit Wait before process exit
  • --log-path PATH Set the log and AST exporting path
  • --import-path PATH Set the import path

Note that if you do not set the log and AST exporting path, both will be output directly to the standard output stream.

Repl

cs_repl [arguments..]

Arguments

  • --args Specify the operating parameters
  • --silent Does not display the version info
  • --wait-before-exit Wait before process exit
  • --log-path PATH Set the log path
  • --import-path PATH Set the import path

Note that if you do not set a log path, it will be output directly to the standard output stream.

Installer

Covariant Script Installer provides a simple toolchain configuration method for the Microsoft Windows platform. You can download, install, upgrade and uninstall the toolchain by simply push a button. You can download the latest installer from the CovScript Programming Language Home. For more information, visit the Covariant Script Installer.

GUI

Covariant Script provides a one-stop code editing, running, debugging experience for the Microsoft Windows platform . The CovScript Installer will automatically downloads the CovScript GUI for you. For more information, please visit Covariant Script GUI.

Package Manager

cspkg is a package manager written in Covariant Script whose main function is to manage extensions or packages for Covariant Script. cspkg will be released with the latest version of Covariant Script. For more information, please visit Covariant Script Package Manager.

IntelliJ Plugin

The IntelliJ Plugin is available now:

Examples

The examples folder contains several example programs written by CovScript.

Copyright

The author of the Covariant Script Programming Language is @mikecovlee.
Copyright © 2018 Michael Lee

Thanks

Ranked by contribution.

Comments

Comments by @ice1000:

This is a programming language created by my friend Michael Lee, written in C++. The detailed description is on it’s website so I’ll just put some comments here. This is a C-like language (at least the function call syntax is of C style), while functions, structs, namespaces are ends with end like Ruby, and it has the concepts of package import using (the module system).
Its parser is hand-written (very complex, although parsers are trivial), which impressed me (I didn’t even think of that when working on Lice, I just wrote an AST evaluator).
This language supports invoking functions written in C++, like JNI.
CovScript mostly features its powerful standard library, which has database, GUI, web access, regular expressions.

covscript's People

Contributors

mikecovlee avatar imkiva avatar

Watchers

James Cloos 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.