Simple, modular and flexible high-performance parsing framework.
Introduction
Introduction to PetitParser2
Migration from PetitParser
Parser Development
Scripting with Bounded Seas
Grammar
Context-Sensitive Grammar
Abstract-Syntax Tree
Full Parser
Comments
Optimizations
Optimization (Memoization)
PetitParser2 Internals
Star Lazy (In Progress)
Caches (In Progress)
Matching Tags (In Progress)
Context-Sensitivity (In Progress)
In this blog we describe PetitParser2 — a modular and flexible high-performance top-down parsing framework.
This introduction describes basics of PetitParser2 and how to migrate from PetitParser to PetitParser2.
There are other tutorials for PetitParser. We recommend the following:
Describes full cycle of parser development. Starts from scripting in a playground and ends with a full-fledged, tested and high-performance parser. Covers topics such as tolerant parsing, abstract-syntax tree, optimizations and debugging.
The easiest way to start this tutorial is to use Moose. Moose is a software and data analysis platform that has everything we need already installed.
Alternatively, you can download clean Pharo 6 (or higher) image and install PetitParser2 using the following command:
Metacello new
baseline: 'PetitParser2Gui';
repository: 'github://kursjan/petitparser2';
load
In case it does not work, please let me know: kurs.jan@gmail.com.
Parsing Streams
The text is released under the MIT license.
Do you have ideas, suggestions or issues? Write me an email (kurs.jan@gmail.com), or contact us on github!