kursjan / petitparser2

A high-performance top-down parser
MIT License
41 stars 19 forks source link

PetitParser2 Build Status

PetitParser2 is a framework for building parsers. PetitParser2 is a new version of PetitParser with focus on performance and flexibility.

Key Features

Why to switch from PetitParser to PetitParser2?

There are many reasons why to switch to PetitParser2:

We already migrated many parsers to PetitParser2 (e.g. Smalltalk, Pillar, ...). If you find anything that is not working for you, please open an issue. See Migration from PetitParser for more details.

Installing PetitParser2

Use the configuration manager in your Pharo image and install the stable version.

Installing standard version for the latest Pharo:

Metacello new
    baseline: 'PetitParser2';
    repository: 'github://kursjan/petitparser2';
    load.

To install graphical tools (with GToolkit and Roassal2 dependencies):

Metacello new
    baseline: 'PetitParser2Gui';
    repository: 'github://kursjan/petitparser2';
    load.

To install a core with minimal external dependencies, use:

Metacello new
    baseline: 'PetitParser2Core';
    repository: 'github://kursjan/petitparser2';
    load.

To install additional languages, use:

Metacello new
    baseline: 'PetitParser2Languages';
    repository: 'github://kursjan/petitparser2';
    load.

The following grammars are available:

PetitParser2 Tutorial

Learn more about PetitParser2. In the tutorial we cover all the topics related to PetitParser2. We discuss PetitParser2 best practices, testing, abstract syntax tree generation, optimizations or even context-sensitive parsing.

https://kursjan.github.io/petitparser2/

Debugging Parsers

Here you can find an illustrative explanation how to debug when parsers do not work as expected.

Need Help?

Feel free to open an issue or post a StackOverflow question with the petitparser2 tag.