A compiler for the ReCT programming language written in Golang

ReCT-Go-Compiler

Go
A compiler for the ReCT programming language written in Golang
It is currentry under development.


Progress:

  • Lexer
  • Parser
  • Binder (WIP)
  • Lowerer
  • Evaluator
Comments
  • No checking for division by 0

    No checking for division by 0

    Here:

    https://github.com/ReCT-Lang/ReCT-Go-Compiler/blob/main/evaluator/evaluator.go#L257

    You don't check if you are dividing by 0. If you are dividing by 0, return a Math error?

  • better readme

    better readme

    Do NOT fork.

    I need some details:

    • Contributors name
    • Installation process
      • Package manager?
      • From source
    • CLI help
    • Documentation links
    • Some examples

    I will finish this later

  • Can't run main file

    Can't run main file

    when I run go run main.go it gives an error.

    # command-line-arguments
    ./main.go:16:2: undefined: Init
    ./main.go:18:2: undefined: ProcessFlags
    note: module requires Go 1.16
    

    maybe it is deprecated? It is fixed by running go run cli.go

  • Organisation?

    Organisation?

    Why isn't this on Discord?

    I am at college right now and their network blocks out Discord so I will ask this here.

    Should we get organised?

    By "organised" I mean we know what needs to be done and know what each other are working on. So, for example, we could set up a Trello board or GitHub Kanban to help manage the project better. - I feel like we would be more productive.

  • undefined: os.ReadFile

    undefined: os.ReadFile

    I get the following error:

    go: downloading github.com/llir/llvm v0.3.4
    go: downloading golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
    go: extracting github.com/llir/llvm v0.3.4
    go: extracting golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
    go: downloading github.com/mewmew/float v0.0.0-20201204173432-505706aa38fa
    go: downloading github.com/pkg/errors v0.9.1
    go: downloading golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
    go: extracting golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
    go: downloading golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
    go: extracting github.com/pkg/errors v0.9.1
    go: extracting golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
    go: extracting github.com/mewmew/float v0.0.0-20201204173432-505706aa38fa
    go: finding github.com/llir/llvm v0.3.4
    go: finding github.com/mewmew/float v0.0.0-20201204173432-505706aa38fa
    go: finding github.com/pkg/errors v0.9.1
    go: finding golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838
    go: finding golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
    go: finding golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
    # ReCT-Go-Compiler/lexer
    lexer/lexer.go:324:19: undefined: os.ReadFile
    note: module requires Go 1.16
    
  • [REQUEST] operator overload for classes

    [REQUEST] operator overload for classes

    This will allow you to add syntax sugar to your Rect code. These are 2 examples I thought that you could implement:

    class Foo {
       set operator +(int sum) {}
    }
    

    or

    class Foo {
       set function __sum(int sum) {}
    }
    
  • Terrible method to store rect packages

    Terrible method to store rect packages

    Currently, rect packages are stored into [PATH Of EXECUTABLE]/packages/*. This is a terrible way of keeping them because when the user installs rgoc, they would normally install it into /usr/bin or /usr/local/bin. This means that the packages would need to be stored at /usr/bin/packages/*. The bin folder should NOT contain anything else except for the user programs.

    What are some possible solutions?

    • One solution that I thought was that packages should be installed into /usr/lib/rect. The installer could change this location and it could be added to the user $PATH.

    Another issue is that the user may need different versions of the same package for different projects. This is an issue that python3 had and the solution was basically doing a virtual environment for every project and storing the packages locally to that project instead of globally. Or you could do it the nodeJS way and it's to install them into a rect_packages? folder.

  • ISSUE COMMENT PINS

    ISSUE COMMENT PINS

    i dunno man this is like doing tech support over telephone absolutely no clue whats going on

    Originally posted by @RedCubeDev-ByteSpace in https://github.com/ReCT-Lang/ReCT-Go-Compiler/issues/10#issuecomment-1221417426

A Lua 5.3 VM and compiler written in Go.

DCLua - Go Lua Compiler and VM: This is a Lua 5.3 VM and compiler written in Go. This is intended to allow easy embedding into Go programs, with minim

Dec 12, 2022
The golang tool of the zig compiler automatically compiles different targets according to the GOOS GOARCH environment variable. You need to install zig.

The golang tool of the zig compiler automatically compiles different targets according to the GOOS GOARCH environment variable. You need to install zig.

Nov 18, 2022
Logexp - Logical expression compiler for golang

Logical Expression Compiler Functions: - Compile(exp string) - Match(text string

Jan 24, 2022
PHP bindings for the Go programming language (Golang)

PHP bindings for Go This package implements support for executing PHP scripts, exporting Go variables for use in PHP contexts, attaching Go method rec

Jan 1, 2023
A compiler from Go to JavaScript for running Go code in a browser

GopherJS - A compiler from Go to JavaScript GopherJS compiles Go code (golang.org) to pure JavaScript code. Its main purpose is to give you the opport

Dec 30, 2022
Automated compiler obfuscation for nim

Denim Makes compiling nim code with obfuscator-llvm easy! Windows only for now, but do you even need compiler obfuscation on other platforms? Setup In

Dec 31, 2022
Promise to the Go compiler that your Reads and Writes are well-behaved

noescape go get lukechampine.com/noescape noescape provides Read and Write functions that do not heap-allocate their argument. Normally, when you pas

Dec 22, 2022
Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM.

TinyGo - Go compiler for small places TinyGo is a Go compiler intended for use in small places such as microcontrollers, WebAssembly (Wasm), and comma

Jan 4, 2023
JIT compiler in Go

jit-compiler This is a Golang library containing an x86-64 assembler (see 'asm/') and a higher level intermediate representation that compiles down in

Dec 24, 2022
GopherLua: VM and compiler for Lua in Go

GopherLua: VM and compiler for Lua in Go. GopherLua is a Lua5.1 VM and compiler written in Go. GopherLua has a same goal with Lua: Be a scripting lang

Jan 9, 2023
The Project Oberon RISC compiler ported to Go.

oberon-compiler This is a port of the Project Oberon compiler for RISC-5 (not to be confused with RISC-V) from Oberon to Go. The compiled binaries can

Dec 6, 2022
Elvish = Expressive Programming Language + Versatile Interactive Shell

Elvish: Expressive Programming Language + Versatile Interactive Shell Elvish is an expressive programming language and a versatile interactive shell,

Dec 25, 2022
Starlark in Go: the Starlark configuration language, implemented in Go

Starlark in Go This is the home of the Starlark in Go project. Starlark in Go is an interpreter for Starlark, implemented in Go. Starlark was formerly

Jan 2, 2023
A fast script language for Go
A fast script language for Go

The Tengo Language Tengo is a small, dynamic, fast, secure script language for Go. Tengo is fast and secure because it's compiled/executed as bytecode

Dec 30, 2022
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. https://vlang.io
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. https://vlang.io

The V Programming Language vlang.io | Docs | Changelog | Speed | Contributing & compiler design Key Features of V Simplicity: the language can be lear

Jan 4, 2023
A BASIC interpreter written in golang.
A BASIC interpreter written in golang.

05 PRINT "Index" 10 PRINT "GOBASIC!" 20 PRINT "Limitations" Arrays Line Numbers IF Statement DATA / READ Statements Builtin Functions Types 30 PRINT "

Dec 24, 2022
High-performance PHP application server, load-balancer and process manager written in Golang
High-performance PHP application server, load-balancer and process manager written in Golang

RoadRunner is an open-source (MIT licensed) high-performance PHP application server, load balancer, and process manager. It supports running as a serv

Dec 30, 2022
Scriptable interpreter written in golang
Scriptable interpreter written in golang

Anko Anko is a scriptable interpreter written in Go. (Picture licensed under CC BY-SA 3.0, photo by Ocdp) Usage Example - Embedded package main impor

Dec 23, 2022
gpython is a python interpreter written in go "batteries not included"

gpython gpython is a part re-implementation / part port of the Python 3.4 interpreter to the Go language, "batteries not included". It includes: runti

Dec 28, 2022