Python on Parrot Python on Parrot - under the hood #36

Parser Grammar Engine (PGE)

Parrot subsystem for regular expressions

Compiles regexes into Parrot subroutines that match patterns

Thus, PGE can take a regex pattern like

[ <alpha> | _ ] \w*

and produce a standalone parrot subroutine to match it in a string.

A parrot utility (pgc.pir) compiles libraries of regexes (grammars) into parsers.

Copyright © 2007 Patrick Michaud