Interpreted Programming Language built in Go. Lexer, Parser, AST, VM.

Gago | Programming Language Built in Go

if you are looking for the docs, go here

Gago is a interpreted programming language. It is fully written in Go.

Gago includes:

  • Lexer
  • Parser
  • VM
  • Module implementation
  • Easy embedding into your Go application
  • Standard library

View the projects timeline and progress here

The gago builtins module: (as of v0.7-alpha)

  • print(args...) type: function. Doc: prints the specified values seperated by a space
  • input type: function. Doc gets input from stdin until newline
  • teststring type: global variable. Use: testing purposes
  • sleep type: function. Doc: sleeps for the specified ms experimental
  • exit type: function. Doc: exits from the process experimental

Install

Download from the releases page

Objectives

Gago started as an experiment to find out how hard it would be to build a programming language in Go. With all the standard library written in Go, it would be faster than many programming languages, such as Python.

It can also be used as a wrapper around Go, since any Gago expression can be written in Go.

Status

gago currently:

  • Lexes all tokens correctly
  • Parses some expressions to AST
  • Is able to run the AST available right now (in the VM)
  • Has a builtin module and module system.
  • Is able to run defined Go functions inside the Gago script.

Taking the project further is the main goal. Making a simple language which can run just like any programming language would be a end goal. Once Gago is ready to run some of the more basic code, running benchmarks will be added.

Gago is currently in a pre-release or beta state.

License

This project is licensed under the MIT licence.

Comments
  • Add String Module

    Add String Module

    The string module will contain functions for interaction with strings in Gago.

    Tasks:

    • [x] Create a blank module
    • [x] Functions
      • [x] concat
      • [x] contains
      • [x] containsAny
      • [x] trimSpace
      • [x] index
      • [x] len
      • [x] charAt
    • [x] Add docs
    • [ ] Add tests

    Fixes #6

  • Create string module for working with strings

    Create string module for working with strings

    The string module will be part of the standard library, and it would make possible interaction with strings.

    Some of the functions:

    • concat
    • contains
    • containsAny
    • trimSpace
    • index
    • len
  • Object data type & module

    Object data type & module

    Create the object data type and standard library module.

    • [x] Create the basic object type
    • [x] Format for printing
    • [x] Add a set method
    • [x] Add a get method
    • [x] Add a keys method (returns a slice)
    • [x] Add docs for object
    • [x] Add tests for object

    Fixes #4

  • Add Arrays

    Add Arrays

    This PR contains the development for Arrays in Gago.

    Arrays in Gago will look like this:

    const array1 = call array.create("hello", 1, 2, "world")
    

    Arrays will hold values of any type, not only of one type.

    Tasks:

    • [x] Create a blank array module
    • [x] Create a customtype data type. (for special types specific to one function, not builtin)
    • [x] Create a function for creating arrays
    • [x] Create helper functions for interacting with arrays
    • [x] Fully support arrays in every scenario.
    • [x] Create docs for array module
    • [x] Add tests for the array module
  • The parser for the `call` statement is __very__ weak

    The parser for the `call` statement is __very__ weak

    The parser splits the arguments by strings.split(s, ","), which does not allow the character , to be used but to separate arguments. This causes many problems, since a string like hello, world would error the program. Also, you can't nest functions with more than one argument, since it would also break.

A simple json parser built using golang

jsonparser A simple json parser built using golang Installation: go get -u githu

Dec 29, 2021
Simple HCL (HashiCorp Configuration Language) parser for your vars.

HCL to Markdown About To write a good documentation for terraform module, quite often we just need to print all our input variables as a fancy table.

Dec 14, 2021
String i18n utilities for the Go Programming Language

About polyglot polyglot is a String translation package and tool for Go. Setup Make sure you have a working Go installation. See Getting Started Now r

Dec 22, 2022
The Freetype font rasterizer in the Go programming language.

The Freetype font rasterizer in the Go programming language. To download and install from source: $ go get github.com/golang/freetype It is an incom

Dec 25, 2022
A simple programming language with emojis only

MOGEE mogee (pronounced ēˈmōjē) is an extremely simple interpreted programming language that consists solely of emojis. Similar to Brainfuck, mogee is

Nov 15, 2021
A NMEA parser library in pure Go

go-nmea This is a NMEA library for the Go programming language (Golang). Features Parse individual NMEA 0183 sentences Support for sentences with NMEA

Dec 20, 2022
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.

omniparser Omniparser is a native Golang ETL parser that ingests input data of various formats (CSV, txt, fixed length/width, XML, EDI/X12/EDIFACT, JS

Jan 4, 2023
A shell parser, formatter, and interpreter with bash support; includes shfmt

sh A shell parser, formatter, and interpreter. Supports POSIX Shell, Bash, and mksh. Requires Go 1.14 or later. Quick start To parse shell scripts, in

Dec 29, 2022
TOML parser for Golang with reflection.

THIS PROJECT IS UNMAINTAINED The last commit to this repo before writing this message occurred over two years ago. While it was never my intention to

Dec 30, 2022
A simple CSS parser and inliner in Go

douceur A simple CSS parser and inliner in Golang. Parser is vaguely inspired by CSS Syntax Module Level 3 and corresponding JS parser. Inliner only p

Dec 12, 2022
User agent string parser in golang

User agent parsing useragent is a library written in golang to parse user agent strings. Usage First install the library with: go get xojoc.pw/userage

Aug 2, 2021
A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.

goldmark A Markdown parser written in Go. Easy to extend, standards-compliant, well-structured. goldmark is compliant with CommonMark 0.29. Motivation

Dec 29, 2022
Unified diff parser and printer for Go

go-diff Diff parser and printer for Go. Installing go get -u github.com/sourcegraph/go-diff/diff Usage It doesn't actually compute a diff. It only rea

Dec 14, 2022
A PDF renderer for the goldmark markdown parser.
A PDF renderer for the goldmark markdown parser.

goldmark-pdf goldmark-pdf is a renderer for goldmark that allows rendering to PDF. Reference See https://pkg.go.dev/github.com/stephenafamo/goldmark-p

Jan 7, 2023
Experimental parser Angular template

Experimental parser Angular template This repository only shows what a parser on the Go might look like Benchmark 100k line of template Parser ms @ang

Dec 15, 2021
A dead simple parser package for Go
A dead simple parser package for Go

A dead simple parser package for Go V2 Introduction Tutorial Tag syntax Overview Grammar syntax Capturing Capturing boolean value Streaming Lexing Sta

Dec 30, 2022
Freestyle xml parser with golang

fxml - FreeStyle XML Parser This package provides a simple parser which reads a XML document and output a tree structure, which does not need a pre-de

Jul 1, 2022
An extension to the Goldmark Markdown Parser

Goldmark-Highlight An extension to the Goldmark Markdown Parser which adds parsing / rendering capabilities for rendering highlighted text. Highlighte

May 25, 2022
A parser combinator library for Go.

Takenoco A parser combinator library for Go. Examples CSV parser Dust - toy scripting language Usage Define the parser: package csv import ( "err

Oct 30, 2022