Compiler & Interpreter for the (rather new and very experimental) Y programming language.

Overview

Y Lang

Why would anyone build a new (and rather experimental) language with no real world use case.

Design

Y (pronounced as why) is based on the idea that everything is an expression and evaluates to a value. For example, 7 and 3 + 4 directly evaluate to 7 (the latter one gets evaluated in the form of a binary expression), 3 > 5 to false and "Hello" evaluates to "Hello".

Besides these "primitive" expressions, more complex expression, such as blocks (i.e., statements enclosed in { and }), if-statements and function (calls) also evaluate to a value. To simplify this approach, the value of last expression within one of these complex "structures" is automatically the value of this structure.

For example:

{
    "Hello, World"
    3 + 4
}

evaluates to 7. In this example, "Hello, World" is ignored, because the last expression does not depend on it. Another example:

if 3 < 5 {
    "foo"
} else {
    "bar"
}

You can optionally explicitly end an expression with a semicolon:

if 3 < 5 {
    "foo"
} else {
    "bar"
};

In some situations this is required, since Y would interpret the provided expressions in a different way. See section about functions.

Variables

To store the values of expressions, you are able to declare variables:

let foo := "bar"

Variable definitions always start with the keyword let followed by an identifier (e.g., foo) and the "walrus operator" := and the value. To assign a new value to a variable, you can use a similar pattern:

foo = "another value"

Note that you do not use the let keyword nor := in this case.

Following the idea of "everything evaluates to a value", you can "assign" complex structures (blocks, functions, function call, if statements, etc.) to a variable:

let foo := {
    let a := 16 // Yes, variable definitions also work in blocks
    a + 26
}

let some_variable := if foo > 30 {
    "foo"
} else {
    "bar"
}

Type System

Y is strongly typed. Meaning, you can not assign a variable with a new value which differs its previous type. I.e, the following does not work:

let foo := "bar"
foo = 42 // TypeError!

Due to that, if you assign an if statement to a variable, both blocks have to return a value of the same type:

// works
let foo := if a > b {
    42
} else {
    1337
}

// TypeError!
let bar := if a > b {
    42
} else {
    "bar"
}

Primitves

Y supports a couple of primitive types which are build directly into the lanuage:

  • int for numbers (current 32 bit)
  • str for string constants
  • bool for boolean values
  • void for "empty" values
  • functions (see later for information on how to declare a function type)

More complex types are subject for futures features.

Mutablity

Currently, Y only allows mutation of variables which are defined within the current scope (i.e., in the current block). You can still access variables defined in an outer scope (write-only):

let foo := 42

if a > b {
    let bar := foo // works, because it is read-only
    bar = 1337
} else {
    foo = 1337 // TypeError!
}

Functions

You can encapsulate behaviour in functions. Functions are (currently) the only place in Y where you need to explicitly annotate types (for parameters and return type):

let add := (x : int, y : int) : int => {
    x + y
}

Function definitions work in a similar way like regular variable definitions, since functions are treated as first-class citizens in Y.

Call-Postfix

To call a function, you can postfix any expression which evaluates to a function (currently only identifiers) with ([param, [param, ...]]) to call it the given arguments.

This may lead to certain pitfalls, since Y is not whitespace-sensitive! For example, the following will lead to a type error:

let foo := (some_condition: bool) : int => {
    if some_condition {
        print("Condition is true!")
    }
    (3 + 4)
}

Here, (3 + 4) (although it is intended as the return expression of the function) is interpreted as a call to the result of the if expression. To prevent this, you have to explicitly terminate the if expression with a semicolon:

let foo := (some_condition: bool) : int => {
    if some_condition {
        print("Condition is true!")
    }; // <- semicolon to terminate expression
    (3 + 4)
}

Function Type

If you want to declare a parameter of your function to be a function itself, you can do it like this:

let foo := (bar : (int, int) -> int) : int => {
    bar(3, 4)
}

