Conqu3red / parsergen-cpp

A C++ library for writing Lexers and PEG Parsers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsergen C++

Version License: MIT

A C++ library for writing Lexers and PEG Parsers.

Parsergen C++ provides a toolset for effectively tokenizing strings and generating PEG parsers from grammar definitions.

Installation

To build the library, git clone the repository and then use make to build fmt then parsergen-cpp.

make fmt
make parsergen-cpp

Include the generated libparsergen.a in your compilation command using -L. -lparsergen. Alternatively you can download the static library and header files from the releases page. The executable parsergen-cpp.exe can be used to generate a C++ file from a grammar file by doing:

parsergen-cpp somefile.gram -o somefile.cpp
# other make rules:
make libparsergen # libparsergen.a
make json # json parser example
make calc # basic calculator example
make test # tests
make metagrammar # recompile metagrammar

Refer to the wiki for details and tutorials on how to use.

Copyright © 2021 Conqu3red.

About

A C++ library for writing Lexers and PEG Parsers.

License:MIT License


Languages

Language:C++ 99.7%Language:Makefile 0.3%