PyLR Manual

This is the PyLR parser generator manual. PyLR is a parser generator package for use with python (version 1.5b1 or better). This manual addresses how to use the package to produce parsers.


Audience

Parsing can be very complicated stuff, and it helps to understand what exactly is happening when something is parsed when writing a parser. Unfortunately (for the impatient), the topic of Parsing has been the subject of many a dissertation. This document will present two views on the data it presents. One is a technical view which will contain terms without defining them. These terms are generally understood by those who have studied parsing theory (such as LALR, shift-reduce, etc), and probably not understood by those that haven't. For this reason, I have attempted to include an intuitive view whenever possible, particularly in the section The Basics. There should be enough in that section to let anyone interested who is interested and familiar with python write a parser.

The Basics


This section refers to writing lexers, Grammars, and then producing a parser with these parts. In PyLR, a lexer is part of a parser. This simplifies the interface to actually doing the parsing. There is an 'engine' which takes the output of the lexer and triggers the back end of parsing. So we'll start with writing a lexer.

Structure

Nothing yet, sorry it's an alpha, read the source.

API

Nothing yet, sorry it's an alpha. Read the source.