- 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
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install
If you need debug build type, set
CMAKE_BUILD_TYPE=Debug
#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;
}
todo
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- @malikzh <Malik Zharykov>
Made by Malik Zharykov with โค๏ธ