Skip to content

stewartpark/palang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pa Language

Pa Language is a toy compiled language written in Python, C++11.

Currently, the only working implentation of Pa is Pypac, which is in the current git repository. The official Pa compiler will be reimplemented in Pa once the specification of the language is finished and polished up.

Screencast

Work done so far

  • Initial implementation that is written in Python to bootstrap the language.
  • A few intrinsic funtions(print, input, len, range)
  • Binary level interface to import/export
  • Several libraries to make the language a bit more useful at this stage
    • tcp: TCP socket library
    • file: File I/O
  • import/export statements
  • Basic control flow statements: if, for, while, return(=)
  • Basic variable/function definition
  • Inline function definition(lambda)
  • Inline variable definition(lambda that gets executed right away)
  • Class/Instance (constructor, destructor, methods, properties, operator overloading)
  • -> operators(list -> func)
  • Garbage collector (Boehm GC)
  • Exception handling

Future work

  • Unimplemented operators (to different types)
  • Network/file I/O library that is based on libuv
  • the &, !, ? operators

Installation

Just type the below:

$ git clone https://github.com/stewartpark/palang
$ cd palang
$ pip install -r requirements.txt
$ sudo apt-get install build-essential g++-4.9 libgc-dev 
$ ./build_libs.sh

Examples

About

A toy compiled language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published