Skip to content

WIP: ๐Ÿค– MATE language parsing library

Notifications You must be signed in to change notification settings

malikzh/libmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค–

libMATE

MATE programming language AST construction library


CI Build status GitHub code size in bytes GitHub tag (latest SemVer)


โœจ Features

  • Linux, Mac OS, Windows support
  • x86/amd64/arm support
  • Emscripten support
  • Reading input from string and file directly
  • Parser/Lexer written in Bison and Flex
  • Very lightweight library

๐Ÿงฉ Dependencies

๐Ÿ›  Build

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install

If you need debug build type, set CMAKE_BUILD_TYPE=Debug

๐Ÿ“Œ Usage

#include<iostream>
#include "mate.h"

int main(int argc, char** argv) {
    am_parser_t* parser = am_parser_create_from_fd("test.mate", stdin);
    am_parser_parse(parser);
    am_parser_destroy(parser);
    auto err = am_parser_get_error(parser);

    // AST root node
    am_node_t* root_node = am_parser_get_ast_root(parser);

    std::cout << (err != NULL ? err : "NULL" ) << std::endl;
    return 0;
}

๐Ÿ“– Documentation

todo

๐Ÿค Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“ Authors

๐Ÿ“„ License

MIT

Made by Malik Zharykov with โค๏ธ

About

WIP: ๐Ÿค– MATE language parsing library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published