PGE.pir - main module for the Parrot Grammar Engine
...
.local pmc pgec
loadbytecode "pge.pir"
pgec = global "_pge_compile"
...
rule = pgec("^(From|To):")
match = rule($S0)
...
This module contains the routines and constants necessary to use the Parrot Grammar Engine.
- rulesub = p6rule( pattern )
- (rulesub, pir) = p6rule( pattern )
- Compiles a string containing a pattern into a subroutine that can be used to match strings containing the pattern. The first form simply returns a subroutine; the second form also returns a string containing the intermediate PIR code that was generated to produce the subroutine.
- rulesub = p5re( pattern )
- (rulesub, pir) = p5re( pattern )
- Compiles a string containing a pattern into a subroutine that can be used to match strings containing the pattern. The first form simply returns a subroutine; the second form also returns a string containing the intermediate PIR code that was generated to produce the subroutine.
- rulesub = pge_glob( pattern )
- (rulesub, pir) = pge_glob( pattern )
- Compiles a string containing a glob pattern into a subroutine that can be used to match strings containing the pattern. The first form simply returns a subroutine; the second form also returns a string containing the intermediate PIR code that was generated to produce the subroutine.
Patrick Michaud (pmichaud@pobox.com) is the author and maintainer. Patches and suggestions should be sent to the Perl 6 compiler list (perl6-compiler@perl.org).
Copyright (c) 2004, The Perl Foundation.