GithubHelp home page GithubHelp logo

nthnn / yttria-lang Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 145 KB

Yttria programming language using LLVM bindings in pure TypeScript.

TypeScript 96.45% C++ 3.55%
compiler compiler-construction compiler-design llvm llvm-bindings programming-language compiler-infrastructure compiler-principles language nodejs-application

yttria-lang's Introduction

Yttria Programming Language

NodeJS/CI

Yttria is a versatile and powerful general-purpose programming language designed to provide a coherent blend of performance, expressiveness, and ease of use. Developed using TypeScript, Yttria leverages LLVM bindings to generate an Intermediate Representation (IR), which can be further compiled using GCC for optimal performance and for target architectures.

Note: Yttria is still in its development stage.

Getting Started

To contribute to the development of Yttria, you can follow the steps below by cloning the repository first:

git clone https://github.com/nthnn/yttria-lang.git

Required Softwares

  1. NodeJS - The development uses version 20.4.0.
  2. VS Code - Optional. Used for editing codes and more.

Development Commands

  • npm run install-modules - Used for installing required node modules. Should be executed after downloading or cloning the whole repository.

  • npm run daemon-core - Command for starting a listening nodemon every code changes on the Yttria's compiler core.

  • npm run build-core - For cleaning up existing multiple source file builds, and then re-building again the compiler core of Yttria.

  • npm run clean-core - Cleaning up all the compiler core build files.

  • npm run pack-core - Package up the latest code base of the compiler core to generate executables for Linux, macOS, Windows, and Alpine.

  • npm run core - Run the latest built Yttria compiler on console.

  • npm run daemon-cli-tool - Command for starting a listening nodemon every code changes on the CLI tool.

  • npm run build-cli-tool - For cleaning up existing multiple source file builds, and then re-building again the CLI tool.

  • npm run clean-cli-tool - Cleaning up all the CLI tool build files.

  • npm run pack-cli-tool - Package up the latest code base of the CLI tool to generate executables for Linux, macOS, Windows, and Alpine.

  • npm run cli-tool - Run the latest built CLI tool on console.

  • npm run pack - Can be used for packaging up both compiler core of Yttria and the CLI tool.

  • npm run clean-packages - Cleans up the build files and the distributable files.

Contributing

Contributions to the Yttria programming language are welcome and encouraged! To contribute, follow these steps:

  1. Fork the Yttria repository on GitHub.
  2. Clone your forked repository to your local machine.
  3. Create a new branch for your feature or bug fix.
  4. Make your changes and commit them with descriptive commit messages.
  5. Push your changes to your GitHub repository.
  6. Submit a pull request to the main Yttria repository.

License

Copyright 2023 Nathanne Isip

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

yttria-lang's People

Contributors

nthnn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

yttria-lang's Issues

Tokenizer for lexical parsing.

Implemented a string tokenizer from an input. It can produce a series of tokens based on the lexical rules of the Yttria. The tokens scanned contains the informations such as filename where it came from, the token's image itself, line, and column. The tokens also contains a token type for later semantic parsing.

AVR Runtime Environment

A simple runtime environment and helper functions for AVR microcontrollers such as UART initialization, UART printing, GPIO read/write, etc. For now, I've just simply implemented it on the main and render AST.

AST node abstractions for expressions and statements.

Abstract Syntax Tree node definitions for later implementations. Both for expressions and statements. There ASTs are walkable both for resolving (which is the much deeper semantic analysis) and visit (which is for generating and building an output for LLVM module).

Package initialization on CLI Tool.

Package initialization on CLI Tool. Get informations from user such as name, description, version, authors, url, et cetera. Then it will generate a .json file on the same working directory.

The .json file that will be generated can be used on future compilation configuration using the Yttria's compiler core. Inspired from TypeScript's tsconfig.json and NPM's package.json.

Implementations of ASTs for several statement types.

Implementation of ASTs for statements such as main, render, defer, return, block, and unsafe. Also adding an unsafe boolean value on the parameter of ASTNode.resolve() to enable unsafe on every AST walks under unsafe blocks.

Implementations for coroute, wait, and lock statement.

The coroutine statement in Yttria is almost similar to Golang's go statement. However, the wait statement is for waiting all the different coroutine tasks to finish. While lock is for locking a stored variable to prevent chaotic access to it.

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.