Code Monkey home page Code Monkey logo

luxe / unilang Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 13.0 34.74 MB

A universal programming language

License: MIT License

Python 0.15% C 6.82% C++ 38.07% Shell 1.83% CSS 0.17% JavaScript 0.92% HTML 1.03% NSIS 0.03% Dockerfile 0.06% Fancy 38.24% Cap'n Proto 0.01% Makefile 0.49% CoffeeScript 0.07% Starlark 11.67% Java 0.01% SAS 0.02% R 0.02% Ruby 0.02% Visual Basic .NET 0.36% Red 0.02%
programming-language programming-concepts language ide unilang markup-language natural-language unifying-language nosyntax transcompiler

unilang's People

Contributors

dependabot[bot] avatar luxe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

unilang's Issues

Preconditions and Post Conditions?

Should we add to the UniLang language [pre-conditions][post conditions] tags?
We have brief and detail right now. Do we need these. Hmm. Think about it.

refactor special exporter code

starting to get messy. Checking for constructor, and counting number of non-constructor methods is repeated across multiple modules.

Havea "general utilities" more specific from pre-jstd utilities to account for code duplication

Code fails to build when there is a lack of input data members.

Problems I ran into while creating objects for the sole purpose of wrapping some data:

  • Don't create an input struct if there isn't any variables for it.
  • Don't provide an update function if there is no API on the object
  • Don't pass in the input struct to the Update function if there is none
  • Change CPP wraper to not declare inputs if there are none.
  • Change CPP wraper to only pass in the outputs if there is no inputs
  • Change CPP wraper to not update at all if there are no API methods

add macro colors to theme file

especially for the bools. A matching green and red would be nice.
It just requires that weird nesting in the theme file

It would be nice to map structs of basic types to a qt form

qt gui that maps to a c++ struct of (ints,floats,enums,bools)
kind of complicated; see what's out there...
Might have to bundle all of the types with meta information

Meta_Type<int> count;
count.value =5;
count.name ="count";
count.label = "blah blah;"
count.toolTip = "sdfsdf";

It might be better to Qt<->json<->C++ struct

Support for operator overloading.

No new unicode characters are needed for this.
The names of the functions will just need to be + - *, etc. and the language will deduce the right thing. Current code will need to be changed to ignore instances of these functions(or turn them into words for C code)(options for all that etc)

ObjectPlus(Obj x, Obj, y); //for c Code. if option allows.

fix header syntax

[header] //assume to be a local file, and assume the file extension if not specified
//evaluates to "header.h" on a c-exporter and "header.hpp" on a cpp-exporter

However,
[header.h] //evaluates to "header.h" on any exporter. (presumably)

[\header] //assumes to be a system header with no file extension
//evaluates to

However,
[\header.hpp] //evaluates to <header.hpp> on any exporter. (presumably)

Add special unicode characters for method body

  • self method call [do private thing]
  • data member [data from inside the object]
  • access member (. or -> deduced on usage)
  • access method (. or -> deduced on usage)
  • parameter
  • return statement
  • TRUE/true FALSE/false

Separate Printers, and Separate Configurations

Every part of the CodeLang structure should have an associated module used for printing.
Everyone of these printing modules should be associated with a configuration struct to explain how to print it.

NO! not print. string returners for it.

json save/load options

Eventually all of these options will probably need serialized into json, and eventually configurable that way.

tag portions of unilang structure as "generated" or "not generated"

Based on options, we are going to be changing the actual unilang structure.
adding methods to the methods section. Adding data members to objects. All kinds of things.
All of this data needs an enum for SPECIFIED/GENERATED. in accordance to what is contained in the actual .UniLang file.

Implement Inheritance

  • give inheritance an actual Name portion
  • parse inheritance into CodeLang structure
  • inheritance printer

generate C enum utilities

  • first enum constant
  • last enum constant
  • total enum constant
  • first enum function
  • last enum function
  • total enum function
  • next enum function
  • previous enum function
  • enum -> string
  • string -> enum

Warning portion does not have file marking context.

The warning portion uses the CodeLang data structure to easily check if anything is worth warning about. Unfortunately if it finds something, it can't give any context as to where the warning occurred.
It seems like every single leaf element of the Codelang structure, and possibly some higher level stuff(not sure though) is going to need to carry around the file marker of where they physically exist in the file. This is just an extra data member, and it shouldn't break anything in terms of the rest of the code.

Add documentation links to meta top comment

that can be links to webpages with UML digrams, and call trees, etc.
This data should remain OUT of the Unilang language. It will need generated somehow through the settings.

Eventually we will need to find a way to keep the online site and the top comment in sync

Also, we want a URL validator to check and make sure that the links aren't ever invalid.
Add a setting whether or not generated URLs should be checked(since it will make compilation slower)

support for serializable data members

add something to the UniLang grammar that allows serialization stuff to be injected into the C++ class.
Probably boost serialization, some json library, some generic print function for debugging.

template objects

Not sure how we are going to do this yet. templated class will affect the methods and data members. It's possible, to use our code graph, and if the type isn't discovered, we'll know if the templating succeed.

For now though, knowing these kinds of things isn't THAT important. If we just add unicode characters for object templating, that will meet the generation requirement.

can call local method inside constructor method

For some reason when I try to call a local method inside a local constructor method, it fails to find the method call. It also reports only seeing only one function total. So method_call_in_method is definitely only getting one method(the constructor itself passed in when evaluating the method)

Abstract away &,const,*

Hmm, this might not be entirely possible, but perhaps we could abstract away these symbols and keywords from the actual type.

Right now, these things are mixed in the actual type.
We parse them out ourselves and determine

bool is_const...
bool is_pointer...

Instead, we would replace them in the CodeLang structure as one of the following enum values:

COPY
REFERENCE
READ-ONLY

The correct implementation could be derived from these concepts.
This would be good for other languages, and even C/C++ in terms of const*const and const&

Re-printable CodeLang files

since every token can be read into an abstract data type, add functionality to reprint the CodeLang file in a desired standard format.

separate programs for each exporter

turn each exporter into a separate program, so that less flags need to be used.
They should also be generative dependencies, and then re-used for this compiler.

Turn implicit casts into explicit casts

HAHA I know...
It may be easier to run another program after this compiler.
Some LibTooling with clang-check? Probably.

  • This applies to literals as well
  • we want to avoid explicit casts to the type that something already is

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.