In this example, we declare a variable foo and assign it a function, which expects one parameter (in this case named bar) of type (int, int) -> int, meaning the provided function should accept two parameters of type int and produce/return a value of type int.

⚠️ Known Limitations

Currently, you are not able to return functions from other functions or use values which are defined in an outer scope of a function. I am currently figuring out a way to achieve that.

Modules

You can split your code up into modules. Modules are just other files ending with .why and can be imported by their name (without the respective file ending):

import foo

foo::bar()

Here, we import a module named foo (from a file foo.why) and call an exported function (i.e., bar) by its "full name". By default, you have to specify the full resolved name to an imported function in the form of module::function(). If you want to directly call a function without specifying the module name, you have to import the module as a wildcard:

import foo::*

bar()

This can be useful when importing common functions from a utility module.

⚠️ Non-Function-Exports

Please note that all non-function-members of a module (i.e., all other variables etc.) are not exported. They are completely "erased" from the program. Therefore, your exported functions are not allowed to use any other variables other than other exported functions.

In the future, we plan to add support for exporting constants, but until then be aware of this limitation.

Declarations

If you want to declare a function (or a variable) which is already pre-defined (or comes from another source), you can do so via the declare keyword. A declaration consists of the name of the variable to declare and a corresponding type annotation. E.g.:

declare print : (str) -> void

Builtins

Currently, Y provides a single builtin function: syscall_4 (for calling syscalls with 4 arguments). To use it, you have to declare it somewhere in your program:

declare syscall_4 : (int, any, any, any) -> any

Note: The first parameter is the identifier for this syscall.

If you want to have an overview of currentl available syscall abstractions, have a look at std.why in the examples folder.

Compiler Directives

Y support (more or less) conditional compilation depending on the current operating system. To declare something is "OS"-dependant, you have to annotate it accordingly:

#[os == "linux"]
let value := "We are on linux"

#[os == "macos"]
let value := "We are on macOS"

Pipeline

To turn a Y program into an executable (or interpret it), the compiler takes several steps.

Parsing

As a first step, the parser tries to generate a more or less meaningfull AST from the given source code. While the parser relies on the grammar defined by y-lang.pest, the generated AST is a little more specific on the structure.

Type Checker

In order to provide the security of strong types, the type checker checks the types of all expressions, variables and assignments. Furthermore, it checks if variables are defined in the currently available scope and if they are mutable (of needed).

Interpreter & Compiler

As a last step, the generated AST either gets interpreted or compiled to assembly. This generated assembly get then compiled to an object file using NASM and then linked via cc.

Usage

At the time of writing this, we do not provide binaries for Y. If you want to use or experiment with y, you can compile the toolchain yourself. For that you need rust and cargo installed on your system. If you want to actually compile a program, you also need NASM installed. This crate provides a binary called why.

You can use why to typecheck, interpret and compile your program:

why path/to/program.why # typechecking

why path/to/program.why -r # typecheck & run/interpret

why path/to/program.why -o path/to/output # typecheck and compile

Operating Systems

Y is actively developed under macOS. I tested Linux to some point (and CI should test aswell), but I can not guarantee full compatibility.

Contributing

The code is the reincarnation of the mighty spaghetti monster. I had no real time to refactor anything or even write useful tests.

Even though I currently have no guide for contributing, feel free to open issues with feature requests. Be warned that I will probably not accept any PRs until I defined some guidelines for contributing or code/assembly style.

