YAPC::NA 2006 — Patrick Michaud
Parsers, Perl 6 Rules, and the Parrot Grammar Engine
- Public Domain
- 2006-06-28 10:24 AM CST
- 25 Minutes, 55 Seconds
Perl 6 defines a new, powerful pattern-matching syntax known as "rule expressions", which is an extension and redesign of the regular expression syntax used in earlier versions of Perl. Notably, Perl 6 rule syntax has been explicitly designed to ease the task of creating language parsers.
The Parrot Grammar Engine (PGE) is the implementation of Perl 6 rules on top of Parrot, the virtual machine implementation underlying Perl 6. PGE not only implements Perl 6 rule syntax for top-down parsing, but it also integrates a bottom-up operator precedence parser for fast processing of common expressions. PGE also allows the arbitrary mixing of top-down, bottom-up, and custom parsing subroutines.
This talk will a detailed overview of Perl 6 rules, an introduction to using PGE, and how these can be quickly used to build custom parsers for a variety of languages. Numerous examples will be provided, including complete examples for simple languages and key excerpts from the Perl 6 parser (written using Perl 6 rules and PGE).
- View now in Flash
- iPod-compatible H.264, 640x480, 96 MB
- PSP-compatible MPEG4, 368x208, 110 MB
- Audio+slides MPEG4, 640x480, 110 MB
Copyright 2006-2007 Clotho Advanced Media Inc.
(except the presentation content which is copyright the respective speakers)