LanguageCreator - Simple library for easy creation transpilator.

Overview

LanguageCreator - Simple library for easy creation transpilator.

Create transpilators in one hour!

Install.

Download code, rename folder to "LanguageCreator", move it to "$Python\Lib", Done!

About.

Simple library for easy creation transpilator on Python.
In this library prepared 90% functions of transpilator.

Examples.

main.tt

5 + 5;
10 + 10;

test.py

from LanguageCreator.langcreator.allobjs import *


exceptions = Exceptions([], {'TestUndefinedError': 'TestUndefinedError', 'TestSyntaxError': 'TestSyntaxError', 'TestExc': 'TestExc'})
exceptions.setscheme('Exception $type, $msg;')

kwds = Keywords(sem=Keyword(';')).get()

class TestLang:
    def __init__(self, file):
        self.parser = FileParser(file)

    def run(self):
        lines = self.parser.getlines('', True)

        for line in lines:
            if not line.endswith(str(kwds['sem'])):
                exceptions.throwscheme(exceptions.getexc('TestSyntaxError'), 'string must end on semicolon', True)

        for line in lines:
            _line = Code(StringParser(line).cutend(-1))
            res = _line.execute(True, True)

            if type(res) is tuple and len(res) == 2:
                exceptions.throwscheme(exceptions.getexc('TestExc'), res[1], True)

file = CMDArgs()
runtime = TestLang(file.getarg(0))
runtime.run()

To cmd. python test.py main.tt

Result.

10
20

Yeap, this code doesn't clean, and better not to use, but it's works... In real projects i never do this.
So, how you see, we maked this repository in 1 minute.
This code (not library) have many bugs, and this is very raw code.

Documentation info.

You can inspect this library via "docs" folder.
Open interest to you parts of library, and look source code, whats do this function, how use it, when will be error, look all that can this library.
You can see mini-doc of function in your IDE too.

Credits.

Author Ivan Perzhinsky.
Version 1,0.
License MIT License.

End.

Thank you for reading, have a good day, bye!


^_^

You might also like...
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Connect Playground - easy way to fill in your account with production-like objects

Just set of scripts to initialise accpunt with production-like data: A - Basic Distributor Account Initialization INPUT Distributor Account Token ACTI

Tie together `drf-spectacular` and `djangorestframework-dataclasses` for easy-to-use apis and openapi schemas.

Speccify Tie together drf-spectacular and djangorestframework-dataclasses for easy-to-use apis and openapi schemas. Usage @dataclass class MyQ

tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram
tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

tgEasy | Easy for a Brighter Shine | Monkey Patcher Addon for Pyrogram

Generate Openbox Menus from a easy to write configuration file.

openbox-menu-generator Generate Openbox Menus from a easy to write configuration file. Example Configuration: ('#' indicate comments but not implement

This module extends twarc to allow you to print out tweets as text for easy testing on the command line
This module extends twarc to allow you to print out tweets as text for easy testing on the command line

twarc-text This module extends twarc to allow you to print out tweets as text for easy testing on the command line. Maybe it's useful for spot checkin

Sabe is a python framework written for easy web server setup.

Sabe is a python framework written for easy web server setup. Sabe, kolay web sunucusu kurulumu için yazılmış bir python çerçevesidir. Öğrenmesi kola

Easy way to build a SaaS application using Python and Dash

EasySaaS This project will be attempt to make a great starting point for your next big business as easy and efficent as possible. This project will cr

🤖🤖 Jarvis is an virtual assistant which can some tasks easy for you like surfing on web opening an app and much more... 🤖🤖

Jarvis 🤖 🤖 Jarvis is an virtual assistant which can some tasks easy for you like surfing on web opening an app and much more... 🤖 🤖 Developer : su

Releases(1.0)
Owner
Ivan Perzhinsky.
Typical programmer on Python, Lua, Golang, Java. Welcome to my profile!
Ivan Perzhinsky.
Blender addon that enables exporting of xmodels from blender. Great for custom asset creation for cod games

Birdman's XModel Tools For Blender Greetings everyone in the custom cod community. This blender addon should finally enable exporting of custom assets

wast 2 Jul 2, 2022
Sequence clustering and database creation using mmseqs, from local fasta files

Sequence clustering and database creation using mmseqs, from local fasta files

Ana Julia Velez Rueda 3 Oct 27, 2022
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

guess-the-numbers Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Number guessing game

Amir Hussein Sharifnezhad 5 Oct 9, 2021
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Amir Hussein Sharifnezhad 3 Oct 9, 2021
A collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to provide an easy-to-use access to them.

KGQA Datasets Brief Introduction This repository is a collection of existing KGQA datasets in the form of the huggingface datasets library, aiming to

Semantic Systems research group 21 Jan 6, 2023
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede)

Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede). This API creates an interface with the official browser, with more useful functionalities.

Guglielmo Camporese 4 Dec 24, 2021
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

João Paulo Carvalho 11 Nov 30, 2022
Always fill your package requirements without the user having to do anything! Simple and easy!

WSL Should now work always-fill-reqs-python3 Always fill your package requirements without the user having to do anything! Simple and easy! Supported

Hashm 7 Jan 19, 2022