Coder Social home page Coder Social logo

petitparser2's Introduction

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

  • Modular, composable and easy to extend
  • Natural, easy-to-follow definitions
  • High performance
  • Rich IDE support

Why to switch from PetitParser to PetitParser2?

There are many reasons why to switch to PetitParser2:

  • PetitParser2 is actively maintained by the author and by the Moose community.
  • PetitParser2 can do everything PetitParser can do, and more: for example it contains new predicates such as #startOfLine, #endOfLine, can express tolerant or context sensitive grammars.
  • The performance of PetitParser2 is 2-5 times better compared to PetitParser.
  • PetitParser2 supports real streams: no need to load the whole input into the memory (see PP2BufferStream).

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:

  • Smalltalk
  • CSV
  • HTML
  • JSON
  • MSE
  • ManifestMF

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.

petitparser2's People

Contributors

bpieber avatar chisandrei avatar girba avatar jecisc avatar jurajkubelka avatar khinsen avatar kursjan avatar mahugnon avatar markfirmware avatar merkste avatar pavel-krivanek avatar seandenigris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.