Comments
  • Always build as `-arch x86_64` (for now)

    Always build as `-arch x86_64` (for now)

    Since we only support x86_64 for now, we should pass it explicitly to make sure that x86_64 binaries are generated on Apple Silicon Macs too (which then run under Rosetta).

    opened by fwcd 1
  • Bump pest from 2.5.3 to 2.5.4

    Bump pest from 2.5.3 to 2.5.4

    Bumps pest from 2.5.3 to 2.5.4.

    Commits
    • ae86b62 doc: added doc comments to the meta-grammar (#774)
    • 7bd2095 Add to support /// and //! syntax for add doc comment for rules. (#765)
    • cc4fc93 CI use Rust 1.62.0 for fix rustyline 10.1.0 #[default] compile error. (#770)
    • 56cef18 fix: incorrect col calculate for pair.line_col method, and add integratio...
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Add `unknown` type

    Add `unknown` type

    This PR aims to add the unknown type as mentioned in #36.

    Furthermore, it adds a utility function on VariableType which capsules the conversion logic of types away.

    Closes #36

    enhancement typechecker 
    opened by H1ghBre4k3r 0
  • Bump clap from 4.1.7 to 4.1.8

    Bump clap from 4.1.7 to 4.1.8

    Bumps clap from 4.1.7 to 4.1.8.

    Release notes

    Sourced from clap's releases.

    v4.1.8

    [4.1.8] - 2023-02-27

    Fixes

    • (derive) Don't deny lints on the users behalf
    Changelog

    Sourced from clap's changelog.

    [4.1.8] - 2023-02-27

    Fixes

    • (derive) Don't deny lints on the users behalf
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump clap from 4.1.6 to 4.1.7

    Bump clap from 4.1.6 to 4.1.7

    Bumps clap from 4.1.6 to 4.1.7.

    Release notes

    Sourced from clap's releases.

    v4.1.7

    [4.1.7] - 2023-02-27

    Fixes

    • (derive) Hide some nightly clippy warnings
    Changelog

    Sourced from clap's changelog.

    [4.1.7] - 2023-02-27

    Fixes

    • (derive) Hide some nightly clippy warnings
    Commits
    • 5f247f5 chore: Release
    • 1999d85 docs: Update changelog
    • c3a942e Merge pull request #4735 from rkrasiuk/rkrasiuk/fix-almost-swapped-lint
    • 5bab68a fix: Allow clippy::almost_swapped
    • 872135b fix: Allow clippy::almost_swapped
    • 84a9b53 chore: Release
    • 9fa48d5 docs: Update changelog
    • e9535a3 Merge pull request #4734 from XiaoXiaoSN/master
    • 0f3e729 feat(complete): Support to run ZSH completion as a script
    • cdb33b6 test(complete): Adjust bash snapshot
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • `unknown` type

    `unknown` type

    Currently, Y support several builtin types:

    • int
    • str
    • bool
    • void

    For function parameters, we also support any to declare that a certain function accepts any type of argument. As a "counterpart" for this, an unkown type would be great. unkown should indicate that we do not know what a function returns. This is usefull for syscall abstractions, since they can return a whole lot of different values/types:

    declare syscall : (any) -> unkown
    

    One could use any as the return type, but in my opinion, unkown and any are semantically different (as mentioned above) and should be treated like that.

    To correctly work with unknown return values, we should allow for type conversion from unkown to every other type (through type annotation : TYPE at a variable definition or as a function return type). Conversions from any other type to unkown should be currently prohobited and throw a type error.

    Condition of Satisfaction

    • [x] new type unkown exists
    • [x] unkown can be used as function return type
    • [x] conversion from unkown to any other type work
    • [x] conversion to unknown from any other type throw a TypeError
    enhancement typechecker 
    opened by H1ghBre4k3r 0
  • Syscalls, STD library & Conditional Compilation

    Syscalls, STD library & Conditional Compilation

    This PR aims to provide an abstraction over common syscalls to reduce the number of builtin functions.

    These abstractions are encapsulated within a new std.why module.

    Furthermore, this PR introduces conditional compilation via compiler directives (currently, this only works for depending on different operating systems):

    #[os == "linux"]
    let value := "We are on linux"
    
    #[os == "macos"]
    let value := "We are on macOS"
    

    This feature is currently used to distinguish different syscalls on macOS and Linux.

    Closes #29

    enhancement compiler 
    opened by H1ghBre4k3r 0
  • Bump once_cell from 1.17.0 to 1.17.1

    Bump once_cell from 1.17.0 to 1.17.1

    Bumps once_cell from 1.17.0 to 1.17.1.

    Changelog

    Sourced from once_cell's changelog.

    1.17.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Fix last features for v0.1

    Fix last features for v0.1

    This PR aims to fix all features for v0.1.0 of Y. This includes (but is not limited to):

    • add all registers (up until R11) to the asm module
    • implement functions with up to 6 parameters
    • allow termination of statements with a semicolon
      • this fixes a bug where the following code did not type check
    - if true {}
      (1 + 3) // this gets parsed as call to result of expression above
    
    + if true {}; // <- terminate expression explicitly
      (1 + 3) // this works no
    
    • implement all variants of passing a string to print
    • changes todo! to unimplemented! to indicate future features
    bug enhancement refactoring compiler 
    opened by H1ghBre4k3r 0
  • Standard Library

    Standard Library

    It would be cool to have a standard library to import. This standard library should include common functions like print etc., implemented in Y. This would remove the need to manually declare these functions in assembly.

    The only builtin function should be syscall which abstracts over syscalls like write etc.

    enhancement compiler typechecker interpreter 
    opened by H1ghBre4k3r 0
  • Outer Mutability

    Outer Mutability

    This PR aims to allow outer mutability (i.e., allow mutations of variables which are not defined within the inner scope).

    To achieve that, I added the mut keyword. If a definition is parsed with a mut keyword, the parser marks the corresponding definition as "mutable". The TypeScope got adjusted to keep track of that.

    Closes #24

    enhancement 
    opened by H1ghBre4k3r 0
  • Bump pest_derive from 2.5.5 to 2.5.6

    Bump pest_derive from 2.5.5 to 2.5.6

    Bumps pest_derive from 2.5.5 to 2.5.6.

    Release notes

    Sourced from pest_derive's releases.

    v2.5.6

    What's Changed

    Full Changelog: https://github.com/pest-parser/pest/compare/v2.5.5...v2.5.6

    pest_fmt and Visual Studio Code extension

    Thanks to the great work of @​huacnlee , @​Jamalam360 and others, the new version of pest_fmt was published and the Visual Studio Code extension for pest was released on the Marketplace: https://marketplace.visualstudio.com/items?itemName=pest.pest-ide-tools

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump pest from 2.5.5 to 2.5.6

    Bump pest from 2.5.5 to 2.5.6

    Bumps pest from 2.5.5 to 2.5.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • `const` Keyword

    `const` Keyword

    For exporting/importing/defining constants, it would be nice to have a designated keyword const. Variables declared as const are not mutable (not even in the current scope) and are exported. They should be constants, i.e., they have to be a static literal (so no if-else or function call).

    Condition of Satisfaction

    • [ ] const keyword exists and can be parsed
    • [ ] typechecker asserts immutability
    • [ ] constants get exported
    • [ ] non-primitive/-static values are rejected (we could actually achieve that in the grammar)
    enhancement compiler typechecker interpreter 
    opened by H1ghBre4k3r 0
  • Arrays

    Arrays

    It would be cool to have support for arrays in Y. Arrays should be fixed size & strongly typed, so their size can be determined (more or less) at compile time. Moreover, one should be able to access arrays via their indices:

    some_array[2] = 42
    

    Additionally, the internal str type should be also accessible via indices. To do this, we need to introduce the new primitive type char which is the result of some_string[index].

    Condition Of Satisfaction

    • [ ] option to define an array of fixed size on the stack
    let some_array := [0; 10] // an array of 10 `int`, prefilled with 0
    
    • [ ] index access to arrays
    • [ ] new primitive type char
    • [ ] index access to str
    enhancement compiler typechecker interpreter 
    opened by H1ghBre4k3r 0
  • Split up responsibilities of `Compiler`

    Split up responsibilities of `Compiler`

    For improved testability, it would be cool to factor out the explicit path and file handling from Compiler and divide up its responsibilities into individual methods or perhaps even different modules:

    • Generate instructions as Vec<Instruction>
    • Prettyprint Vec<Instruction> to a .asm source file (or, if that's not sufficient, introduce a new struct for representing a complete .asm file abstractly and generate that instead)
    • Running nasm on the resulting .asm source file
    • Linking the object files

    This should also make it easier to perform non-black box testing, since we could perform assertions directly on the generated instructions for a block of code.

    refactoring 
    opened by fwcd 0
Releases(v0.1.1)
  • v0.1.1(Feb 26, 2023)

    Y Version 0.1.1

    This release contains an abstraction over syscalls (for both macOS and Linux) and conditional compilation, depending on the target operating system.

    These features are used to implement some (previously builtin) functions in std.why which should act as a first draft of a standard library for Y.

    What's Changed

    • Bump once_cell from 1.17.0 to 1.17.1 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/34
    • Syscalls, STD library & Conditional Compilation by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/35

    Full Changelog: https://github.com/H1ghBre4k3r/y-lang/compare/v0.1.0...v0.1.1

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Feb 23, 2023)

    Y Version 0.1.0

    This is the first official (though not stable) release of Y.

    Features

    The initial set of features includes (but is not limited to):

    • Primitive types (int, str, bool, etc.)
    • Basic control flow
    • Functions as first class citizens
    • Modules
    • x86 assembly generation for macOS and Linux

    What's Changed

    • Restructure the AST by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/1
    • Add ASM abstraction by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/2
    • Bump pest_derive from 2.5.3 to 2.5.4 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/3
    • Bump clap from 4.1.1 to 4.1.4 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/4
    • Chain-Expressions & Parenthesis by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/6
    • Bump pest from 2.5.4 to 2.5.5 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/7
    • Bump pest_derive from 2.5.4 to 2.5.5 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/8
    • Bump clap from 4.1.4 to 4.1.6 by @dependabot in https://github.com/H1ghBre4k3r/y-lang/pull/9
    • Always build as -arch x86_64 (for now) by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/10
    • Run CI only on push and format/lint on a single OS by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/11
    • Rename BinaryOp -> BinaryExpr and BinaryVerb -> BinaryOp by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/12
    • Implement integer multiplication and division by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/15
    • Take the input file as a positional argument by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/17
    • Add Dockerfile and deploy image to the GitHub Container Registry automatically by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/14
    • Create multi-arch image by cross-compiling in CI by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/19
    • Abstract out common test pattern into test-utils by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/20
    • Check exit status and clean up test utils by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/21
    • Add flags for dumping AST (--dump-parsed, --dump-typed) and add doc comments by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/25
    • Use operator precedence parser for infix expressions and add prefix/postfix expressions by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/16
    • Outer Mutability by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/28
    • Add VSCode extension with basic syntax highlighting by @fwcd in https://github.com/H1ghBre4k3r/y-lang/pull/31
    • Fix last features for v0.1 by @H1ghBre4k3r in https://github.com/H1ghBre4k3r/y-lang/pull/33

    Full Changelog: https://github.com/H1ghBre4k3r/y-lang/commits/v0.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
Louis Meyer
IT-student from CAU Kiel, Germany. Interested in low level programming, web tech and mobile development.
Louis Meyer
A simple interpreter written in Rust programming language.

Interpreter in Rust A simple interpreter written in Rust programming language. Getting Started These instructions will get you a copy of the project u

Ismail Mosleh 5 Feb 17, 2023
The brainfuck language interpreter written in Rust

The brainfuck language interpreter written in Rust

Jan Štaffa 1 Feb 21, 2022
rlox-interpreter is an AST-walking implementation of Bob Nystrom's Lox language in Rust.

rlox-interpreter rlox-interpreter is an AST-walking implementation of Bob Nystrom's Lox language in Rust. Disclaimer: This is my first Rust project, d

Paul Fedorow 3 Oct 5, 2022
very cool esoteric language pls use

okfrick has one memory pointer has less than 5 characters hopefully works well is turing complete (possibly) + - increase memeory pointer value ( - st

null 3 Jun 24, 2021
JIT compiler and runtime for a toy language, using Cranelift

Hello! This is a simple demo that JIT-compiles a toy language, using Cranelift. It uses the new JIT interface in development here. JIT takes care of m

Bytecode Alliance 468 Jan 7, 2023
tr-lang is a language that aims to bring programming language syntax closer to Turkish.

tr-lang Made with ❤️ in ???? tr-lang is a language that aims to bring programming language syntax closer to Turkish. tr-lang is a stack based language

Kerem Göksu 10 Apr 2, 2022
Brainfu*k interpreter and REPL written in Rust🦀

brainfuck interpreter: a simple brainfuck interpreter and REPL writen in rust ?? Read this in other languages. AR Arabic-العربية Features Run brainfuc

Anas Elgarhy 7 Feb 1, 2023
A fast, powerful and configurable interpreter written in Rust

brainfuck-interpreter Overview A fast, powerful and configurable interpreter written in Rust, which allows various options to meet different demends,

Justin Chen 4 Feb 12, 2023
Regorus - Rego interpreter, analyzer and validator written in Rust

regorus THIS REPOSITORY IS IN ACTIVE DEVELOPMENT AND NOT INTENDED FOR PRODUCTION USE. Regorus is a Rego interpreter, analyzer and checker written in R

Microsoft 13 Mar 2, 2023
A compiler for the esoteric language ℂ.

The ℂ Programming Language It's a language where the only types are "complex number" and "matrix of complex numbers". In particular, this means you ca

Eleanor McMurtry 24 Jul 15, 2022
A compiler for a language representing plonk circuits

Plang A language representing PLONK circuits. Compiler This repository contains a compiler for a language representing PLONK circuits. It allows circu

Dusk Network 1 Nov 6, 2021
Compiler from a lisp-like language to mlog

slimlog slimlog compiles a lisp-like language to mlog Architecture slimlog is divided into three distinct parts Parser Parses the source file Compiler

The Potato Chronicler 6 May 7, 2022
An experimental logical language

Last Order Logic An experimental logical language. Based on paper Last Order Logic. Motivation In First Order Logic, the truth values of quantified ex

AdvancedResearch 5 Nov 9, 2021
This crate defines a single macro that is a brainfunct compile-time interpreter.

Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18

John Marsden 7 Nov 29, 2021
Brainfuck interpreter written in rust

Brainfuck Interpreter Written in Rust Simple Interpreter that runs bare Brainfuck and extends it with debug command # which prints content of first te

Was 1 Nov 28, 2021
A Brainf** interpreter written in rust 🦀

Brainf Interpreter An interpreter for the esoteric programming language Brainfuck written in rust ?? Compilation NOTE: To compile the project, you nee

Chitram Dasgupta 2 Sep 12, 2022
Risc-V assembly interpreter built with pure Rust

Risc-V Interpreter Interpreter for Risc-V assembly built with Rust Report bug · Request feature Table of contents Quick start Exemple Program Instruct

null 2 Aug 24, 2022
Brainf - A brainfuck interpreter written in Rust 🦀

brainf A brainfuck interpreter written in Rust ?? . Do not I wrote this in my spare time... but still its good! Run Locally Clone the project git cl

Nav 3 Oct 8, 2022
PICNIC Is Config Notation Interpreter/Converter

PICNIC Is Config Notation Interpreter/Converter ?? PICNIC PICNIC's name is powered by AI, which immediately makes it worth your time: Human: Please co

Fabricio Demattê 4 Jul 13, 2023