shlomohass / Cxy

The Cxy Programming Language Compiler Reference Implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cxy

Join the chat at https://gitter.im/BourgondAries/Unnamed-Language

Tutorial

The tutorials are located in documentation/cxys/.

The Best. Language. Ever.

We want to make the best language, ever. The cleanest. The nicest. The fastest. The most consistent. Language. Ever. We want raw control with assembly, and ease of coding with scripting. We want EXTREME power... with EXTREME templates. This language will be. Amazing. Okay okay, it won't be better than DSL's made for their specific domains, but generally, this language will be reliable, simple, practical, and avoid general 'wtf'. It needs to be hackable so it runs on machines ranging from low-powered microcontrollers, to high-end servers! The final solution to a high-performance, C-like, reliable language.

Why another language?

Because the languages I've seen don't offer me what I want. I want control. I want blazing speed. I want to be able to abstract away boilerplate code nicely. I want a single simple build system, I want dependency tracking. Functional and modular purity. DETERMINISTIC DESTRUCTION! Strict enforcement of dependencies! This is what makes the cleanest language ever. So clean that ANYONE can EASILY join a totally new project with ease!

Have AWESOME ideas? Want to contribute?

Send a pull request or send me an email at macocio [at] gmail [dot] com. I'm also available on Skype as 'macocio'.

How this project is organized

The repository for The Cxy compiler. This repository contains the following folders:

  • code - where the code related to the compiler is stored. Tests are also stored here and must start with "test" in their filename.
  • codegenerators - code that generates code. Useful for generating switch-to-string code.
  • documentation - the documentation of the language and the compiler
  • libraries - here we store external and internal libraries. These are pieces of code that can be run. They are considered independencies.
  • tests - contains input and expected output files with a test_runner script. The script checks if the output is equal to the excepted output. It also runs unit tests.

The makefile contains the instructions to build the project. make just compiles and puts the executable in binaries/tulc.exe make tdd runs the tests in ./tests. You should only run tests this way as the test_runner script is not suited for direct calling.

Clear Overview

The Cxy dependency rule is enforced in this compiler. Modules (.cpp and their corresponding .hpp files) can ONLY depend/include on:

  1. A file in a subdirectory of their current directory.
  2. A file in a subdirectory directly from root.
  3. Be provided information from a parent.

This means that dependencies are kept clean and local. Spaghetti is avoided.

Current status!

The BEST language ever uses simple, consistent lexing and parsing. Hand-written of course for crisp minimalism! Visual tools: What on earth DOES IT MEAN?! The green nodes are verified to be completely PURE subtrees. Blue nodes are part of a pure subtree, and can later be verified or cleaned to be pure. Red nodes are not pure. Purity primer:

functional purity: same input into function -> same output. Always
modular purity: object creation with same operations -> same object

We can only guarantee purity if the object never uses a global. Dependency Graph

About

The Cxy Programming Language Compiler Reference Implementation

License:GNU General Public License v3.0


Languages

Language:C++ 79.4%Language:PHP 13.7%Language:Python 6.6%Language:Shell 0.2%Language:Lua 0.1%Language:Awk 0.0%Language:Makefile 0.0%